The Cross Product
The
dot product
takes two vectors and hands back a single number. The cross
product \vec{a} \times \vec{b} is its three-dimensional
cousin with a twist: it hands back a whole vector — one that points
perpendicular to both \vec{a} and
\vec{b}, with a length equal to the area of the
parallelogram they span. It lives only in
3-D, where
"perpendicular to a plane" finally has a single direction to point in.
\vec{a} \times \vec{b} \;=\; \big(\, a_2 b_3 - a_3 b_2,\;\; a_3 b_1 - a_1 b_3,\;\; a_1 b_2 - a_2 b_1 \,\big).
Deriving the formula from a determinant
That component formula looks like something you would have to memorize. You don't — it is
just the
determinant
of a symbolic 3\times 3 matrix whose first row is the standard
basis vectors \hat{\imath}, \hat{\jmath}, \hat{k}.
Step 1 — write the mnemonic determinant. Put the basis vectors on top, the
components of \vec{a} in the middle row, and the components of
\vec{b} on the bottom:
\vec{a} \times \vec{b} \;=\; \begin{vmatrix} \hat{\imath} & \hat{\jmath} & \hat{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix}.
Step 2 — expand along the top row. Cofactor expansion gives each basis
vector its 2\times 2 minor (and the alternating sign on
\hat{\jmath}):
= \hat{\imath} \begin{vmatrix} a_2 & a_3 \\ b_2 & b_3 \end{vmatrix} - \hat{\jmath} \begin{vmatrix} a_1 & a_3 \\ b_1 & b_3 \end{vmatrix} + \hat{k} \begin{vmatrix} a_1 & a_2 \\ b_1 & b_2 \end{vmatrix}.
Step 3 — evaluate each 2\times 2 determinant.
Each is just "down-product minus up-product":
= \hat{\imath}\,(a_2 b_3 - a_3 b_2) \;-\; \hat{\jmath}\,(a_1 b_3 - a_3 b_1) \;+\; \hat{k}\,(a_1 b_2 - a_2 b_1).
Step 4 — read off the components. The middle sign flips the bracket, giving
the symmetric pattern (note the index cycle 1\to 2\to 3\to 1):
\vec{a} \times \vec{b} = \big(\, a_2 b_3 - a_3 b_2,\;\; a_3 b_1 - a_1 b_3,\;\; a_1 b_2 - a_2 b_1 \,\big).
Why it's perpendicular, and how long it is
Two claims make the cross product useful. Both fall out by direct computation.
Step 5 — check perpendicularity. Dot the result with
\vec{a} and watch everything cancel in pairs:
\vec{a} \cdot (\vec{a} \times \vec{b}) = a_1(a_2 b_3 - a_3 b_2) + a_2(a_3 b_1 - a_1 b_3) + a_3(a_1 b_2 - a_2 b_1).
= a_1 a_2 b_3 - a_1 a_3 b_2 + a_2 a_3 b_1 - a_1 a_2 b_3 + a_1 a_3 b_2 - a_2 a_3 b_1 = 0.
Every term meets its negative, so the sum is 0. Since a zero dot
product means a right angle, \vec{a} \times \vec{b} \perp \vec{a}
— and by the identical computation it is perpendicular to
\vec{b} too.
Step 6 — find its length. Grinding out
\lVert \vec{a} \times \vec{b}\rVert^2 and using
\lVert\vec{a}\rVert^2 \lVert\vec{b}\rVert^2 = (\vec{a}\cdot\vec{b})^2 + \lVert\vec{a}\times\vec{b}\rVert^2
with \vec{a}\cdot\vec{b} = \lVert\vec{a}\rVert\lVert\vec{b}\rVert\cos\theta
gives
\lVert \vec{a} \times \vec{b} \rVert = \lVert\vec{a}\rVert\,\lVert\vec{b}\rVert\,\sin\theta.
That is exactly the area of the parallelogram spanned by the two vectors
(base \lVert\vec{a}\rVert times height
\lVert\vec{b}\rVert\sin\theta) — see the
magnitude
for the length notation. That's the payoff worth remembering: to find how much area two
edge-vectors sweep out — or which way a surface faces, or which axis a spinning wrench turns
around — you reach for a cross product, not a dot product.
Step 7 — orientation is signed, so order matters. Swapping the rows of the
determinant flips its sign, so the cross product is anticommutative:
\vec{a} \times \vec{b} = -\,(\vec{b} \times \vec{a}).
Both results have the same length, but they point in opposite directions. Which one
you get is fixed by the right-hand rule: point your fingers along
\vec{a}, curl them toward \vec{b}, and
your thumb points along \vec{a}\times\vec{b}.
For \vec{a}, \vec{b} \in \mathbb{R}^3 with angle
\theta between them, the cross product
\vec{a}\times\vec{b} is the vector satisfying:
-
Perpendicularity —
\vec{a}\cdot(\vec{a}\times\vec{b}) = \vec{b}\cdot(\vec{a}\times\vec{b}) = 0,
so it is orthogonal to both \vec{a} and
\vec{b}.
-
Length = area —
\lVert\vec{a}\times\vec{b}\rVert = \lVert\vec{a}\rVert\,\lVert\vec{b}\rVert\,\sin\theta,
the area of the parallelogram they span.
-
Direction — fixed by the right-hand rule (the unique perpendicular for
which \vec{a}, \vec{b}, \vec{a}\times\vec{b} form a
right-handed frame).
-
Anticommutative —
\vec{a}\times\vec{b} = -(\vec{b}\times\vec{a}); in particular
\vec{a}\times\vec{a} = \vec{0}.
Every lit triangle on every screen owes its brightness to a cross product. Given a triangle
with corners \vec{a}, \vec{b}, \vec{c}, two of its edges are
\vec{b}-\vec{a} and \vec{c}-\vec{a}.
Their cross product is perpendicular to the whole triangle — a surface
normal:
\vec{n} = (\vec{b}-\vec{a}) \times (\vec{c}-\vec{a}).
Normalising it to unit length gives the direction the surface "faces":
\hat{n} = \frac{\vec{n}}{\lVert \vec{n} \rVert}.
A renderer dots \hat{n} with the direction to a light source to
decide how bright the triangle is — a face turned toward the light glows, a face turned away
goes dark. The same \hat{n} tells the engine which way is "out"
for backface culling and collision response. One cross product, a million times a frame.
See it stand up out of the plane
The oblique sketch above fakes 3-D; here is the real thing. Two vectors
\vec{u} and \vec{v} lie flat in the
x–y plane, shading the parallelogram they
span, and the cross product \vec{u} \times \vec{v} is a genuinely new
vector standing straight up — perpendicular to both, with length equal to that
shaded area. Drag to rotate and watch it lift up out of the flat sheet the two
originals live in.
Worked examples
Formulas are only convincing once you've turned the crank on real numbers. Take
\vec{a} = (2, -1, 3) and
\vec{b} = (0, 4, -2).
Example 1 — compute the cross product. Plug straight into the component
formula:
\vec{a} \times \vec{b} = \big(\, (-1)(-2) - (3)(4),\;\; (3)(0) - (2)(-2),\;\; (2)(4) - (-1)(0) \,\big) = (-10,\; 4,\; 8).
Example 2 — verify it's really perpendicular to both. Dot the answer back
into \vec{a} and into \vec{b} — both
should vanish:
\vec{a} \cdot (-10, 4, 8) = 2(-10) + (-1)(4) + 3(8) = -20 - 4 + 24 = 0. \;\checkmark
\vec{b} \cdot (-10, 4, 8) = 0(-10) + 4(4) + (-2)(8) = 16 - 16 = 0. \;\checkmark
Two zeros, exactly as the theorem promised — the result really is perpendicular to both
starting vectors, no matter which numbers you feed in.
Example 3 — cash in the geometric payoff: area. You never need to hunt down
the angle \theta between two vectors to find the area they span —
the length of the cross product already is that area:
\lVert \vec{a} \times \vec{b} \rVert = \sqrt{(-10)^2 + 4^2 + 8^2} = \sqrt{180} \approx 13.42.
So the parallelogram with edges \vec{a} and
\vec{b} has area \approx 13.42 square
units — one square root, and the geometry problem is solved. As a sanity check, try the same
idea on two vectors that are obviously perpendicular, like
\vec{a} = (3, 0, 0) and \vec{b} = (0, 4, 0):
the formula gives \vec{a} \times \vec{b} = (0, 0, 12), an area of
12 — exactly the 3\times 4 rectangle you'd
expect by eye.
Two things worth knowing
-
Order flips the answer. The cross product is not commutative like
ordinary multiplication or the dot product: \vec{a}\times\vec{b}
and \vec{b}\times\vec{a} have the same length but point in
opposite directions, since \vec{a}\times\vec{b} = -(\vec{b}\times\vec{a}).
Get the order backwards in a physics or graphics formula and everything points the wrong
way.
-
It's a genuinely 3-D operation. The dot product happily generalises to any
number of dimensions, but the "vector perpendicular to both inputs" trick is special to
3-D — in the plane there are two perpendicular directions to choose from (no unique
answer), and in four or more dimensions there are infinitely many. The neat component
formula above only exists in \mathbb{R}^3 (mathematicians have
found an unusual seven-dimensional cousin, but there's no cross product in 2-D, 4-D, 5-D, or
6-D at all).
Push on the end of a wrench and the bolt spins — but the same push near the bolt's head barely
does anything. Physicists capture that "twisting effectiveness" with
torque, and it is a cross product: if the force
\vec{F} is applied at position \vec{r}
relative to the pivot, the torque is
\vec{\tau} = \vec{r} \times \vec{F}.
A longer wrench (bigger \lVert\vec{r}\rVert) or a push at a bigger
angle to the handle (bigger \sin\theta) both make
\lVert\vec{\tau}\rVert = \lVert\vec{r}\rVert\lVert\vec{F}\rVert\sin\theta
larger — exactly the parallelogram-area formula again, now measuring "twist" instead of area.
The very same pattern turns up all over physics: angular momentum is
\vec{L} = \vec{r}\times\vec{p}, and the force on a charged particle
moving through a magnetic field is \vec{F} = q(\vec{v}\times\vec{B})
— which is exactly why a charged particle curves in a circle instead of pushing straight
through a magnetic field. Different letters, same cross product doing the work.
See it explained