Dot Product and Cross Product in 3D
Key Terms
- Dot product (algebraic)
- a · b = a₁b₁ + a₂b₂ + a₃b₃. The result is a scalar.
- Dot product (geometric)
- a · b = |a||b|cosθ, where θ is the angle between the vectors (0 ≤ θ ≤ π).
- Perpendicularity test
- a ⊥ b ⇔ a · b = 0 (provided neither is the zero vector).
- Projection
- The scalar projection of a onto b is (a · b)/|b|. The vector projection is [(a · b)/|b|²]b.
- Cross product
- a × b is a vector computed via the 3×3 determinant with i, j, k in the first row:
- a × b = (a₂b₃ − a₃b₂)i − (a₁b₃ − a₃b₁)j + (a₁b₂ − a₂b₁)k
- Cross product magnitude
- |a × b| = |a||b|sinθ ≥ 0.
- Perpendicularity
- a × b is perpendicular to both a and b.
- Area of parallelogram
- with sides a and b: Area = |a × b|.
- Area of triangle
- with sides a and b: Area = ½|a × b|.
- Anti-commutativity
- a × b = −(b × a).
- Dot product: a · b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b|cosθ
- Angle: cosθ = (a · b) / (|a||b|)
- Cross product: a × b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁)
- |a × b| = |a||b|sinθ
- Area of parallelogram = |a × b|; Area of triangle = ½|a × b|
Worked Example 1 — Angle between two vectors
Find the angle between a = (1, 2, 2) and b = (0, 3, 4).
a · b = (1)(0) + (2)(3) + (2)(4) = 0 + 6 + 8 = 14
|a| = √(1 + 4 + 4) = √9 = 3
|b| = √(0 + 9 + 16) = √25 = 5
cosθ = 14 / (3 × 5) = 14/15
θ = cos−1(14/15) ≈ 21.1°
Worked Example 2 — Cross product
Find a × b where a = (1, 2, 3) and b = (4, 5, 6).
a × b = ( (2)(6) − (3)(5) )i − ( (1)(6) − (3)(4) )j + ( (1)(5) − (2)(4) )k
= (12 − 15)i − (6 − 12)j + (5 − 8)k
= −3i + 6j − 3k = (−3, 6, −3)
Verify perpendicularity: a · (a × b) = (1)(−3) + (2)(6) + (3)(−3) = −3 + 12 − 9 = 0 ✓
The Dot Product: Measuring How “Aligned” Two Vectors Are
The dot product of two vectors a and b quantifies how much they point in the same direction. Algebraically, it is computed component-wise: a · b = a₁b₁ + a₂b₂ + a₃b₃. The result is a scalar — there is no direction attached to it. Geometrically, a · b = |a||b|cosθ, where θ is the angle between the vectors when placed tail-to-tail.
When θ = 90°, cosθ = 0, so a · b = 0 regardless of the magnitudes. This gives the elegant perpendicularity test: two non-zero vectors are perpendicular if and only if their dot product is zero. This is one of the most-used results in all of 3D geometry.
Geometric Interpretation: Projection
The scalar projection of a onto b is the signed length of the shadow that a casts in the direction of b:
- Scalar projection: compₛa = (a · b) / |b|
- Vector projection: projₛa = [(a · b) / |b|²]b
Projections appear in physics (component of force along a direction), computer graphics (shading), and geometry (finding the closest point on a line to a given point).
The Cross Product: A Vector Perpendicular to Both
Unlike the dot product, the cross product a × b produces a vector. It is defined only in three dimensions and is computed as the determinant:
|i j k |
|a₁ a₂ a₃|
|b₁ b₂ b₃|
Expanding: a × b = (a₂b₃ − a₃b₂)i − (a₁b₃ − a₃b₁)j + (a₁b₂ − a₂b₁)k.
The resulting vector is perpendicular to both a and b. Its direction is given by the right-hand rule: point your fingers from a towards b and your thumb points in the direction of a × b.
The Right-Hand Rule
To find the direction of a × b: align your right hand with a, curl your fingers toward b, and your thumb points in the direction of a × b. Reversing the order gives b × a = −(a × b), pointing in the opposite direction.
Magnitude and Area
The magnitude |a × b| = |a||b|sinθ equals the area of the parallelogram formed by a and b. This is because the area of a parallelogram is base × height = |b| × |a|sinθ. The area of the triangle with sides a and b is half of this.
This geometric interpretation makes the cross product essential in: finding normal vectors to planes, computing areas of triangular surfaces, and determining if three points are collinear (cross product of two edges = 0).
Normal Vectors to a Plane
If two vectors u and v lie in a plane, then n = u × v is a normal to that plane. This is used to find the equation of a plane through three points: compute two edge vectors, take their cross product to get n, then use the point-normal form.
Mastery Practice
-
Compute the dot product a · b for each pair. Fluency
- (a) a = (2, 3, −1), b = (1, −2, 4)
- (b) a = (0, 5, 2), b = (3, 0, −1)
- (c) a = (4, −1, 2), b = (2, 4, 1)
-
Find the angle θ between each pair of vectors. Give your answer in degrees, correct to one decimal place. Fluency
- (a) a = (1, 0, 1), b = (0, 1, 1)
- (b) a = (2, 1, −2), b = (1, 2, 2)
-
Determine whether each pair of vectors is perpendicular. Fluency
- (a) u = (3, −2, 1), v = (1, 2, 1)
- (b) u = (1, 4, −2), v = (2, −1, 1)
- (c) u = (2, 0, −3), v = (3, 1, 2)
-
Find the cross product a × b for each pair. Fluency
- (a) a = (1, 0, 0), b = (0, 1, 0)
- (b) a = (2, 1, −1), b = (1, 3, 2)
-
Find the area of the parallelogram with adjacent sides a = (1, 3, −2) and b = (2, 1, 4). Understanding
-
Find the area of the triangle with vertices A = (1, 0, 0), B = (0, 2, 0), C = (0, 0, 3). Understanding
-
Find a unit vector that is perpendicular to both a = (1, 1, 0) and b = (0, 1, 1). Understanding
-
Find the value of k such that a = (k, 2, −1) and b = (3, k, 4) are perpendicular. Understanding
-
Show that the vectors a = (3, −1, 2), b = (1, 4, 1) and c = (5, −6, 3) satisfy a × b = c up to sign. Hence find the area of the parallelogram formed by a and b. Problem Solving
-
Two forces F₁ = (2, −3, 1) N and F₂ = (1, 2, −4) N act at a point. Find: (a) the angle between the forces, (b) a vector perpendicular to both forces. Problem Solving