# Calculus/Vectors

## Two-Dimensional Vectors

### Introduction

In most mathematics courses up until this point, we deal with scalars. These are quantities which only need one number to express. For instance, the amount of gasoline used to drive to the grocery store is a scalar quantity because it only needs one number: 2 gallons.

In this unit, we deal with vectors. A vector is a directed line segment -- that is, a line segment that points one direction or the other. As such, it has an initial point and a terminal point. The vector starts at the initial point and ends at the terminal point, and the vector points towards the terminal point. A vector is drawn as a line segment with an arrow at the terminal point:

The same vector can be placed anywhere on the coordinate plane and still be the same vector -- the only two bits of information a vector represents are the magnitude and the direction. The magnitude is simply the length of the vector, and the direction is the angle at which it points. Since neither of these specify a starting or ending location, the same vector can be placed anywhere. To illustrate, all of the line segments below can be defined as the vector with magnitude ${\displaystyle 4{\sqrt {2}}}$ and angle 45 degrees:

It is customary, however, to place the vector with the initial point at the origin as indicated by the black vector. This is called the standard position.

### Component Form

In standard practice, we don't express vectors by listing the length and the direction. We instead use component form, which lists the height (rise) and width (run) of the vectors. It is written as follows:

${\displaystyle {\begin{pmatrix}{\text{run}}\\{\text{rise}}\end{pmatrix}}}$

Other ways of denoting a vector in component form include:

${\displaystyle \mathbf {(u_{x},u_{y})} }$ and ${\displaystyle \mathbf {\left\langle u_{x},u_{y}\right\rangle } }$

From the diagram we can now see the benefits of the standard position: the two numbers for the terminal point's coordinates are the same numbers for the vector's rise and run. Note that we named this vector ${\displaystyle \mathbf {u} }$ . Just as you can assign numbers to variables in algebra (usually ${\displaystyle x,y,z}$), you can assign vectors to variables in calculus. The letters ${\displaystyle u,v,w}$ are usually used, and either boldface or an arrow over the letter is used to identify it as a vector.

When expressing a vector in component form, it is no longer obvious what the magnitude and direction are. Therefore, we have to perform some calculations to find the magnitude and direction.

### Magnitude

${\displaystyle |\mathbf {u} |={\sqrt {u_{x}^{2}+u_{y}^{2}}}}$

where ${\displaystyle u_{x}}$ is the width, or run, of the vector; ${\displaystyle u_{y}}$ is the height, or rise, of the vector. You should recognize this formula as the Pythagorean theorem. It is -- the magnitude is the distance between the initial point and the terminal point.

The magnitude of a vector can also be called the norm.

### Direction

${\displaystyle \tan(\theta )={\frac {u_{y}}{u_{x}}}}$

where ${\displaystyle \theta }$ is the counter-clockwise angle made by the vector with the positive ${\displaystyle x}$-axis. This formula is simply the tangent formula for right triangles.

### Vector Operations

For these definitions, assume:

${\displaystyle \mathbf {u} ={\begin{pmatrix}u_{x}\\u_{y}\end{pmatrix}},\mathbf {v} ={\begin{pmatrix}v_{x}\\v_{y}\end{pmatrix}}}$

Vector Addition is often called tip-to-tail addition, because this makes it easier to remember.

The sum of the vectors you are adding is called the resultant vector, and is the vector drawn from the initial point (tip) of the first vector to the terminal point (tail) of the second vector. Although they look like the arrows, the pointy bit is the tail, not the tip. (Imagine you were walking the direction the vector was pointing... you would start at the flat end (tip) and walk toward the pointy end.)

It looks like this:

(Notice, the black lined vector is the sum of the two dotted line vectors!)

Numerically:

${\displaystyle {\binom {4}{6}}+{\binom {1}{-3}}={\binom {5}{3}}}$

Or more generally:

${\displaystyle \mathbf {u} +\mathbf {v} ={\begin{pmatrix}u_{x}+v_{x}\\u_{y}+v_{y}\end{pmatrix}}}$

#### Scalar Multiplication

Graphically, multiplying a vector by a scalar changes only the magnitude of the vector by that same scalar. That is, multiplying a vector by 2 will "stretch" the vector to twice its original magnitude, keeping the direction the same.

${\displaystyle 2\cdot {\binom {3}{3}}={\binom {6}{6}}}$

Numerically, you calculate the resultant vector with this formula:

${\displaystyle c\mathbf {u} ={\begin{pmatrix}cu_{x}\\cu_{y}\end{pmatrix}}}$ , where ${\displaystyle c}$ is a constant scalar.

As previously stated, the magnitude is changed by the same constant:

${\displaystyle |c\mathbf {u} |=|c||\mathbf {u} |}$

Since multiplying a vector by a constant results in a vector in the same direction, we can reason that two vectors are parallel if one is a constant multiple of the other -- that is, that ${\displaystyle \mathbf {u} ||\mathbf {v} }$ if ${\displaystyle \mathbf {u} =c\mathbf {v} }$ for some constant ${\displaystyle c}$ .

We can also divide by a non-zero scalar by instead multiplying by the reciprocal, as with dividing regular numbers:

${\displaystyle {\frac {\mathbf {u} }{c}}={\frac {1}{c}}\mathbf {u} ,c\neq 0}$

#### Linear Functions

A depiction of the property of linearity with respect to a function applied to 2D vectors. In this figure, it is apparent that ${\displaystyle L(\mathbf {u} +\mathbf {v} )=L(\mathbf {u} )+L(\mathbf {v} )}$.

Given a function ${\displaystyle L}$ that accepts a vector as input and returns a vector or scalar as the output, function ${\displaystyle L}$ is considered to be "linear" if the following holds:

1. For any vectors ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$, it is the case that ${\displaystyle L(\mathbf {u} +\mathbf {v} )=L(\mathbf {u} )+L(\mathbf {v} )}$.
2. For any vector ${\displaystyle \mathbf {u} }$ and scalar ${\displaystyle c}$, it is the case that ${\displaystyle L(c\mathbf {u} )=cL(\mathbf {u} )}$.

More generally, when given a function ${\displaystyle M}$ that has multiple vector valued parameters ${\displaystyle \mathbf {u} _{1},\mathbf {u} _{2},...,\mathbf {u} _{n}}$, function ${\displaystyle M}$ is a "multi-linear" function if ${\displaystyle M}$ is linear with respect to each parameter while holding all other parameters constant:

For each ${\displaystyle i=1,2,...,n}$ and vectors ${\displaystyle \mathbf {u} _{1},\mathbf {u} _{2},\dots ,\mathbf {u} _{n}}$:

1. For any vector ${\displaystyle \mathbf {v} }$ from the same vector space as ${\displaystyle \mathbf {u} _{i}}$, it is the case that ${\displaystyle M(\mathbf {u} _{1},...,\mathbf {u} _{i}+\mathbf {v} ,...,\mathbf {u} _{n})=M(\mathbf {u} _{1},...,\mathbf {u} _{i},...,\mathbf {u} _{n})+M(\mathbf {u} _{1},...,\mathbf {v} ,...,\mathbf {u} _{n})}$
2. For any scalar ${\displaystyle c}$, it is the case that ${\displaystyle M(\mathbf {u} _{1},...,c\mathbf {u} _{i},...,\mathbf {u} _{n})=cM(\mathbf {u} _{1},...,\mathbf {u} _{i},...,\mathbf {u} _{n})}$

If ${\displaystyle n=2}$, then ${\displaystyle M}$ is "bilinear". Bilinear functions include the dot product and the cross product.

#### Dot Product

The dot product is a way of multiplying two vectors to produce a scalar value. Because it combines the components of two vectors to form a /scalar/, it is sometimes called a scalar product. If you were asked to take the 'dot product of two rectangular vectors' you would do the following:

${\displaystyle \mathbf {u} \cdot \mathbf {v} =u_{x}v_{x}+u_{y}v_{y}}$

It is very important to note that the dot product of two vectors does not result in another vector, it gives you a scalar, just a numerical value.

Another common pitfall may arise if your vectors are not in rectangular ('cartesian') format. Sometimes, vectors are instead expressed in polar coordinates, where the first component is the vector's magnitude (length) and the second is the angle from the ${\displaystyle x}$-axis at which the vector should be oriented. Dot products cannot be performed using the conventional method on these sorts of vectors; vectors in polar format must be converted to their equivalent rectangular form before you can work with them using the formula given above. A common way to convert to rectangular coordinates is to imagine that the vector was projected horizontally and vertically to form a right triangle. You could then use properties of sin and cos to find the length of the two legs the right triangle. The horizontal length would then be the x-component of the rectangular expression of the vector and the vertical length would be the y-component. Remember that if the vector is pointing down or to the left, the corresponding components would have to be negative to indicate that.

With some rearrangement and trigonometric manipulation, we can see that the number that results from the dot product of two vectors is a surprising and useful identity:

${\displaystyle \mathbf {u} \cdot \mathbf {v} =|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$

where ${\displaystyle \theta }$ is the angle between the two vectors. This provides a convenient way of finding the angle between two vectors:

${\displaystyle \cos(\theta )={\frac {\mathbf {u} \cdot \mathbf {v} }{|\mathbf {u} ||\mathbf {v} |}}}$

Notice that the dot product is 'commutative', that is:

${\displaystyle \mathbf {u} \cdot \mathbf {v} =\mathbf {v} \cdot \mathbf {u} }$

Also, the dot product of two vectors will be the length of the vector squared:

${\displaystyle \mathbf {u} \cdot \mathbf {u} =u_{x}u_{x}+u_{y}u_{y}=(u_{x})^{2}+(u_{y})^{2}}$

and by the Pythagorean theorem,

${\displaystyle (u_{x})^{2}+(u_{y})^{2}=\|u\|^{2}}$

The dot product can be visualized as the length of a projection of one vector on to the other. In other words, the dot product asks 'how much magnitude of this vector is going in the direction of that vector?'

#### Deriving the Dot Product

Start with the following definition for the dot product: ${\displaystyle \mathbf {u} \cdot \mathbf {v} =|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$ where ${\displaystyle \theta }$ is the angle between ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$.

The formula ${\displaystyle \mathbf {u} \cdot \mathbf {v} =u_{x}v_{x}+u_{y}v_{y}}$ can be derived from the above definition through various approaches:

The triangle ${\displaystyle \Delta AOB}$.

Approach #1

One of the more direct approaches is to use the law of cosines. Create a triangle ${\displaystyle \Delta AOB}$ with vertices ${\displaystyle A(u_{x},u_{y})}$, ${\displaystyle O(0,0)}$, and ${\displaystyle B(v_{x},v_{y})}$. The displacement ${\displaystyle {\vec {OA}}=\mathbf {u} }$, the displacement ${\displaystyle {\vec {OB}}=\mathbf {v} }$, and the displacement ${\displaystyle {\vec {AB}}=\mathbf {v} -\mathbf {u} }$. The angle ${\displaystyle \angle AOB=\theta }$.

The lengths of the sides of the triangle are ${\displaystyle |OA|=|\mathbf {u} |}$, and ${\displaystyle |OB|=|\mathbf {v} |}$, and ${\displaystyle |AB|=|\mathbf {v} -\mathbf {u} |}$. Applying the law of cosines gives:

${\displaystyle |AB|^{2}=|OA|^{2}+|OB|^{2}-2|OA||OB|\cos(\angle AOB)}$ ${\displaystyle \iff |\mathbf {v} -\mathbf {u} |^{2}=|\mathbf {u} |^{2}+|\mathbf {v} |^{2}-2|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$ ${\displaystyle \iff (v_{x}-u_{x})^{2}+(v_{y}-u_{y})^{2}=(u_{x}^{2}+u_{y}^{2})+(v_{x}^{2}+v_{y}^{2})-2|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$ ${\displaystyle \iff -2u_{x}v_{x}-2u_{y}v_{y}=-2|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$ ${\displaystyle \iff |\mathbf {u} ||\mathbf {v} |\cos(\theta )=u_{x}v_{x}+u_{y}v_{y}}$

Therefore ${\displaystyle \mathbf {u} \cdot \mathbf {v} =u_{x}v_{x}+u_{y}v_{y}}$.

Approach #2

A more intuitive derivation of ${\displaystyle \mathbf {u} \cdot \mathbf {v} =u_{x}v_{x}+u_{y}v_{y}}$ uses the fact that the dot product is a bilinear operator. To establish that the dot product is a bilinear operator, the following must be established:

1. Holding ${\displaystyle \mathbf {u} }$ constant, the dot product ${\displaystyle \mathbf {u} \cdot \mathbf {v} }$ must be linear with respect to ${\displaystyle \mathbf {v} }$.
2. Holding ${\displaystyle \mathbf {v} }$ constant, the dot product ${\displaystyle \mathbf {u} \cdot \mathbf {v} }$ must be linear with respect to ${\displaystyle \mathbf {u} }$.

Since it is readily apparent from the definition ${\displaystyle \mathbf {u} \cdot \mathbf {v} =|\mathbf {u} ||\mathbf {v} |\cos(\theta )}$ that ${\displaystyle \mathbf {u} \cdot \mathbf {v} =\mathbf {v} \cdot \mathbf {u} }$, linearity with respect to ${\displaystyle \mathbf {v} }$ implies linearity with respect to ${\displaystyle \mathbf {u} }$. It is hence only necessary to establish that the dot product is linear with respect to ${\displaystyle \mathbf {v} }$ to establish bilinearity.

The orthogonal projection of ${\displaystyle \mathbf {v} }$ onto ${\displaystyle L(\mathbf {u} )}$.

${\displaystyle \mathbf {u} \cdot \mathbf {v} =|\mathbf {u} ||\mathbf {v} |\cos(\theta )=|\mathbf {u} |{\text{proj}}(\mathbf {v} |\mathbf {u} )}$ where ${\displaystyle {\text{proj}}(\mathbf {v} |\mathbf {u} )=|\mathbf {v} |\cos(\theta )}$ is the "orthogonal projection" of vector ${\displaystyle \mathbf {v} }$ onto a line ${\displaystyle L(\mathbf {u} )}$ whose direction is the direction of ${\displaystyle \mathbf {u} }$. ${\displaystyle {\text{proj}}(\mathbf {v} |\mathbf {u} )}$ is the component of ${\displaystyle \mathbf {v} }$ that is parallel to ${\displaystyle L(\mathbf {u} )}$. It is not hard to observe that ${\displaystyle {\text{proj}}(\mathbf {v} |\mathbf {u} )}$ is linear with respect to ${\displaystyle \mathbf {v} }$ while ${\displaystyle \mathbf {u} }$ is held constant. The dot product ${\displaystyle \mathbf {u} \cdot \mathbf {v} =|\mathbf {u} |{\text{proj}}(\mathbf {v} |\mathbf {u} )}$ is linear with respect to ${\displaystyle \mathbf {v} }$, and therefore the dot product is a bilinear operator.

The bilinearity of the dot product now enables the derivation:

${\displaystyle \mathbf {u} \cdot \mathbf {v} ={\begin{pmatrix}u_{x}\\u_{y}\end{pmatrix}}\cdot {\begin{pmatrix}v_{x}\\v_{y}\end{pmatrix}}}$ ${\displaystyle =\left(u_{x}{\begin{pmatrix}1\\0\end{pmatrix}}+u_{y}{\begin{pmatrix}0\\1\end{pmatrix}}\right)\cdot \left(v_{x}{\begin{pmatrix}1\\0\end{pmatrix}}+v_{y}{\begin{pmatrix}0\\1\end{pmatrix}}\right)}$ ${\displaystyle =\left(\left(u_{x}{\begin{pmatrix}1\\0\end{pmatrix}}+u_{y}{\begin{pmatrix}0\\1\end{pmatrix}}\right)\cdot {\begin{pmatrix}1\\0\end{pmatrix}}\right)v_{x}+\left(\left(u_{x}{\begin{pmatrix}1\\0\end{pmatrix}}+u_{y}{\begin{pmatrix}0\\1\end{pmatrix}}\right)\cdot {\begin{pmatrix}0\\1\end{pmatrix}}\right)v_{y}}$ ${\displaystyle =\left({\begin{pmatrix}1\\0\end{pmatrix}}\cdot {\begin{pmatrix}1\\0\end{pmatrix}}\right)u_{x}v_{x}+\left({\begin{pmatrix}0\\1\end{pmatrix}}\cdot {\begin{pmatrix}1\\0\end{pmatrix}}\right)u_{y}v_{x}+\left({\begin{pmatrix}1\\0\end{pmatrix}}\cdot {\begin{pmatrix}0\\1\end{pmatrix}}\right)u_{x}v_{y}+\left({\begin{pmatrix}0\\1\end{pmatrix}}\cdot {\begin{pmatrix}0\\1\end{pmatrix}}\right)u_{y}v_{y}}$ ${\displaystyle =1u_{x}v_{x}+0u_{y}v_{x}+0u_{x}v_{y}+1u_{y}v_{y}}$ ${\displaystyle =u_{x}v_{x}+u_{y}v_{y}}$

Therefore ${\displaystyle \mathbf {u} \cdot \mathbf {v} =u_{x}v_{x}+u_{y}v_{y}}$.

### Applications of Scalar Multiplication and Dot Product

#### Unit Vectors

A unit vector is a vector with a magnitude of 1. The unit vector of u is a vector in the same direction as ${\displaystyle \mathbf {u} }$ , but with a magnitude of 1:

The process of finding the unit vector of ${\displaystyle \mathbf {u} }$ is called normalization. As mentioned in scalar multiplication, multiplying a vector by constant ${\displaystyle c}$ will result in the magnitude being multiplied by ${\displaystyle c}$ . We know how to calculate the magnitude of ${\displaystyle \mathbf {u} }$ . We know that dividing a vector by a constant will divide the magnitude by that constant. Therefore, if that constant is the magnitude, dividing the vector by the magnitude will result in a unit vector in the same direction as ${\displaystyle \mathbf {u} }$ :

${\displaystyle \mathbf {w} ={\frac {\mathbf {u} }{|\mathbf {u} |}}}$ , where ${\displaystyle \mathbf {w} }$ is the unit vector of ${\displaystyle \mathbf {u} }$

#### Standard Unit Vectors

A special case of Unit Vectors are the Standard Unit Vectors ${\displaystyle \mathbf {i} ,\mathbf {j} }$ : ${\displaystyle \mathbf {i} }$ points one unit directly right in the ${\displaystyle x}$ direction, and ${\displaystyle \mathbf {j} }$ points one unit directly up in the ${\displaystyle y}$ direction:

${\displaystyle \mathbf {i} ={\binom {1}{0}}}$

${\displaystyle \mathbf {j} ={\binom {0}{1}}}$

Using the scalar multiplication and vector addition rules, we can then express vectors in a different way:

${\displaystyle {\binom {x}{y}}=x\mathbf {i} +y\mathbf {j} }$

If we work that equation out, it makes sense. Multiplying ${\displaystyle x}$ by ${\displaystyle \mathbf {i} }$ will result in the vector ${\displaystyle {\binom {x}{0}}}$ . Multiplying ${\displaystyle y}$ by ${\displaystyle \mathbf {j} }$ will result in the vector ${\displaystyle {\binom {0}{y}}}$ . Adding these two together will give us our original vector, ${\displaystyle {\binom {x}{y}}}$ . Expressing vectors using ${\displaystyle \mathbf {i} ,\mathbf {j} }$ is called standard form.

#### Projection and Decomposition of Vectors

Sometimes it is necessary to decompose a vector ${\displaystyle \mathbf {u} }$ into two components: one component parallel to a vector ${\displaystyle \mathbf {v} }$ , which we will call ${\displaystyle \mathbf {u} _{\parallel }}$ ; and one component perpendicular to it, ${\displaystyle \mathbf {u} _{\perp }}$ .

Since the length of ${\displaystyle \mathbf {u} _{\parallel }}$ is ${\displaystyle |\mathbf {u} |\cdot \cos(\theta )}$ , it is straightforward to write down the formulas for ${\displaystyle \mathbf {u} _{\perp }}$ and ${\displaystyle \mathbf {u} _{\parallel }}$ :

${\displaystyle \mathbf {u_{\parallel }} =|\mathbf {u} |*{\frac {(\mathbf {u} \cdot \mathbf {v} )}{(|\mathbf {u} ||\mathbf {v} |)}}*{\frac {\mathbf {v} }{|\mathbf {v} |}}={\frac {\mathbf {u} \cdot \mathbf {v} }{|\mathbf {v} |^{2}}}\mathbf {v} }$

and

${\displaystyle \mathbf {u} _{\perp }=\mathbf {u} -\mathbf {u} _{\parallel }}$

#### Length of a vector

The length of a vector is given by the dot product of a vector with itself, and ${\displaystyle \theta =0\ rad}$:

${\displaystyle \mathbf {u} \cdot \mathbf {u} =|\mathbf {u} ||\mathbf {u} |\cos(\theta )=|\mathbf {u} |^{2}}$

#### Perpendicular vectors

If the angle ${\displaystyle \theta }$ between two vectors is 90 degrees or ${\displaystyle {\tfrac {\pi }{2}}}$ (if the two vectors are orthogonal to each other), that is the vectors are perpendicular, then the dot product is 0. This provides us with an easy way to find a perpendicular vector: if you have a vector ${\displaystyle \mathbf {u} ={\begin{pmatrix}u_{x}\\u_{y}\end{pmatrix}}}$ , a perpendicular vector can easily be found by either

${\displaystyle \mathbf {v} ={\begin{pmatrix}-u_{y}\\u_{x}\end{pmatrix}}=-{\begin{pmatrix}u_{y}\\-u_{x}\end{pmatrix}}}$

### Polar coordinates

Polar coordinates are an alternative two-dimensional coordinate system, which is often useful when rotations are important. Instead of specifying the position along the ${\displaystyle x}$ and ${\displaystyle y}$ axes, we specify the distance from the origin, ${\displaystyle r}$ , and the direction, an angle ${\displaystyle \theta }$ .

Looking at this diagram, we can see that the values of ${\displaystyle x,y}$ are related to those of ${\displaystyle r}$ and ${\displaystyle \theta }$ by the equations

${\displaystyle {\begin{matrix}x=r\cos(\theta )&r={\sqrt {x^{2}+y^{2}}}\\y=r\sin(\theta )&\theta =\arctan \left({\frac {y}{x}}\right)\end{matrix}}}$

Because tan-1 is multivalued, care must be taken to select the right value.

Just as for Cartesian coordinates the unit vectors that point in the ${\displaystyle x}$ and ${\displaystyle y}$ directions are special, so in polar coordinates the unit vectors that point in the ${\displaystyle r}$ and ${\displaystyle \theta }$ directions are also special.

We will call these vectors ${\displaystyle {\hat {\mathbf {r} }}}$ and ${\displaystyle {\hat {\boldsymbol {\theta }}}}$ , pronounced r-hat and theta-hat. Putting a circumflex over a vector this way is often used to mean the unit vector in that direction.

Again, on looking at the diagram we see,

${\displaystyle {\begin{matrix}\mathbf {i} ={\hat {\mathbf {r} }}\cos(\theta )-{\hat {\boldsymbol {\theta }}}\sin(\theta )&{\hat {\mathbf {r} }}={\frac {x}{r}}\mathbf {i} +{\frac {y}{r}}\mathbf {j} \\\mathbf {j} ={\hat {\mathbf {r} }}\sin(\theta )+{\hat {\boldsymbol {\theta }}}\cos(\theta )&{\hat {\boldsymbol {\theta }}}=-{\frac {y}{r}}\mathbf {i} +{\frac {x}{r}}\mathbf {j} \end{matrix}}}$

## Three-Dimensional Coordinates and Vectors

### Basic definition

Two-dimensional Cartesian coordinates as we've discussed so far can be easily extended to three-dimensions by adding one more value: ${\displaystyle z}$ . If the standard ${\displaystyle (x,y)}$ coordinate axes are drawn on a sheet of paper, the ${\displaystyle z}$-axis would extend upwards off of the paper.

Similar to the two coordinate axes in two-dimensional coordinates, there are three coordinate planes in space. These are the ${\displaystyle xy}$-plane, the ${\displaystyle yz}$-plane, and the ${\displaystyle xz}$-plane. Each plane is the "sheet of paper" that contains both axes the name mentions. For instance, the ${\displaystyle yz}$-plane contains both the ${\displaystyle y}$ and ${\displaystyle z}$ axes and is perpendicular to the ${\displaystyle x}$-axis.

center|Coordinate planes in space.

Therefore, vectors can be extended to three dimensions by simply adding the ${\displaystyle z}$ value.

${\displaystyle \mathbf {u} ={\begin{pmatrix}x\\y\\z\end{pmatrix}}}$

To facilitate standard form notation, we add another standard unit vector:

${\displaystyle \mathbf {k} ={\begin{pmatrix}0\\0\\1\end{pmatrix}}}$

Again, both forms (component and standard) are equivalent.

${\displaystyle {\begin{pmatrix}1\\2\\3\end{pmatrix}}=1\mathbf {i} +2\mathbf {j} +3\mathbf {k} }$

Magnitude: Magnitude in three dimensions is the same as in two dimensions, with the addition of a ${\displaystyle z}$ term in the radicand.

${\displaystyle |\mathbf {u} |={\sqrt {u_{x}^{2}+u_{y}^{2}+u_{z}^{2}}}}$

## Three dimensions

The polar coordinate system is extended into three dimensions with two different coordinate systems, the cylindrical and spherical coordinate systems, both of which include two-dimensional or planar polar coordinates as a subset. In essence, the cylindrical coordinate system extends polar coordinates by adding an additional distance coordinate, while the spherical system instead adds an additional angular coordinate.

### Cylindrical coordinates

a point plotted with cylindrical coordinates

The cylindrical coordinate system is a coordinate system that essentially extends the two-dimensional polar coordinate system by adding a third coordinate measuring the height of a point above the plane, similar to the way in which the Cartesian coordinate system is extended into three dimensions. The third coordinate is usually denoted ${\displaystyle h}$ , making the three cylindrical coordinates ${\displaystyle (r,\theta ,h)}$ .

The three cylindrical coordinates can be converted to Cartesian coordinates by

{\displaystyle {\begin{aligned}x&=r\cos(\theta )\\y&=r\sin(\theta )\\z&=h\end{aligned}}}

### Spherical coordinates

A point plotted using spherical coordinates

Polar coordinates can also be extended into three dimensions using the coordinates ${\displaystyle (\rho ,\phi ,\theta )}$ , where ${\displaystyle \rho }$ is the distance from the origin, ${\displaystyle \phi }$ is the angle from the ${\displaystyle z}$-axis (called the colatitude or zenith and measured from 0 to 180°) and ${\displaystyle \theta }$ is the angle from the ${\displaystyle x}$-axis (as in the polar coordinates). This coordinate system, called the spherical coordinate system, is similar to the latitude and longitude system used for Earth, with the origin in the centre of Earth, the latitude ${\displaystyle \delta }$ being the complement of ${\displaystyle \phi }$ , determined by ${\displaystyle \delta =90^{\circ }-\phi }$ , and the longitude ${\displaystyle l}$ being measured by ${\displaystyle l=\theta -180^{\circ }}$ .

The three spherical coordinates are converted to Cartesian coordinates by

{\displaystyle {\begin{aligned}x&=\rho \sin(\phi )\cos(\theta )\\y&=\rho \sin(\phi )\sin(\theta )\\z&=\rho \cos(\phi )\end{aligned}}}
${\displaystyle \rho ={\sqrt {x^{2}+y^{2}+z^{2}}}}$
${\displaystyle \theta =\arctan \left({\frac {y}{x}}\right)}$
${\displaystyle \phi =\arccos \left({\frac {z}{\rho }}\right)}$

### Cross Product

The cross product of two vectors is a determinant:

${\displaystyle \mathbf {u} \times \mathbf {v} ={\begin{vmatrix}\mathbf {i} &\mathbf {j} &\mathbf {k} \\u_{x}&u_{y}&u_{z}\\v_{x}&v_{y}&v_{z}\end{vmatrix}}}$

and is also a pseudovector.

The cross product of two vectors is orthogonal to both vectors. The magnitude of the cross product is the product of the magnitude of the vectors and the sin of the angle between them.

${\displaystyle |\mathbf {u} \times \mathbf {v} |=|\mathbf {u} ||\mathbf {v} |\sin(\theta )}$

This magnitude is the area of the parallelogram defined by the two vectors.

The cross product is linear and anticommutative. For any numbers ${\displaystyle a,b}$ ,

${\displaystyle \mathbf {u} \times \left(a\mathbf {v} +b\mathbf {w} \right)=a\mathbf {u} \times \mathbf {v} +b\mathbf {u} \times \mathbf {w} \qquad \mathbf {u} \times \mathbf {v} =-\mathbf {v} \times \mathbf {u} }$

If both vectors point in the same direction, their cross product is 0.

### Deriving the Cross Product

A depiction of the cross product of vectors ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$.

Start with the following definition for the cross product: ${\displaystyle \mathbf {u} \times \mathbf {v} =(|\mathbf {u} ||\mathbf {v} |\sin \theta ){\hat {\mathbf {n} }}}$. Vector ${\displaystyle {\hat {\mathbf {n} }}}$ is a unit length vector that is perpendicular to both ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ and oriented according to the "right hand rule". Angle ${\displaystyle \theta }$ is the counterclockwise angle from ${\displaystyle \mathbf {u} }$ to ${\displaystyle \mathbf {v} }$ within the plane that is orthogonal to ${\displaystyle {\hat {\mathbf {n} }}}$.

The formula ${\displaystyle \mathbf {u} \times \mathbf {v} =(u_{y}v_{z}-u_{z}v_{y})\mathbf {i} +(u_{z}v_{x}-u_{x}v_{z})\mathbf {j} +(u_{x}v_{y}-u_{y}v_{x})\mathbf {k} }$ can be derived by exploiting the bilinearity of the cross product. To establish the cross product as a bilinear operator, the following must be established:

1. Holding ${\displaystyle \mathbf {u} }$ constant, the cross product ${\displaystyle \mathbf {u} \times \mathbf {v} }$ must be linear with respect to ${\displaystyle \mathbf {v} }$.
2. Holding ${\displaystyle \mathbf {v} }$ constant, the cross product ${\displaystyle \mathbf {u} \times \mathbf {v} }$ must be linear with respect to ${\displaystyle \mathbf {u} }$.

From the definition ${\displaystyle \mathbf {u} \times \mathbf {v} =(|\mathbf {u} ||\mathbf {v} |\sin \theta ){\hat {\mathbf {n} }}}$, the anticommutative property of the cross product can be inferred: ${\displaystyle \mathbf {u} \times \mathbf {v} =-\mathbf {v} \times \mathbf {u} }$ (vector ${\displaystyle {\hat {\mathbf {n} }}}$ reverses direction when ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are swapped). This means that linearity with respect to ${\displaystyle \mathbf {v} }$ implies linearity with respect to ${\displaystyle \mathbf {u} }$. It is hence only necessary to establish that the cross product is linear with respect to ${\displaystyle \mathbf {v} }$ to establish bilinearity.

The perpendicular component of ${\displaystyle \mathbf {v} }$ relative to the line ${\displaystyle L(\mathbf {u} )}$.

${\displaystyle \mathbf {u} \times \mathbf {v} =(|\mathbf {u} ||\mathbf {v} |\sin \theta ){\hat {\mathbf {n} }}=|\mathbf {u} |{\textbf {rotate}}({\textbf {perp}}(\mathbf {v} |\mathbf {u} )|\mathbf {u} )}$ where:

• ${\displaystyle {\textbf {perp}}(\mathbf {v} |\mathbf {u} )}$ is the component of ${\displaystyle \mathbf {v} }$ that is perpendicular to a line ${\displaystyle L(\mathbf {u} )}$ whose direction is the direction of ${\displaystyle \mathbf {u} }$. ${\displaystyle {\textbf {perp}}(\mathbf {v} |\mathbf {u} )=(|\mathbf {v} |\sin \theta ){\hat {\mathbf {m} }}}$ where vector ${\displaystyle {\hat {\mathbf {m} }}}$ is a unit length vector that is parallel to ${\displaystyle {\textbf {perp}}(\mathbf {v} |\mathbf {u} )}$.
• ${\displaystyle {\textbf {rotate}}(\mathbf {w} |\mathbf {u} )}$ is a 90 degree counterclockwise rotation of ${\displaystyle \mathbf {w} }$ around ${\displaystyle L(\mathbf {u} )}$. Note that ${\displaystyle {\textbf {rotate}}({\hat {\mathbf {m} }}|\mathbf {u} )={\hat {\mathbf {n} }}}$.

It can easily be observed that ${\displaystyle {\textbf {perp}}(\mathbf {v} |\mathbf {u} )}$ is linear with respect to ${\displaystyle \mathbf {v} }$ with ${\displaystyle \mathbf {u} }$ held constant, and that ${\displaystyle {\textbf {rotate}}(\mathbf {w} |\mathbf {u} )}$ is linear with respect to ${\displaystyle \mathbf {w} }$ with ${\displaystyle \mathbf {u} }$ held constant. The cross product ${\displaystyle \mathbf {u} \times \mathbf {v} =(|\mathbf {u} ||\mathbf {v} |\sin \theta ){\hat {\mathbf {n} }}=|\mathbf {u} |{\textbf {rotate}}({\textbf {perp}}(\mathbf {v} |\mathbf {u} )|\mathbf {u} )}$ is linear with respect to ${\displaystyle \mathbf {v} }$, and therefore the cross product is a bilinear operator.

The bilinearity of the cross product now enables the derivation:

${\displaystyle \mathbf {u} \times \mathbf {v} =(u_{x}\mathbf {i} +u_{y}\mathbf {j} +u_{z}\mathbf {k} )\times (v_{x}\mathbf {i} +v_{y}\mathbf {j} +v_{z}\mathbf {k} )}$ ${\displaystyle =v_{x}((u_{x}\mathbf {i} +u_{y}\mathbf {j} +u_{z}\mathbf {k} )\times \mathbf {i} )+v_{y}((u_{x}\mathbf {i} +u_{y}\mathbf {j} +u_{z}\mathbf {k} )\times \mathbf {j} )+v_{z}((u_{x}\mathbf {i} +u_{y}\mathbf {j} +u_{z}\mathbf {k} )\times \mathbf {k} )}$ ${\displaystyle =u_{x}v_{x}(\mathbf {i} \times \mathbf {i} )+u_{y}v_{x}(\mathbf {j} \times \mathbf {i} )+u_{z}v_{x}(\mathbf {k} \times \mathbf {i} )+u_{x}v_{y}(\mathbf {i} \times \mathbf {j} )+u_{y}v_{y}(\mathbf {j} \times \mathbf {j} )+u_{z}v_{y}(\mathbf {k} \times \mathbf {j} )+u_{x}v_{z}(\mathbf {i} \times \mathbf {k} )+u_{y}v_{z}(\mathbf {j} \times \mathbf {k} )+u_{z}v_{z}(\mathbf {k} \times \mathbf {k} )}$ ${\displaystyle =u_{x}v_{y}\mathbf {0} +u_{y}v_{x}(-\mathbf {k} )+u_{z}v_{x}\mathbf {j} +u_{x}v_{y}\mathbf {k} +u_{y}v_{y}\mathbf {0} +u_{z}v_{y}(-\mathbf {i} )+u_{x}v_{z}(-\mathbf {j} )+u_{y}v_{z}\mathbf {i} +u_{z}v_{z}\mathbf {0} }$ ${\displaystyle =(u_{y}v_{z}-u_{z}v_{y})\mathbf {i} +(u_{z}v_{x}-u_{x}v_{z})\mathbf {j} +(u_{x}v_{y}-u_{y}v_{x})\mathbf {k} }$

Therefore ${\displaystyle \mathbf {u} \times \mathbf {v} =(u_{y}v_{z}-u_{z}v_{y})\mathbf {i} +(u_{z}v_{x}-u_{x}v_{z})\mathbf {j} +(u_{x}v_{y}-u_{y}v_{x})\mathbf {k} }$.

### Triple Products

If we have three vectors we can combine them in two ways, a triple scalar product,

${\displaystyle \mathbf {u} \cdot (\mathbf {v} \times \mathbf {w} )}$

and a triple vector product

${\displaystyle \mathbf {u} \times (\mathbf {v} \times \mathbf {w} )}$

The triple scalar product is a determinant

${\displaystyle \mathbf {u} \cdot (\mathbf {v} \times \mathbf {w} )={\begin{vmatrix}u_{x}&u_{y}&u_{z}\\v_{x}&v_{y}&v_{z}\\w_{x}&w_{y}&w_{z}\end{vmatrix}}}$

If the three vectors are listed clockwise, looking from the origin, the sign of this product is positive. If they are listed anticlockwise the sign is negative.

The order of the cross and dot products doesn't matter.

${\displaystyle \mathbf {u} \cdot (\mathbf {v} \times \mathbf {w} )=(\mathbf {u} \times \mathbf {v} )\cdot \mathbf {w} }$

Either way, the absolute value of this product is the volume of the parallelepiped defined by the three vectors ${\displaystyle \mathbf {u} ,\mathbf {v} ,\mathbf {w} }$

The triple vector product can be simplified

${\displaystyle \mathbf {u} \times (\mathbf {v} \times \mathbf {w} )=(\mathbf {u} \cdot \mathbf {w} )\mathbf {v} -(\mathbf {u} \cdot \mathbf {v} )\mathbf {w} }$

This form is easier to do calculations with.

The triple vector product is not associative.

${\displaystyle \mathbf {u} \times (\mathbf {v} \times \mathbf {w} )\neq (\mathbf {u} \times \mathbf {v} )\times \mathbf {w} }$

There are special cases where the two sides are equal, but in general the brackets matter. They must not be omitted.

### Three-Dimensional Lines and Planes

We will use ${\displaystyle \mathbf {r} }$ to denote the position of a point.

The multiples of a vector, ${\displaystyle \mathbf {a} }$ all lie on a line through the origin. Adding a constant vector ${\displaystyle \mathbf {b} }$ will shift the line, but leave it straight, so the equation of a line is,

${\displaystyle \mathbf {r} =s\mathbf {a} +\mathbf {b} }$

This is a parametric equation. The position is specified in terms of the parameter ${\displaystyle s}$ .

Any linear combination of two vectors, ${\displaystyle \mathbf {a} ,\mathbf {b} }$ lies on a single plane through the origin, provided the two vectors are not colinear. We can shift this plane by a constant vector again and write

${\displaystyle \mathbf {r} =s\mathbf {a} +t\mathbf {b} +\mathbf {c} }$

If we choose ${\displaystyle \mathbf {a} ,\mathbf {b} }$ to be orthonormal vectors in the plane (i.e. unit vectors at right angles) then ${\displaystyle s,t}$ are Cartesian coordinates for points in the plane.

These parametric equations can be extended to higher dimensions.

Instead of giving parametric equations for the line and plane, we could use constraints. E.g., for any point in the ${\displaystyle xy}$ plane ${\displaystyle z=0}$

For a plane through the origin, the single vector normal to the plane, ${\displaystyle \mathbf {n} }$ , is at right angle with every vector in the plane, by definition, so

${\displaystyle \mathbf {r} \cdot \mathbf {n} =0}$

is a plane through the origin, normal to ${\displaystyle \mathbf {n} }$ .

For planes not through the origin we get

${\displaystyle (\mathbf {r} -\mathbf {a} )\cdot \mathbf {n} =0\qquad \mathbf {r} \cdot \mathbf {n} =\mathbf {a} \cdot \mathbf {n} }$

A line lies on the intersection of two planes, so it must obey the constraint for both planes, i.e.

${\displaystyle \mathbf {r} \cdot \mathbf {n} =a\qquad \mathbf {r} \cdot \mathbf {m} =b}$

These constraint equations con also be extended to higher dimensions.

## Vector-Valued Functions

Vector-Valued Functions are functions that instead of giving a resultant scalar value, give a resultant vector value. These aid in the creation of direction and vector fields, and are therefore used in physics to aid with visualizations of electric, magnetic, and many other types of fields. They are of the following form:

${\displaystyle \mathbf {F(t)} ={\begin{pmatrix}\mathbf {a_{1}(t)} \\\vdots \\\mathbf {a_{n}(t)} \end{pmatrix}}}$

### Limits, Derivatives, and Integrals

Put simply, the limit of a vector-valued function is the limit of its parts.

Proof

Suppose ${\displaystyle \lim _{t\to c}\mathbf {F} (t)=\mathbf {L} ={\begin{pmatrix}\mathbf {a_{1}} \\\vdots \\\mathbf {a_{n}} \end{pmatrix}}}$

Therefore for any ${\displaystyle \varepsilon >0}$ there is a ${\displaystyle \phi >0}$ such that

${\displaystyle 0<|t-c|<\phi \implies |\mathbf {F} (t)-\mathbf {L} |<\varepsilon }$

But by the triangle inequality ${\displaystyle |a_{1}|\leq |\mathbf {F} |\leq |a_{1}|+\cdots +|a_{n}|}$

${\displaystyle |a_{1}(t)-a_{1}|\leq |\mathbf {F} (t)-\mathbf {L} |}$

So

${\displaystyle 0<|t-c|<\phi \implies |a_{1}(t)-a_{1}|<\varepsilon }$

Therefore ${\displaystyle \lim _{t\to c}a_{1}(t)=a_{1}}$

A similar argument can be used through parts ${\displaystyle a_{n}(t)}$ .

Now let ${\displaystyle \lim _{t\to c}\mathbf {F} (t)=\mathbf {L} ={\begin{pmatrix}\mathbf {a_{1}} \\\vdots \\\mathbf {a_{n}} \end{pmatrix}}}$ again, and that for any ${\displaystyle \varepsilon >0}$ there is a corresponding ${\displaystyle \phi >0}$ such ${\displaystyle 0<|t-c|<\phi }$ implies

${\displaystyle |a_{n}(t)-a_{n}|<{\frac {\varepsilon }{n}}}$

Then

${\displaystyle 0<|t-c|<\phi \implies |\mathbf {F} (t)-\mathbf {L} |\leq {\frac {\varepsilon _{1}}{n}}+\cdots +{\frac {\varepsilon _{n}}{n}}=\varepsilon }$

therefore:

${\displaystyle \lim _{t\to c}\mathbf {F} (t)=\mathbf {L} ={\begin{pmatrix}\mathbf {a_{1}} \\\vdots \\\mathbf {a_{n}} \end{pmatrix}}={\begin{pmatrix}\lim \limits _{t\to c}\mathbf {a_{1}(t)} \\\vdots \\\lim \limits _{t\to c}\mathbf {a_{n}(t)} \end{pmatrix}}}$

From this we can then create an accurate definition of a derivative of a vector-valued function:

{\displaystyle {\begin{aligned}\mathbf {F} '(t)&=\lim _{h\to 0}{\frac {\mathbf {F} (t+h)-\mathbf {F} (t)}{h}}={\begin{pmatrix}\mathbf {a_{1}(t)} \\\vdots \\\mathbf {a_{n}(t)} \end{pmatrix}}\\&=\lim _{h\to 0}{\frac {{\begin{pmatrix}\mathbf {a_{1}(t+h)} \\\vdots \\\mathbf {a_{n}(t+h)} \end{pmatrix}}-{\begin{pmatrix}\mathbf {a_{1}(t)} \\\vdots \\\mathbf {a_{n}(t)} \end{pmatrix}}}{h}}\\&={\begin{pmatrix}\lim \limits _{h\to 0}{\dfrac {a_{1}(t+h)-a_{1}(t)}{h}}\\\vdots \\\lim \limits _{h\to 0}{\dfrac {a_{n}(t+h)-a_{n}(t)}{h}}\end{pmatrix}}\end{aligned}}}

The final step was accomplished by taking what we just did with limits.

By the Fundamental Theorem of Calculus integrals can be applied to the vector's components.

In other words: the limit of a vector function is the limit of its parts, the derivative of a vector function is the derivative of its parts, and the integration of a vector function is the integration of it parts.

### Velocity, Acceleration, Curvature, and a brief mention of the Binormal

Assume we have a vector-valued function which starts at the origin and as its independent variables changes the points that the vectors point at trace a path.

We will call this vector ${\displaystyle \mathbf {r} (t)}$ , which is commonly known as the position vector.

If ${\displaystyle \mathbf {r} }$ then represents a position and t represents time, then in model with Physics we know the following:

${\displaystyle \mathbf {r} (t+h)-\mathbf {r} (t)}$ is displacement.
${\displaystyle \mathbf {r} '(t)=\mathbf {v} (t)}$ where ${\displaystyle \mathbf {v} (t)}$ is the velocity vector.
${\displaystyle |\mathbf {v} (t)|}$ is the speed.
${\displaystyle \mathbf {r} ''(t)=\mathbf {v} '(t)=\mathbf {a} (t)}$ where ${\displaystyle \mathbf {a} (t)}$ is the acceleration vector.

The only other vector that comes in use at times is known as the curvature vector.

The vector ${\displaystyle \mathbf {T} (t)}$ used to find it is known as the unit tangent vector, which is defined as ${\displaystyle {\frac {\mathbf {v} (t)}{|\mathbf {v} (t)|}}}$ or shorthand ${\displaystyle \mathbf {\hat {v}} }$ .

The vector normal ${\displaystyle \mathbf {N} }$ to this then is ${\displaystyle {\frac {\mathbf {T} '(t)}{|\mathbf {v} (t)|}}}$ .

We can verify this by taking the dot product

${\displaystyle \mathbf {T} \cdot \mathbf {N} =0}$

Also note that ${\displaystyle |\mathbf {v} (t)|={\frac {ds}{dt}}}$

and

${\displaystyle \mathbf {T} (t)={\frac {v}{|v|}}={\frac {\frac {dr}{dt}}{\frac {ds}{dt}}}={\frac {dr}{ds}}}$

and

${\displaystyle \mathbf {N} ={\frac {\mathbf {T} '(t)}{|\mathbf {v} (t)|}}={\frac {\frac {dT}{dt}}{\frac {ds}{dt}}}={\frac {dT}{ds}}}$

Then we can actually verify:

${\displaystyle {\frac {d}{ds}}(\mathbf {T} \cdot \mathbf {T} )={\frac {d}{ds}}(1)}$

${\displaystyle {\frac {dT}{ds}}\cdot \mathbf {T} +\mathbf {T} \cdot {\frac {dT}{ds}}=0}$

${\displaystyle 2\mathbf {T} \cdot {\frac {dT}{ds}}=0}$

${\displaystyle \mathbf {T} \cdot {\frac {dT}{ds}}=0}$

${\displaystyle \mathbf {T} \cdot \mathbf {N} =0}$

Therefore ${\displaystyle \mathbf {N} }$ is perpendicular to ${\displaystyle \mathbf {T} }$

What this gives rise to is the Unit Normal Vector ${\displaystyle {\frac {\frac {dT}{ds}}{\left|{\frac {dT}{ds}}\right|}}}$ of which the top-most vector is the Normal vector, but the bottom half ${\displaystyle (|{\frac {dT}{ds}}|)^{-1}}$ is known as the curvature. Since the Normal vector points toward the inside of a curve, the sharper a turn, the Normal vector has a large magnitude, therefore the curvature has a small value, and is used as an index in civil engineering to reflect the sharpness of a curve (clover-leaf highways, for instance).

The only other thing not mentioned is the Binormal that occurs in 3-d curves ${\displaystyle \mathbf {T} \times \mathbf {N} =\mathbf {B} }$ , which is useful in creating planes parallel to the curve.