Math Core

Lesson 1.4 · Vectors and 3D Space

The cross product

The dot product turns two vectors into a number. The cross product turns two vectors into a new vector, one that is perpendicular to both of them. That makes it the natural tool for building normal vectors to planes, computing areas and volumes, and describing rotation (torque and angular momentum). Unlike the dot product, it only works in three dimensions.

Definition

Definition

Cross product

For a=⟨a1,a2,a3⟩\mathbf{a} = \langle a_1, a_2, a_3 \rangle and b=⟨b1,b2,b3⟩\mathbf{b} = \langle b_1, b_2, b_3 \rangle, the cross product is

a×b=⟨a2b3−a3b2, a3b1−a1b3, a1b2−a2b1⟩.\mathbf{a} \times \mathbf{b} = \langle a_2 b_3 - a_3 b_2,\ a_3 b_1 - a_1 b_3,\ a_1 b_2 - a_2 b_1 \rangle.

Nobody memorizes this formula as written. Instead, use a 3×33 \times 3 determinant, expanded along the first row:

a×b=∣ijka1a2a3b1b2b3∣=∣a2a3b2b3∣i−∣a1a3b1b3∣j+∣a1a2b1b2∣k,\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \end{vmatrix} = \begin{vmatrix} a_2 & a_3 \\ b_2 & b_3 \end{vmatrix}\mathbf{i} - \begin{vmatrix} a_1 & a_3 \\ b_1 & b_3 \end{vmatrix}\mathbf{j} + \begin{vmatrix} a_1 & a_2 \\ b_1 & b_2 \end{vmatrix}\mathbf{k},

where ∣pqrs∣=ps−qr\begin{vmatrix} p & q \\ r & s \end{vmatrix} = ps - qr. (The first row contains vectors, so this is a memory device rather than a true determinant, but it gives exactly the right answer.)

Common mistake

The middle term has a minus sign. Forgetting it is the most common cross-product error. Always check your answer by dotting it with a\mathbf{a} and with b\mathbf{b}: both results must be 00.

Worked example: Computing a cross product

Find a×b\mathbf{a} \times \mathbf{b} for a=⟨2,−1,3⟩\mathbf{a} = \langle 2, -1, 3 \rangle and b=⟨1,4,−2⟩\mathbf{b} = \langle 1, 4, -2 \rangle.

Solution.

a×b=((−1)(−2)−(3)(4))i−((2)(−2)−(3)(1))j+((2)(4)−(−1)(1))k=(2−12)i−(−4−3)j+(8+1)k=⟨−10,7,9⟩.\begin{aligned} \mathbf{a} \times \mathbf{b} &= \big((-1)(-2) - (3)(4)\big)\mathbf{i} - \big((2)(-2) - (3)(1)\big)\mathbf{j} + \big((2)(4) - (-1)(1)\big)\mathbf{k} \\ &= (2 - 12)\mathbf{i} - (-4 - 3)\mathbf{j} + (8 + 1)\mathbf{k} = \langle -10, 7, 9 \rangle. \end{aligned}

Check: ⟨−10,7,9⟩⋅a=−20−7+27=0\langle -10, 7, 9 \rangle \cdot \mathbf{a} = -20 - 7 + 27 = 0 and ⟨−10,7,9⟩⋅b=−10+28−18=0\langle -10, 7, 9 \rangle \cdot \mathbf{b} = -10 + 28 - 18 = 0.

Geometry: direction and length

The check in the example is no accident. Expanding (a×b)⋅a(\mathbf{a} \times \mathbf{b}) \cdot \mathbf{a} from the definition, every term cancels, and the same happens for b\mathbf{b}. So a×b\mathbf{a} \times \mathbf{b} is orthogonal to both a\mathbf{a} and b\mathbf{b}. Of the two perpendicular directions, it points the way given by the right-hand rule: curl the fingers of your right hand from a\mathbf{a} toward b\mathbf{b} (through the smaller angle), and your thumb points along a×b\mathbf{a} \times \mathbf{b}.

a × b is perpendicular to the plane of a and b, pointing by the right-hand rule. Its length equals the area of the parallelogram spanned by a and b.

For the length, a direct (if tedious) algebraic computation gives Lagrange's identity ∣a×b∣2=∣a∣2∣b∣2−(a⋅b)2|\mathbf{a} \times \mathbf{b}|^2 = |\mathbf{a}|^2|\mathbf{b}|^2 - (\mathbf{a} \cdot \mathbf{b})^2. Substituting a⋅b=∣a∣ ∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\cos\theta gives ∣a∣2∣b∣2(1−cos⁡2θ)=∣a∣2∣b∣2sin⁡2θ|\mathbf{a}|^2|\mathbf{b}|^2(1 - \cos^2\theta) = |\mathbf{a}|^2|\mathbf{b}|^2\sin^2\theta. Since sin⁡θ≥0\sin\theta \ge 0 for 0≤θ≤π0 \le \theta \le \pi, we get the following.

Length of the cross product

If θ\theta is the angle between a\mathbf{a} and b\mathbf{b}, then

∣a×b∣=∣a∣ ∣b∣sin⁡θ,|\mathbf{a} \times \mathbf{b}| = |\mathbf{a}|\,|\mathbf{b}|\sin\theta,

which is the area of the parallelogram with sides a\mathbf{a} and b\mathbf{b}. In particular, two nonzero vectors are parallel if and only if a×b=0\mathbf{a} \times \mathbf{b} = \mathbf{0}.

The parallelogram has base ∣a∣|\mathbf{a}| and height ∣b∣sin⁡θ|\mathbf{b}|\sin\theta, which is why its area appears. A triangle with two sides a\mathbf{a} and b\mathbf{b} has half that area.

Worked example: Area of a triangle in space

Find the area of the triangle with vertices P(1,0,1)P(1, 0, 1), Q(3,2,1)Q(3, 2, 1) and R(1,3,4)R(1, 3, 4).

Solution. Two sides from PP are PQ→=⟨2,2,0⟩\overrightarrow{PQ} = \langle 2, 2, 0 \rangle and PR→=⟨0,3,3⟩\overrightarrow{PR} = \langle 0, 3, 3 \rangle. Then

PQ→×PR→=⟨2⋅3−0⋅3, 0⋅0−2⋅3, 2⋅3−2⋅0⟩=⟨6,−6,6⟩,\overrightarrow{PQ} \times \overrightarrow{PR} = \langle 2 \cdot 3 - 0 \cdot 3,\ 0 \cdot 0 - 2 \cdot 3,\ 2 \cdot 3 - 2 \cdot 0 \rangle = \langle 6, -6, 6 \rangle,

with length 36⋅3=63\sqrt{36 \cdot 3} = 6\sqrt3. The triangle's area is half of that: 333\sqrt3.

Algebraic properties

The basis vectors multiply cyclically: i×j=k\mathbf{i} \times \mathbf{j} = \mathbf{k}, j×k=i\mathbf{j} \times \mathbf{k} = \mathbf{i}, k×i=j\mathbf{k} \times \mathbf{i} = \mathbf{j}, and reversing any order flips the sign. In general:

  1. b×a=−(a×b)\mathbf{b} \times \mathbf{a} = -(\mathbf{a} \times \mathbf{b}) (anticommutative), and so a×a=0\mathbf{a} \times \mathbf{a} = \mathbf{0}.
  2. (ca)×b=c(a×b)=a×(cb)(c\mathbf{a}) \times \mathbf{b} = c(\mathbf{a} \times \mathbf{b}) = \mathbf{a} \times (c\mathbf{b}).
  3. a×(b+c)=a×b+a×c\mathbf{a} \times (\mathbf{b} + \mathbf{c}) = \mathbf{a} \times \mathbf{b} + \mathbf{a} \times \mathbf{c}, and similarly on the other side.
  4. The cross product is not associative: (i×i)×j=0(\mathbf{i} \times \mathbf{i}) \times \mathbf{j} = \mathbf{0}, but i×(i×j)=i×k=−j\mathbf{i} \times (\mathbf{i} \times \mathbf{j}) = \mathbf{i} \times \mathbf{k} = -\mathbf{j}.

The scalar triple product

Combining both products gives the scalar triple product a⋅(b×c)\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}), which is the ordinary determinant

a⋅(b×c)=∣a1a2a3b1b2b3c1c2c3∣.\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c}) = \begin{vmatrix} a_1 & a_2 & a_3 \\ b_1 & b_2 & b_3 \\ c_1 & c_2 & c_3 \end{vmatrix}.

Geometrically, ∣b×c∣|\mathbf{b} \times \mathbf{c}| is the area of the base parallelogram, and ∣a∣ ∣cos⁡φ∣|\mathbf{a}|\,|\cos\varphi| (where φ\varphi is the angle between a\mathbf{a} and b×c\mathbf{b} \times \mathbf{c}) is the height of the slanted box above it.

Volume of a parallelepiped

The parallelepiped with edges a\mathbf{a}, b\mathbf{b}, c\mathbf{c} from one vertex has volume V=∣a⋅(b×c)∣V = |\mathbf{a} \cdot (\mathbf{b} \times \mathbf{c})|. The three vectors are coplanar exactly when this triple product is 00.

Worked example: Volume and a torque

(a) Find the volume of the parallelepiped with edges a=⟨1,2,0⟩\mathbf{a} = \langle 1, 2, 0 \rangle, b=⟨0,1,3⟩\mathbf{b} = \langle 0, 1, 3 \rangle, c=⟨2,0,1⟩\mathbf{c} = \langle 2, 0, 1 \rangle. (b) A wrench handle points along r=⟨0,0.25,0⟩\mathbf{r} = \langle 0, 0.25, 0 \rangle meters from the bolt, and a force F=⟨0,0,−40⟩\mathbf{F} = \langle 0, 0, -40 \rangle newtons is applied at its end. Find the torque τ=r×F\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}.

Solution. (a) Expand along the first row:

∣120013201∣=1(1−0)−2(0−6)+0=13,\begin{vmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 2 & 0 & 1 \end{vmatrix} = 1(1 - 0) - 2(0 - 6) + 0 = 13,

so V=13V = 13 cubic units.

(b) r×F=⟨(0.25)(−40)−0⋅0, 0⋅0−0⋅(−40), 0⋅0−0.25⋅0⟩=⟨−10,0,0⟩\mathbf{r} \times \mathbf{F} = \langle (0.25)(-40) - 0 \cdot 0,\ 0 \cdot 0 - 0 \cdot (-40),\ 0 \cdot 0 - 0.25 \cdot 0 \rangle = \langle -10, 0, 0 \rangle. The torque has magnitude 1010 N·m and points along the negative xx-axis, the axis the bolt turns about. Here r⊥F\mathbf{r} \perp \mathbf{F}, so the magnitude is simply ∣r∣ ∣F∣=0.25⋅40|\mathbf{r}|\,|\mathbf{F}| = 0.25 \cdot 40.

Tip

To get a unit vector perpendicular to two given vectors, compute their cross product and divide by its length. Its negative is the other answer.

Practice

Practice 1

Compute ⟨1,2,3⟩×⟨4,5,6⟩\langle 1, 2, 3 \rangle \times \langle 4, 5, 6 \rangle.

Enter a point like (2, -3)

Practice 2

Simplify (i×j)×j(\mathbf{i} \times \mathbf{j}) \times \mathbf{j}.

Practice 3

Find the area of the parallelogram spanned by ⟨3,0,1⟩\langle 3, 0, 1 \rangle and ⟨−1,2,2⟩\langle -1, 2, 2 \rangle.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Find the area of the triangle with vertices A(1,1,1)A(1, 1, 1), B(3,2,3)B(3, 2, 3) and C(2,4,1)C(2, 4, 1).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Vectors a\mathbf{a} and b\mathbf{b} have lengths 33 and 44, and the angle between them is 30∘30^\circ. Find ∣a×b∣|\mathbf{a} \times \mathbf{b}|.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the volume of the parallelepiped with edges ⟨1,1,0⟩\langle 1, 1, 0 \rangle, ⟨0,2,1⟩\langle 0, 2, 1 \rangle and ⟨3,0,4⟩\langle 3, 0, 4 \rangle.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Find the value of kk for which ⟨1,2,−1⟩\langle 1, 2, -1 \rangle, ⟨0,1,3⟩\langle 0, 1, 3 \rangle and ⟨2,k,1⟩\langle 2, k, 1 \rangle are coplanar.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Suppose a×b=⟨2,−1,4⟩\mathbf{a} \times \mathbf{b} = \langle 2, -1, 4 \rangle. Find b×(3a)\mathbf{b} \times (3\mathbf{a}).

Enter a point like (2, -3)