1.6 - The vector product

1.6 - The vector product

The vector product turns two directions into a vector perpendicular to both. You will learn its direction and component form, then use its magnitude to find areas, calculate point-to-line distances and recognise parallel vectors.

A perpendicular vector

Two arrows lie on a flat board: one points three units east and the other four units north. Can we combine them to produce an arrow pointing out of the board? The scalar product cannot do this because its answer is a number. The vector product, also called the cross product, produces a vector.

Use the standard right-handed unit vectors i,j,k\mathbf i,\mathbf j,\mathbf k. Turning from i\mathbf i towards j\mathbf j through the smaller angle gives the positive k\mathbf k direction. Consequently,

(3i)×(4j)=12k.(3\mathbf i)\times(4\mathbf j)=12\mathbf k.

The magnitude is the product of the two lengths because these particular arrows are perpendicular.

[DIAGRAM: asset_name: Cross product orientation; asset_slug: cam9231-cross-orientation; caption: A right-handed turn from a to b fixes the direction of their cross product; description: Exact oblique projection of positive x, y and z axes. A blue vector a of length 3 lies along positive x, a sage vector b of length 4 lies along positive y, and their cross product points along positive z. A pale parallelogram in the xy plane has area 12. A separate note states that reversing the order reverses the perpendicular vector.]
A right-handed turn from a to b fixes the direction of their cross product

Vector product

For nonzero, nonparallel vectors a\mathbf a and b\mathbf b, let θ\theta be their angle, with 0<θ<π0<\theta<\pi. The vector a×b\mathbf a\times\mathbf b is perpendicular to both. Its direction follows the right-hand rule: curl the fingers of your right hand from a\mathbf a towards b\mathbf b through θ\theta; your thumb gives the direction.

The perpendicular has two possible senses. The order of the vectors chooses one of them. In particular, i×j=k\mathbf i\times\mathbf j=\mathbf k, j×k=i\mathbf j\times\mathbf k=\mathbf i and k×i=j\mathbf k\times\mathbf i=\mathbf j. Reversing any pair changes the sign.

Geometric vector product

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

where n^\widehat{\mathbf n} is the right-hand unit normal. If either vector is zero, or the vectors are parallel or antiparallel, their cross product is 0\mathbf0; there is then no distinguished normal direction.

Not in the formula booklet: learn it.

For example, vectors of lengths 55 and 66 separated by 30∘30^\circ have cross-product magnitude 5×6sin⁡30∘=155\times6\sin30^\circ=15. Changing the angle to 150∘150^\circ leaves the magnitude 1515, but the actual direction still depends on the ordered vectors in space. A magnitude alone never identifies a vector.

Watch out

The cross product is not commutative: b×a=−a×b\mathbf b\times\mathbf a=-\mathbf a\times\mathbf b. The scalar product is commutative and produces a number; these are different operations.

Check both the operation and its orientation.

Calculating a cross product

Components let you find a normal without having to visualise a turn in space. The cyclic unit-vector products above, together with distributivity, give a formula whose signs you can check using scalar products.

Component vector product

For a=(a1,a2,a3)\mathbf a=(a_1,a_2,a_3) and b=(b1,b2,b3)\mathbf b=(b_1,b_2,b_3),

a×b=(a2b3−a3b2a3b1−a1b3a1b2−a2b1).\mathbf a\times\mathbf b= \begin{pmatrix} a_2b_3-a_3b_2\\ a_3b_1-a_1b_3\\ a_1b_2-a_2b_1 \end{pmatrix}.

A determinant layout with first row i,j,k\mathbf i,\mathbf j,\mathbf k is a useful mnemonic; its middle cofactor has a minus sign.

Not in the formula booklet: learn it.

The output must have zero scalar product with each input. Expanding, for example, a⋅(a×b)\mathbf a\cdot(\mathbf a\times\mathbf b) gives six terms that cancel in pairs. This explains perpendicularity and provides a quick numerical check.

Worked example 1: calculating and checking a normal

Question. Find a×b\mathbf a\times\mathbf b for a=(1,2,0)\mathbf a=(1,2,0) and b=(0,1,3)\mathbf b=(0,1,3).

Plan. Calculate the three components, then check both scalar products.

a×b=(2(3)−0(1)0(0)−1(3)1(1)−2(0))=(6−31).\begin{aligned} \mathbf a\times\mathbf b &=\begin{pmatrix}2(3)-0(1)\\0(0)-1(3)\\1(1)-2(0)\end{pmatrix}\\ &=\begin{pmatrix}6\\-3\\1\end{pmatrix}. \end{aligned}

Each component uses the other two coordinate positions in cyclic order.

Answer. a×b=(6,−3,1)\mathbf a\times\mathbf b=(6,-3,1).

Check. (1,2,0)⋅(6,−3,1)=6−6=0(1,2,0)\cdot(6,-3,1)=6-6=0, and (0,1,3)⋅(6,−3,1)=−3+3=0(0,1,3)\cdot(6,-3,1)=-3+3=0. The result is perpendicular to both inputs.

Now reverse only the order. This checks the sign rule as well as your component arithmetic.

Worked example 2: reversing the inputs

Question. For the same vectors, calculate b×a\mathbf b\times\mathbf a.

Plan. Apply the component formula with b\mathbf b first, then compare with the previous answer.

b×a=(1(0)−3(2)3(1)−0(0)0(2)−1(1))=(−63−1).\mathbf b\times\mathbf a =\begin{pmatrix}1(0)-3(2)\\3(1)-0(0)\\0(2)-1(1)\end{pmatrix} =\begin{pmatrix}-6\\3\\-1\end{pmatrix}.

Answer. b×a=(−6,3,−1)\mathbf b\times\mathbf a=(-6,3,-1).

Check. This is the negative of (6,−3,1)(6,-3,1), as the geometric definition requires. Both lengths are 46\sqrt{46}, and both scalar-product checks are still zero.

Perpendicularity detects many arithmetic errors, but it cannot distinguish a correct cross product from its negative. Keep the input order when checking orientation.

Watch out

The middle component is a3b1−a1b3a_3b_1-a_1b_3. Writing a1b3−a3b1a_1b_3-a_3b_1 reverses only that component and usually destroys perpendicularity.

Try a pair with no zero component in the first vector.

Area, distance and parallelism

The cross product measures the area swept out by two adjacent sides. A parallelogram with side lengths ∣a∣,∣b∣|\mathbf a|,|\mathbf b| has height ∣b∣sin⁡θ|\mathbf b|\sin\theta, so its area is exactly ∣a×b∣|\mathbf a\times\mathbf b|. A triangle on the same sides has half that area.

Areas from side vectors

Aparallelogram=∣a×b∣,Atriangle=12∣a×b∣.A_{\text{parallelogram}}=|\mathbf a\times\mathbf b|, \qquad A_{\text{triangle}}=\tfrac12|\mathbf a\times\mathbf b|.

The vectors must represent two sides from the same vertex, rather than arbitrary position vectors.

Not in the formula booklet: learn it.

This also explains the zero case. For two nonzero vectors, a×b=0\mathbf a\times\mathbf b=\mathbf0 if and only if sin⁡θ=0\sin\theta=0, so they are parallel or antiparallel. If one vector is zero, the cross product is still zero, but it has no direction; do not describe the zero vector as defining a line.

The same area gives a perpendicular distance. Take a line through AA, with position vector a\mathbf a, in a nonzero direction u\mathbf u. For a point with position vector q\mathbf q, the parallelogram with sides q−a\mathbf q-\mathbf a and u\mathbf u has base length ∣u∣|\mathbf u|. Its height is the perpendicular distance to the line. Divide its cross-product area by that base length.

Distance from a point to a line

For the infinite line r=a+tu\mathbf r=\mathbf a+t\mathbf u, where t∈Rt\in\mathbb R and u≠0\mathbf u\ne\mathbf0, the distance from the point with position vector q\mathbf q is

d=∣(q−a)×u∣∣u∣.d=\frac{|(\mathbf q-\mathbf a)\times\mathbf u|}{|\mathbf u|}.

Not in the formula booklet: learn it.

The foot can lie anywhere on the infinite line. For the distance to a finite segment, first check whether the foot lies within the segment; otherwise the nearest point is an endpoint. A point already on the line gives cross product zero and distance zero.

Worked example 3: a parallelogram area

Question. A parallelogram has adjacent side vectors u=(2,1,0)\mathbf u=(2,1,0) and v=(1,0,2)\mathbf v=(1,0,2). Find its exact area.

Plan. Find the cross product and then its magnitude.

u×v=(2,−4,−1)A=22+(−4)2+(−1)2=21.\begin{aligned} \mathbf u\times\mathbf v&=(2,-4,-1)\\ A&=\sqrt{2^2+(-4)^2+(-1)^2}=\sqrt{21}. \end{aligned}

Answer. The area is 21\sqrt{21} square units.

Check. Independently, ∣u∣2=∣v∣2=5|\mathbf u|^2=|\mathbf v|^2=5 and u⋅v=2\mathbf u\cdot\mathbf v=2. Thus A2=∣u∣2∣v∣2−(u⋅v)2=25−4=21A^2=|\mathbf u|^2|\mathbf v|^2-(\mathbf u\cdot\mathbf v)^2=25-4=21, using sin⁡2θ=1−cos⁡2θ\sin^2\theta=1-\cos^2\theta.

Change the shape to a triangle, keeping exactly the same side vectors but moving their shared vertex away from the origin. Its height will also give a point-to-line distance.

Worked example 4: position vectors are not side vectors

Question. Points P=(1,1,1)P=(1,1,1), Q=(3,2,1)Q=(3,2,1) and R=(2,1,3)R=(2,1,3) are given. Find the area of triangle PQRPQR and the perpendicular distance from RR to the line through P,QP,Q.

Plan. Form two side vectors from PP; use their cross-product magnitude for the area and divide it by the base length for the distance.

PQ→=(2,1,0),PR→=(1,0,2).\overrightarrow{PQ}=(2,1,0),\qquad \overrightarrow{PR}=(1,0,2).

These are the vectors in Worked example 3, so

A=1221.A=\tfrac12\sqrt{21}.

The base PQPQ has length 22+12=5\sqrt{2^2+1^2}=\sqrt5, giving the perpendicular distance

d=215=215.d=\frac{\sqrt{21}}{\sqrt5}=\sqrt{\frac{21}{5}}.

Answer. The area is 21/2\sqrt{21}/2 square units and the distance from RR to line PQPQ is 21/5\sqrt{21/5} units.

Check. Its base has length 5\sqrt5. The component of PR→\overrightarrow{PR} along the base has length 2/52/\sqrt5, giving height 5−4/5=21/5\sqrt{5-4/5}=\sqrt{21/5}. Hence 12×5×21/5=21/2\tfrac12\times\sqrt5\times\sqrt{21/5}=\sqrt{21}/2.

If the two side vectors had instead been (2,1,0)(2,1,0) and (6,3,0)(6,3,0), their cross product would be zero: the three vertices would be collinear and the triangle degenerate. A nonzero cross product proves both non-collinearity and the existence of a plane normal. This is how the arrow pointing out of our opening board will help describe planes.

Problem-solving

For three points, form two joining vectors from a common point. Their cross product gives a normal; its magnitude gives twice the triangle's area. Dividing that magnitude by one side length gives the distance to the line along that side.

Use the same cross product for two geometric measurements.