 This article is Middle school level
Believe it or not the basis of all of mathematics is nothing more than the simple "Next" function.
 Next(0)=1
 Next(1)=2
 Next(2)=3
 Next(3)=4
This defines the Natural numbers^{w}. Natural numbers are those used for counting.
 These have the very convenient property of being transitive^{w}. That means that if a<b and b<c then it follows that a<c. Not everything has that property. See Rock–paper–scissors^{w} and Nontransitive dice.
Numbers
Addition^{w} is defined as repeatedly calling the Next function. Next(Next(Next(5))) = 3+5. The inverse of addition is subtraction^{w}. But subtraction leads to the ability to write equations like for which there is no answer among natural numbers. To provide an answer mathematicians generalize to the set of all integers^{w} which includes negative integers.
 The absolute value of x is defined as
 The study of integers is called Number theory^{w}.
 A prime number is a number that can only be divided by itself and one. If a, b, c, and d are primes then the Least common multiple^{w} of abc and c^{2}d is abc^{2}d. (See Tutorial:least common multiples)
Multiplication^{w} is defined as repeated addition. . The inverse of multiplication is division^{w}. But division leads to equations like for which there is no answer among integers. The solution is to generalize to the set of rational numbers^{w} which include fractions.
 (Addition and multiplication are fast but division is slow even for computers.)
Exponentiation^{w} is defined as repeated multiplication. . The inverse of exponentiation is finding roots^{w}.
 It can be proven that cannot be a rational number. It is therefore an irrational number. Any number which isnt rational is irrational^{w}.
 0^0^{w} = 1. See Empty product^{w}.
When a quantity, like the charge of a single electron, becomes so small that it is insignificant we, quite justifiably, treat it as though it were zero. A quantity that can be treated as though it were zero, even though it very definitely is not, is called infinitesimal. If is a finite amount of charge then would be an infinitesimal amount of charge. See Differential^{w}
Likewise when a quantity becomes so large that a regular finite quantity becomes insignificant then we call it infinite. We would say that the mass of the ocean is infinite . But compared to the mass of the Milky Way galaxy our ocean is insignificant. So we would say the mass of the Galaxy is doubly infinite .
Infinity and the infinitesimal are called Hyperreal numbers^{w}. Hyperreals behave, in every way, exactly like real numbers. For example, is exactly twice as big as In reality, the mass of the ocean is a real number so it is hardly surprising that it behaves like one.
Vectors
The one dimensional number line can be generalized to a two dimensional Cartesian coordinate system^{w} thereby creating multidimensional math (i.e. geometry^{w}). A single number specifies a single point on the number line. A single vector specifies a single point in this two dimensional Cartesian plane but this requires two numbers.
 If and are arbitrary vectors then we can (and usually do) write:
Vectors can be added
Vectors can be multiplied with numbers
The length of vector is denoted The double bars are used to avoid confusion with the absolute value of the function.
Dot product
Dot product^{w}:
 Only parallel components multiply. The result is a number not a vector.
 The dot product works in any number of dimensions.
 If vectors and form a 90 degree angle then because
Cross product
Cross product^{w}:
 The result is a vector that is perpendicular to both and . This vector can be thought of as the axis of rotation created when rotating from u to v.
 Unlike the dot product, it is only defined in three dimensions^{w}.
 In two dimensions there is no vector perpendicular to and .
 In three dimensions there is only one vector perpendicular to and .
 In four or more dimensions there are infinitely many vectors perpendicular to and .
Image below shows rotation from z to x. The axis of rotation is .
Functions
From Wikipedia:Function (mathematics)
In mathematics^{w}, a function is a relation^{w} between a set of inputs and a set of outputs with the property that each input is related to exactly one output. An example is the function that relates each number x to its square x^{2}. The output of a function f corresponding to an input x is denoted by f(x) (read "f of x"). In this example, if the input is −3, then the output is 9, and we may write f(−3) = 9. See Tutorial:Evaluate by Substitution^{w}. Likewise, if the input is 3, then the output is also 9, and we may write f(3) = 9. (The same output may be produced by more than one input, but each input gives only one output.) The input variable(s)^{w} are sometimes referred to as the argument(s) of the function.
Euclids "common notions"
From Wikipedia:Euclidean geometry:
Things that do not differ from one another are equal to one another
a=a 
Things that are equal to the same thing are also equal to one another
If 

then a=c 
If equals are added to equals, then the wholes are equal
If 

then a+c=b+d 
If equals are subtracted from equals, then the remainders are equal
If 

then ac=bd 
The whole is greater than the part.
If  b≠0  then a+b>a 
Elementary algebra
From Wikipedia:Elementary algebra:
Elementary algebra builds on and extends arithmetic by introducing letters called variables^{w} to represent general (nonspecified) numbers.
Algebraic expressions may be evaluated and simplified, based on the basic properties of arithmetic operations (addition^{w}, subtraction^{w}, multiplication^{w}, division^{w} and exponentiation^{w}). For example,
 Added terms are simplified using coefficients. For example, can be simplified as (where 3 is a numerical coefficient).
 Multiplied terms are simplified using exponents. For example, is represented as
 Like terms are added together,^{[2]} for example, is written as , because the terms containing are added together, and, the terms containing are added together.
 Brackets can be "multiplied out", using the distributive property^{w}. For example, can be written as which can be written as
 Expressions can be factored. For example, , by dividing both terms by can be written as
For any function , if then the following four rules apply:
A typical algebra problem would be to solve for x:
 Using rule number 2:
 we get
 Factoring out x
 we get
 Using rule number 3
 we get
Trigonometry
A right triangle is a triangle with gamma=90 degrees.
The Pythagorean theorem posits that in any right triangle^{w}, the square^{w} of the length of the hypotenuse^{w} is equal to the sum^{w} of the squares of both legs.
 , where is the length of the side opposite the right angle (the hypotenuse).
For small values of x, sin x ≈ x. (If x is in radians).
SOH → sin = "opposite" / "hypotenuse" 
= sin A = a/c 
A sphere rotating around its axis of rotation:
Polynomials
 From Wikipedia:Polynomial:
A polynomial^{w} can always be written in the form
where are constants called coefficients and n is the degree^{w} of the polynomial.
 A linear polynomial is a polynomial of degree one.
Each individual term is the product of the coefficient and a variable raised to a nonnegative integer power.
 A monomial has only one term.
 A binomial has 2 terms.
A root (or zero) of a function is a value of x for which Z(x)=0.
 The roots of the formula are given by the Quadratic formula^{w}:
See Completing the square^{w}
 is called the discriminant.
 Where See Binomial coefficient^{w}
Elementary calculus
Integration
 See also: Hyperreal number^{w} and Implicit differentiation^{w}
The integral^{w} is a generalization of multiplication. (Mathematicians do a lot of generalizing)
 For example: a unit mass dropped from point x_{2} to point x_{1} will release energy.
 (A unit mass is a mass of one unit).
 The usual equation is a simple multiplication. We just multiply the force of gravity times the distance that the object falls and the result is how much energy is released:
 This equation says that one unit of mass falling one unit of distance through a region with one unit of gravity will gain one unit of kinetic energy.
 But that equation cant be used if the strength of gravity is itself a function of x.
 The strength of gravity at x_{1} would be different than it is at x_{2}.
 And in reality gravity really does depend on x (x is the distance from the center of the earth):
 (See inversesquare law^{w}.)
 However, the corresponding Definite integral^{w} is easily solved:
The fundamental theorem of Calculus is:
 where F(x) is the indefinite integral^{w}. (antiderivative^{w})
Finding the indefinite integral is easy:
 where k and y are arbitrary constants. (Units (feet, mm...) behave exactly like constants.)
 and most conveniently:
The integral of a function is equal to the area under the curve.
 When the "curve" is a constant (in other words, k•x^{0}) then the integral reduces to ordinary multiplication.
Examples:
 and
Finite difference
From Wikipedia:Finite difference:
The slope of a function at point x is approximately:
 where
 Δx is a small change in the value of x.
 Δy is the corresponding change in y.
The smaller Δx becomes the more accurate the approximation becomes. When Δx becomes so small that it is infinitesimal then we denote it dx.
Differentiation
Differentiation is the opposite of integration just as division is the opposite of multiplication.
 The derivative^{w} of the integral of f(x) is just f(x).
 The derivative^{w} of the integral of f(x) is just f(x).
The derivative of a function at any point is equal to the slope of the function at that point.
The equation of the line tangent to a function at point a is
The derivative of f(x) where f(x) = k•x^{y} is
 However there is one exception that you do need to know about.
 The derivative of is
 If the derivative of x^{0} is not x^{1} then what is the integral of x^{1}?
 The integral of is ln(x)^{[3]}. See natural log^{w}
And most conveniently:
Examples:
 and
Taylor & Maclaurin series
factorial^{w} is:
 For example:
 And
f' = first derivative of f
f" = second derivative of f
f^{(n)} = nth derivative of f
If we know the value of a smooth function^{w} at x=0 (smooth means all its derivatives are continuous^{w}) and we also know the value of all of its derivatives at x=0 then we can determine the value at any other point x by using the Maclaurin series^{w}.
The proof of this is actually quite simple. Plugging in a value of x=0 causes all terms but the first to become zero. So, assuming that such a function exists, a_{0} must be the value of the function at x=0. Simply differentiate both sides of the equation and repeat for the next term. And so on.
We can easily determine the Maclaurin series expansion of the exponential function^{w} (because it is equal to its own derivative).
And cos(x)^{w} and sin(x)^{w} (because cosine is the derivative of sine which is the derivative of cosine)
Fourier Series
The Maclaurin series cant be used for a discontinuous^{w} function like a square wave because it is not differentiable.
But remarkably we can use the Fourier series^{w} to expand it or any other periodic function^{w} into an infinite sum of sine waves each of which is fully differentiable^{w}!
Partial derivatives
Partial derivatives^{w} and multiple integrals^{w} generalize derivatives and integrals to multiple dimensions (i.e. multiple variables).
The partial derivative with respect to one variable is found by simply treating all other variables as though they were constants.
Multiple integrals are found the same way.
Gradient
Numbers are called scalars to distinguish them from vectors. A scalar function f(x) outputs a scalar number for each input value of x.
Let f(x, y) be a 2 dimensional scalar function^{w}.
 (An elevation map would be an example of a 2 dimensional scalar function because it assigns a scalar number (the height) to each point on the 2 dimensional map.)
The Gradient^{w} of a scalar function is a vector that points "downhill" with a magnitude equal to the slope^{w} of the function at that point. The gradient of a scalar function always goes downhill and therefore never goes in circles.
The function f is a scalar function. But the gradient of f is not a scalar function. is a vector field. That is why it is written in bold text.
A vector field for the movement of air at the surface of the Earth would associate for every point on the surface of the Earth a vector with the wind speed and direction for that point. This can be drawn using arrows to represent the wind; the length (magnitude) of the arrow will be an indication of the wind speed.^{[4]}
There are places on the Earth where air rises from the surface all the way to the top of the atmosphere (thunderstorms). On our map air would seem to flow toward these points and then disappear (since it is no longer at the surface). We call these places "sinks". The opposite of a sink is a source. On our map a source would be a place where air is descending to the surface.
An even better way to represent vector fields than using short arrows is by using flux lines^{w}. (The word flux means flow.) Flux lines are unbroken lines that extend from sources all the way to the sinks (or to infinity if there are no sinks). A single flux line traces the path that a single particle would travel from a source to a sink. The intensity (for example wind speed) is indicated by the density of the flux lines. The more the lines are crowded together the greater the intensity (wind speed). Flux lines have a tendency to repel one another.
Divergence
The Divergence^{w} of the vector field is a scalar that is positive at sources and negative at sinks and zero everywhere else.
Electric field lines begin at positive charges and end at negative charges. (The electric field is the gradient of the electric potential.)
Curl
The Curl^{w} of a vector field describes how much the flux lines are twisted. The curl is only defined in 3 dimensions.
The curl of the gradient of a scalar function is always zero but that is not true for the curl of all vector fields. Not all vector fields are the gradient of a scalar function. The flux lines of some vector fields even go in circles.
The flux lines of a magnetic field always go in circles. Magnetic flux lines never end. There is no such thing as magnetic charge.
Green's theorem
You can think of each electric field line as beginning (and ending) in a single unit of charge. The more lines there are the more charge there is. Twice as many lines means twice as much charge.
Green's theorem^{w} states that if you want to know how many field lines exit a region then you can either count how many lines cross the boundary of that region (perform a line integral^{w}) or you can simply count the number of charges within that region. See Divergence theorem^{w}.
A version of Green's theorem also works for curl.
Green's theorem is an extremely important result that is widely used in more advanced mathematics. Green's theorem might seem like a trivial result that is so obvious that it isnt even worth stating but in more advanced mathematics it is used in places and in ways that are far from obvious.
Advanced topics
Complex numbers
The imaginary unit^{w} i is
 therefore
Because no "real" number satisfies this equation, i is called an "imaginary" number.
From Wikipedia:Imaginary number and Wikipedia:Complex number
An imaginary number is a real number multiplied by the imaginary unit^{w} i. The square of an imaginary number bi is −b^{2}. For example, 5i is an imaginary number, and its square is −25.
An imaginary number bi can be added to a real number a to form a complex number of the form a + bi, where the real numbers a and b are called, respectively, the real part and the imaginary part of the complex number.
Geometrically, complex numbers extend the concept of the onedimensional number line^{w} to the twodimensional complex plane^{w} by using the horizontal axis for the real part and the vertical axis for the imaginary part. The complex number a + bi can be identified with the point (a, b) in the complex plane.
Two complex numbers and are easily added^{w}:
Similarly, subtraction^{w} can be performed as
They can also be multiplied:
To divide by a complex number just multiply by the reciprocal of the complex number. The reciprocal of a complex number is:
Constant of integration
The derivative of the integral of f(x) is indeed just f(x)
 but the integral of the derivative of f(x) is not always equal to f(x).
what happened to the 3? The answer is that it was lost.
Strictly speaking whenever you do an integral you are supposed to add a constant of integration
How do we know what c is? The answer is that we don't know! We cant know. Its an unknown so we just leave it as c. c is not a variable. Its a constant. "c" is short for constant.
As a beginner you shouldnt have to worry about the constant of integration. There are two reasons for this.
 For the types of problems you as a beginner will be asked to solve the constant will almost always be zero anyway.
 Even if the constant wasnt zero, whenever you do a definite integral the constant would cancel out anyway.
For now you dont need to worry about the constant of integration but in more advanced mathematics you will.
Wedge product
The cross product of vectors a and b is a vector that points along the axis of rotation. The vector is perpendicular to both a and b. The longer the vector the faster the rotation.
But the cross product (and the curl) is only defined in 3 dimensions. In 4 or more dimensions one must use the wedge product^{w}. (The wedge product can also be used in 3 dimensions.)
The wedge product of vectors a and b is a plane segment that lies within the plane of rotation. The plane segment contains both a and b. The larger the area of the plane segment the faster the rotation. The wedge product of vectors a and b is written as .
In four dimensions a rigid object can rotate in two different ways simultaneously.
Tensors
A tensor is to a vector what a vector is to a scalar.
In fact a scalar is a 0thorder tensor and a vector is a 1storder tensor.
A 2ndorder tensor can be made by multiplying 2 vectors using the outer product:
Multiplying a vector and a scalar results in a vector with a different magnitude but pointing in the same direction.
Multiplying a 2ndorder vector and a tensor results in a vector that not only has a different magnitude but may even be pointing in a totally different direction.
Intermediate mathematics
References
 ↑ Wikipedia:Euclidean vector
 ↑ Andrew Marx, Shortcut Algebra I: A Quick and Easy Way to Increase Your Algebra I Knowledge and Test Scores, Publisher Kaplan Publishing, 2007, ISBN 1419552880, 9781419552885, 288 pages, page 51
 ↑
e^{x} = y = dy/dx
dx = dy/y = 1/y * dy
∫ (1/y)dy = ∫ dx = x = ln(y)
 ↑ Wikipedia:Vector field
This page uses content from Math wiki. The original article was at Introductory mathematics. The list of authors can be seen in the page history there. 