In precalculus you met the dot product and projections in the plane. In space they work the same way with one more term: $\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + u_3v_3$. The result is a number, and that number measures how much the two vectors point the same way.
Key idea
Why it works
For the projection, the shadow of $\mathbf{u}$ on the line of $\mathbf{v}$ has signed length $|\mathbf{u}|\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{v}|}$. To turn that length into a vector, multiply by the unit vector $\frac{\mathbf{v}}{|\mathbf{v}|}$: that is where $|\mathbf{v}|^2$ comes from.
| Scalar projection | Vector projection | |
|---|---|---|
| Formula | $\frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{v}|}$ | $\frac{\mathbf{u} \cdot \mathbf{v}}{|\mathbf{v}|^2}\mathbf{v}$ |
| What it is | a signed length (a number) | an arrow along $\mathbf{v}$ |
| Its size | $|\mathbf{u}||\cos\theta|$ | the same, $|\mathbf{u}||\cos\theta|$ |
Worked examples
Worked example: An angle
- $\mathbf{u} \cdot \mathbf{v} = 1 + 0 + 0 = 1$; $|\mathbf{u}| = |\mathbf{v}| = \sqrt{2}$.
- $\cos\theta = \frac{1}{\sqrt{2}\sqrt{2}} = \frac{1}{2}$.
- $\theta = 60^\circ$ (or $\frac{\pi}{3}$).
Answer: ${}60^\circ$
Worked example: Both projections
- $\mathbf{u} \cdot \mathbf{v} = 4 + 10 - 2 = 12$ and $|\mathbf{v}| = 3$.
- Scalar projection: $\frac{12}{3} = 4$.
- Vector projection: $\frac{12}{9}\langle 1, 2, 2 \rangle = \left\langle \frac{4}{3}, \frac{8}{3}, \frac{8}{3} \right\rangle$, which has length ${}4$.
- Check: what is left, $\mathbf{u} - \operatorname{proj}_{\mathbf{v}}\mathbf{u} = \left\langle \frac{8}{3}, \frac{7}{3}, -\frac{11}{3} \right\rangle$, is orthogonal to $\mathbf{v}$: $\frac{8 + 14 - 22}{3} = 0$.
Answer: $\operatorname{comp}_{\mathbf{v}}\mathbf{u} = 4$, $\operatorname{proj}_{\mathbf{v}}\mathbf{u} = \left\langle \frac{4}{3}, \frac{8}{3}, \frac{8}{3} \right\rangle$
Worked example: Work
- Only the part of the force along the motion does work: $W = \mathbf{F} \cdot \mathbf{D}$.
- $\mathbf{D} = \langle 3, 4, 1 \rangle$, so $W = 6 + 0 + 5 = 11$ J.
Answer: ${}11$ J
Common mistake