Basics – Unit vectors – Notation – Dot product – Cross product – Right hand rules – More information
A vector is a mathematical quantity with magnitude and direction. For example, the force vector \(\vec{F}\) below has a magnitude of \(5\) N and a direction of \(30^\circ\) above horizontal.
Once you define a coordinate system, you can find the components of a vector along the coordinate axes. The force vector shown would have an \(x\)-component \(F_x = (5 \textup{N}) \cos 30^\circ = 4.33 \;\textup{N}\), and a \(y\)-component \(F_y = (5 \textup{N}) \sin 30^\circ = 2.5 \;\textup{N}\).
If you know the components of a vector, use the Pythagorean theorem to find the magnitude and an inverse-tangent to get the direction. For vector \(\vec{B}\) above, \(B_x = -4\) and \(B_y = 3\). So the magnitude of \(\vec{B}\) is \(B = \sqrt{(-4)^2+3^2} = 5\). And the angle shown is \(\theta = \tan^{-1} \left( \frac{3}{4} \right) = 36.9^\circ\).
A unit vector is a vector with magnitude \(1\). (The name comes from “unity”, which means “one”.) A unit vector holds only direction information, not magnitude. Unit vectors are usually written with a “hat”, such as \(\hat{a}\).
The Cartesian unit vectors \(\hat{\imath}\), \(\hat{\jmath}\) and \(\hat{k}\) point in the \(+x\), \(+y\) and \(+z\) directions, respectively. These unit vectors may also be written as \(\hat{x}\), \(\hat{y}\) and \(\hat{z}\).
The force vector above could be written as \(\vec{F} = (5 \textup{N}) \hat{u} = (5 \textup{N}) (\hat{\imath} \cos 30^\circ + \hat{\jmath} \sin 30^\circ)\).
In Physics you will need to be able to write unit vectors based on the geometry of a problem. For example, in the figure at the right,
\(\hat{u}=\hat{\imath} \sin \theta + \hat{\jmath} \cos \theta\)
\(\hat{v}=-\hat{\imath} \cos \phi + \hat{\jmath} \sin \phi\)
\(\hat{w}=\hat{\imath} \sin \alpha - \hat{\jmath} \cos \alpha\)
If your angles are measured counterclockwise off the \(+x\) axis, then (for two-dimensional vectors) the \(x\) component is always a cosine and the \(y\) component is always a sine:
\(\hat{u}=\hat{\imath} \cos (90^\circ -\theta) + \hat{\jmath} \sin (90^\circ -\theta)\)
\(\hat{v}=\hat{\imath} \cos (180^\circ -\phi) + \hat{\jmath} \sin (180^\circ -\phi)\)
\(\hat{w}=\hat{\imath} \cos (-90^\circ +\alpha) + \hat{\jmath} \sin (-90^\circ +\alpha)\)
If a vector’s \(xy\) components are sine and cosine of the same angle, regardless of which is which and regardless of \(\pm\) sign, the magnitude is always \(\sqrt{\sin^2 \theta + \cos^2 \theta} =1\). It must be a unit vector.
Vectors can be represented in different ways.
| Cartesian unit vectors | \(\vec{A} = A_x\hat{\imath}+A_y\hat{\jmath}+A_z\hat{k}\) |
| angle brackets | \(\vec{A} = \left< A_x,A_y,A_z \right>\) |
| column vector | \(\vec{A} = \begin{bmatrix} A_x \\ A_y \\ A_z \end{bmatrix}\) |
| boldface | \(\mathbf{A} = A_x\;\mathbf{i}+A_y\;\mathbf{j}+A_z\;\mathbf{k}\) |
| other basis vectors | \(\vec{A} = A_\alpha \hat{\alpha}+A_\beta \hat{\beta}+A_\gamma \hat{\gamma}\) |
Any of these are acceptable in Physics.
The dot product of \(\vec{A}\) and \(\vec{B}\) is a scalar, expressing how parallel the two vectors are.
For any two vectors \(\vec{A}\) and \(\vec{B}\), we have the following:
The Cartesian unit vectors have simple dot products:
\(\hat{\imath} \cdot \hat{\jmath} =
0\)
\(\hat{\jmath} \cdot \hat{k}=
0\)
\(\hat{k} \cdot \hat{\imath}
= 0\)
\(\hat{\imath} \cdot \hat{\imath} =
1\)
\(\hat{\jmath} \cdot
\hat{\jmath}= 1\)
\(\hat{k} \cdot
\hat{k} = 1\)
By distributiing the dot product you can derive the alternate form of the dot product:
\[ \begin{aligned} \vec{A} \cdot \vec{B} =& \left (A_x \hat{\imath} + A_y \hat{\jmath} + A_z \hat{k} \right ) \cdot \left (B_x \hat{\imath} + B_y \hat{\jmath} + B_z \hat{k} \right ) \\ =& (A_x \hat{\imath} \cdot B_x \hat{\imath} ) + (A_x \hat{\imath} \cdot B_y \hat{\jmath} ) + (A_x \hat{\imath} \cdot B_z \hat{k} ) \\ &+ (A_y \hat{\jmath} \cdot B_x \hat{\imath} ) + (A_y \hat{\jmath} \cdot B_y \hat{\jmath} ) + (A_y \hat{\jmath} \cdot B_z \hat{k} ) \\ &+ (A_z \hat{k} \cdot B_x \hat{\imath}) + (A_z \hat{k} \cdot B_y \hat{\jmath} ) + (A_z \hat{k} \cdot B_z \hat{k} ) \\ =& A_x B_x \; \hat{\imath} \cdot \hat{\imath} + 0 + 0 \\ &+ 0 + A_y B_y \; \hat{\jmath} \cdot \hat{\jmath} + 0 \\ &+ 0 + 0 + A_z B_z \; \hat{k} \cdot \hat{k} \\ =& A_xB_x + A_yB_y + A_zB_z \\ \end{aligned} \]
It’s easy to manually compute dot products. For example, if \(\vec{A} = 3 \hat{\imath} + 4 \hat{k}\) and \(\vec{B} = 5 \hat{\jmath} -6 \hat{k}\), then
\[ \begin{aligned} \vec{A} \cdot \vec{B} &= (3 \hat{\imath} + 0 \hat{\jmath} + 4 \hat{k}) \cdot (0 \hat{\imath} +5 \hat{\jmath} -6 \hat{k}) \\ &= 3 \cdot 0 + 0 \cdot 5 + 4 \cdot (-6) \\ &= 0+0-24 \\ &= -24 \end{aligned} \]
The cross product of \(\vec{A}\) and \(\vec{B}\) is a vector that is perpendicular (in the right hand sense) to both \(\vec{A}\) and \(\vec{B}\).
If \(\vec{A} \times \vec{B} = \vec{C}\), then we have the following:
Further properties of the cross product:
It is convenient to know the cross products of the Cartesian unit vectors:
\(\hat{\imath} \times \hat{\jmath} =
\hat{k}\)
\(\hat{\jmath} \times
\hat{k} = \hat{\imath}\)
\(\hat{k} \times \hat{\imath} =
\hat{\jmath}\)
\(\hat{k} \times \hat{\jmath} =
-\hat{\imath}\)
\(\hat{\jmath}
\times \hat{\imath} = -\hat{k}\)
\(\hat{\imath} \times \hat{k} =
-\hat{\jmath}\)
If you see the pattern (represented in the cyclical symbols), then it’s easy to manually compute cross products. Just distribute the cross product over the vector components.
For example, if \(\vec{A} = 3 \hat{\imath} + 4 \hat{k}\) and \(\vec{B} = 5 \hat{\jmath} -6 \hat{k}\), then
\[ \begin{aligned} \vec{A} \times \vec{B} &= (3 \hat{\imath} + 4 \hat{k}) \times (5 \hat{\jmath} -6 \hat{k}) \\ &= 3 \hat{\imath} \times (5 \hat{\jmath} -6 \hat{k}) \; +\; 4 \hat{k} \times (5 \hat{\jmath} -6 \hat{k}) \\ &= 3 \hat{\imath} \times 5 \hat{\jmath} +3 \hat{\imath} \times (-6 \hat{k} ) +4 \hat{k} \times 5 \hat{\jmath} +4 \hat{k} \times (-6 \hat{k} ) \\ &= 15 (\hat{\imath} \times \hat{\jmath} ) -18 (\hat{\imath} \times \hat{k} ) +20 (\hat{k} \times \hat{\jmath}) -24 (\hat{k} \times \hat{k} ) \\ &= 15 \hat{k} -18 (-\hat{\jmath} ) + 20 ( -\hat{\imath}) - \vec{0} \\ &= -20 \hat{\imath} + 18 \hat{\jmath} + 15 \hat{k}\\ \end{aligned} \]
(You normally would not write out all these steps. You could probably jump to writing the second-to-last line, doing the rest in your head.)
This same method can be used to derive the long form of the cross product:
\[ \vec{A}\times\vec{B} = \left (A_yB_z-A_zB_y \right ) \hat{\imath} + \left (A_zB_x-A_xB_z \right ) \hat{\jmath} + \left (A_xB_y-A_yB_x \right ) \hat{k} \]
A different method to compute cross products (often taught in math class) is to use a matrix determinant. This is fine as long as you don’t forget about where the extra minus signs go.
\[ \begin{aligned} \vec{A} \times \vec{B} &= (A_x \hat{\imath} + A_y \hat{\jmath} + A_z \hat{k}) \times (B_x \hat{\imath} + B_y \hat{\jmath} + B_z \hat{k} ) \\ &= \begin{vmatrix} \hat{\imath} & \hat{\jmath} & \hat{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \\ \end{vmatrix} \\ &= \hat{\imath} \begin{vmatrix} A_y & A_z \\ B_y & B_z \\ \end{vmatrix} - \hat{\jmath} \begin{vmatrix} A_x & A_z \\ B_x & B_z \\ \end{vmatrix} + \hat{k} \begin{vmatrix} A_x & A_y \\ B_x & B_y \\ \end{vmatrix} \\ &= \hat{\imath} (A_yB_z-A_zB_y) - \hat{\jmath} (A_xB_z-A_zB_x) + \hat{k} (A_xB_y-A_yB_x) \\ \end{aligned} \]
Considering all the arithmetic, it’s easier to have a computer do the math. In Python (a Jupyter Notebook, for example), with \(\vec{A} = 3 \hat{\imath} + 4 \hat{k}\) and \(\vec{B} = 5 \hat{\jmath} -6 \hat{k}\), the cross product \(\vec{A} \times \vec{B}\) is found as follows:
from numpy import *
A = array((3,0,4))
B = array((0,5,-6))
print( cross(A,B) )[-20 18 15]
That’s \(-20 \hat{\imath} + 18 \hat{\jmath} + 15 \hat{k}\), as we found by hand above.
In Physics, by convention, we use a right-handed coordinate system. That means we use the “right hand rule” for the cross product, as shown above. It also means that, when sketching a 3D coordinate system, make sure it is “right handed”. You need \(\hat{\imath} \times \hat{\jmath} = \hat{k}\), not \(\hat{\imath} \times \hat{\jmath} = -\hat{k}\).
Any circulating quantity (such as a rotating body, a looping electric current, or a circular vector field) can be associated with a vector direction. Identify the axis of rotation, then the vector points along that axis in the “right hand” direction. In the figure at the right, vector \(\vec{\omega}\) describes the angular velocity of the rotating disc.
For the same reason, positive angles in the \(xy\) plane are associated with the \(+z\) direction, negative angles with the \(-z\) direction.
Technically, quantities defined by a right-hand rule like this are pseudovectors, not true vectors. But for our purposes they are indistinguishable (see more here if you like).
Last modified: May, 2025