Vector Projection Formula
What you'll learn: How to project one vector onto another and derive the formula that computes this projection.
The Core Idea
Imagine shining a light directly above a stick lying on the ground—the shadow cast is like a "projection." In vector terms, the vector projection of vector u onto vector v tells us how much of u lies in the direction of v. It's the "shadow" of u along the line defined by v.
We already learned that the scalar projection gives us a single number—the signed length of this shadow. The vector projection goes one step further: it gives us the actual vector that points along v with that length.
Deriving the Formula
Start with the scalar projection of u onto v:
comp_v(u) = (u · v) / ||v||
This tells us how far along v our projection extends. To turn this into a vector pointing in the direction of v, we multiply by the unit vector in the direction of v:
proj_v(u) = comp_v(u) * (v / ||v||)
Substitute the scalar projection:
proj_v(u) = [(u · v) / ||v||] * (v / ||v||)
= (u · v) / ||v||² * v
Final Formula:
proj_v(u) = [(u · v) / (v · v)] * v
Or equivalently: proj_v(u) = [(u · v) / ||v||²] v
Why It Works
The dot product u · v captures how aligned u and v are. Dividing by ||v||² normalizes this contribution, and multiplying by v ensures the result points along v.
Key Takeaway: The vector projection formula proj_v(u) = [(u · v) / ||v||²] v gives the component of u in the direction of v as an actual vector.