Resolving a vector into its x and y components is easy, especially if the vector is already written in R2 component form.
However, sometimes we want to project the vector onto a different axis—we can use another vector to describe this axis. When I talk about the scalar projection and the vector projection of
I mean this:
Notice the subscript notation: the value of
is the vector projection of
and its magnitude is the scalar projection. To calculate the scalar projection, we can use one of our new friends, the dot product:
If we know θ, then this is easy. However, sometimes we either don’t know it or we would rather avoid rounding off trig ratios. In those cases, we should use the middle part of the equation above. And if we don’t know
b^, we can get it by normalizing
What about the vector projection? That’s easy—we just get the scalar projection and point it in the direction of b^:
Once again, we can normalize
at the same time if we want:
The special cases of the x and y axes still work with all of this. Say I want to project
onto the x axis:
A race starts at the origin and goes in a straight line until the end in the direction of
A runner started on the path but ended up straying to the point defined by
in kilometres. If she goes back to the path via the shortest route, how far along the race will she be?
If she takes the shortest route, that means her direction of travel will intersect with the path at 90º. To find her progress along the actual race, we want to project her current position onto the path:
Substituting for the known values give us
therefore she will be about 9.15 km into the race.