The dot product
Compute the dot product of two vectors in space, use it to find the angle between them, test for a right angle, and find how much of one vector lies along another, including direction angles and work.
It opens on
A sailboat heads one way while the wind blows another. The wind has a push in three directions, but only the part along the heading drives the boat. How do we measure that part, and what is the angle between wind and heading?
Why it matters
Later lessons measure how much of a gradient points in a direction, find distances to planes and compute work along paths, and each of them is a dot product or a projection.
Good to know first
- Vectors in space: the vector between two points, components, magnitude, and unit vectors
- The dot product: angle between vectors and projections from precalculus, where a · b = a₁b₁ + a₂b₂ gives a number, a · b = |a||b| cos θ, perpendicular when 0, and the scalar and vector projection
Step by step
The dot product and the angle
Compute w · b by components, connect it to |w||b| cos θ, and find the angle between two vectors in space.
The wind's dot product with the heading is w · b = 8·4 + 1·3 + 4·0 = 32 + 3 + 0 = 35, one number, not an arrow.
A common mix-up
The dot product is a vector ⟨32, 3, 0⟩, or the cosine is just the dot product.
In fact: It is the sum 35, one number, and cos θ needs division by both lengths: 7/9.
Right angles and the wind's shadow
Test for orthogonality with the dot product and compute scalar and vector projections of the wind onto the heading.
c · b = 3·4 + (−4)·3 + 5·0 = 12 − 12 + 0 = 0, so the crosswind does not push the boat.
A common mix-up
A zero dot product needs a zero vector, or the vector projection is ((w · b)/|b|) b.
In fact: c · b = 0 for two nonzero arrows, and the vector projection divides by |b|², giving length 7, not 35.
Direction angles and work
Describe a vector's direction by its angles with the axes, and compute the work done by the wind over a displacement.
For w = ⟨8, 1, 4⟩ with |w| = 9: cos α = 8/9, cos β = 1/9, cos γ = 4/9, so α ≈ 27.3°, β ≈ 83.6°, γ ≈ 63.6°.
A common mix-up
Work is |F||d|, force times distance, whatever the direction.
In fact: Only the part of F along d counts, W = |F||d| cos θ = 70, not 9 × 10 = 90.
Try it
For w₂ = ⟨3, 0, 4⟩ and b = ⟨4, 3, 0⟩ find the dot product and the angle.Answer
12; cos θ = 12/25, θ ≈ 61.3°
Hint: Both lengths are 5
Find the scalar projection of ⟨3, 0, 4⟩ onto ⟨4, 3, 0⟩.Answer
12/5
Hint: The dot product is 12 and |b| = 5
Find the direction cosines of ⟨2, 3, 6⟩.Answer
2/7, 3/7, 6/7
Hint: |⟨2, 3, 6⟩| = 7
If the wind blew exactly along b, how much would push the boat, and if exactly across it?Answer
All of |w|; none.
Can a dot product be 0 when neither vector is the zero vector?Answer
Yes; c and b are both long, yet c · b = 0.
