A projection answers the question “how much of a points in the direction of b?” Think of the shadow a casts on the line of b when a light shines straight down onto that line. Projections are how you find the part of a force that pulls along a ramp, the part of the wind that pushes a boat forward, or the part of a pull that does work, and they come straight from the dot product.
Place a and b tail to tail. Drop a perpendicular from the tip of a to the line containing b. The arrow from the common tail to the foot of that perpendicular is the projection of a onto b.
The projection of a onto b (green). It points along b when θ is acute, and the opposite way when θ is obtuse.
The scalar projection of a onto b is the signed length of that shadow. From the right triangle, it’s ∣a∣cosθ. Multiply and divide by ∣b∣ to write it with the dot product:
scalar projection of a onto b=∣a∣cosθ=∣b∣a⋅b
It’s positive when θ is acute (the shadow points along b), negative when θ is obtuse (it points the opposite way), and 0 when the vectors are perpendicular.
Any vector a can be split into a part parallel to b and a part perpendicular to b:
a=parallel to bprojba+perpendicular to b(a−projba)
You can check your work: the perpendicular part should have a dot product of 0 with b. This split is exactly what you do with a force on a ramp: one part along the slope, one part pressing into it.
The direction angles of a vector v=[a,b,c] are the angles α, β, γ it makes with the positive x-, y-, and z-axes. Dot v with i=[1,0,0] and you get a=∣v∣cosα, and likewise for the others, so the direction cosines are
cosα=∣v∣a,cosβ=∣v∣b,cosγ=∣v∣c
They’re the components of the unit vector in the direction of v, so cos2α+cos2β+cos2γ=1. Each component a, b, c is just the scalar projection of v onto an axis.
Work.W=F⋅d is the scalar projection of F onto d (the useful part of the force) times the distance ∣d∣.
Forces on a slope. On a ramp inclined at angle θ, gravity Fg (pointing straight down) splits into a part along the ramp, of size ∣Fg∣sinθ, and a part into the ramp, of size ∣Fg∣cosθ. Example 4 does this with projections.
The dot product is negative, so the angle between a and b is obtuse. The shadow of a falls behind the tail, and the projection points in the direction opposite to b (it’s a negative multiple of b), like the right-hand diagram above.
A 40 kg box rests on a ramp inclined at 20∘. Gravity pulls down on it with a force of 40×9.8=392 N. Find the component of gravity along the ramp and the component pressing into the ramp, to the nearest newton.
Gravity (blue) splits into a part along the ramp (green) and a part into the ramp (orange).
Solution. Use axes with x horizontal and y vertical. Gravity is F=[0,−392]. A unit vector pointing up the ramp is u=[cos20∘,sin20∘], and a unit vector pointing out of the ramp (perpendicular to it) is n=[−sin20∘,cos20∘]. Since both are unit vectors, the scalar projections are just dot products:
F⋅uF⋅n=0−392sin20∘≈−134 N=0−392cos20∘≈−368 N
So about 134 N of gravity acts down the ramp (negative means opposite to “up the ramp”), and about 368 N presses into the ramp. The ramp pushes back with 368 N, and friction or a person has to supply 134 N up the slope to stop the box sliding.
Check: 134.072+368.362≈392 ✓. These match 392sin20∘ and 392cos20∘ from the diagram.
Dividing by the wrong magnitude. The projection of aontob divides by ∣b∣ (or b⋅b), the vector you’re projecting onto. Dividing by ∣a∣ gives the projection of b onto a, which is a different answer.
Forgetting to square in the vector projection.projba=∣b∣2a⋅bb, with ∣b∣squared. One factor of ∣b∣ gives the scalar projection; the second one turns b into a unit vector.
Mixing up the scalar and the vector projection. The scalar projection is a number (possibly negative). The vector projection is a vector along the line of b. If a question asks for “the projection” as a vector, give components.
Dropping the negative sign. A negative scalar projection isn’t an error. It tells you the angle is obtuse and the projection points opposite to b. Don’t take the absolute value unless you’re asked for a length.
Swapping sine and cosine on a ramp. The part of gravity along a slope of angle θ is ∣Fg∣sinθ, not cosθ. Sense check: on a nearly flat ramp (θ close to 0∘), almost nothing pulls the box along it, and sinθ is close to 0.
2. (Warm-up)∣a∣=10, ∣b∣=4, and the angle between them is 150∘. Find the scalar projection of a onto b. Does the vector projection point the same way as b or the opposite way?
Solution∣a∣cosθ=10cos150∘=10(−23)=−53≈−8.66
It’s negative (the angle is obtuse), so the vector projection points opposite to b.
3. (Core) Let a=[1,3,−2] and b=[2,−1,2].
(a) Find the scalar and vector projections of a onto b.
(b) Find the scalar and vector projections of b onto a.
Check: [6.48,8.64]⋅[4,−3]=25.92−25.92=0. ✓ So F=[3.52,−2.64]+[6.48,8.64].
5. (Core)
(a) Find the direction angles of [1,−1,1], to one decimal place.
(b) A vector makes an angle of 60∘ with the x-axis and 45∘ with the y-axis, and an acute angle with the z-axis. Find that angle.
Solution
(a) The magnitude is 3, so cosα=31, cosβ=−31, cosγ=31. That gives α≈54.7∘, β≈125.3∘, γ≈54.7∘.
(b) Use cos2α+cos2β+cos2γ=1:
cos2γ=1−(21)2−(22)2=1−41−21=41
γ is acute, so cosγ=21 and γ=60∘.
6. (Core) A sailboat is heading northeast. The wind pushes on its sail with a force of F=[300,400] N, where the components are east and north. Taking the boat’s heading as the direction d=[1,1], find the component of the wind’s force along the heading, to the nearest newton.
Solution
This is the scalar projection of F onto d:
∣d∣F⋅d=2300+400=2700≈495 N
7. (Core) A 50 N force pulls a cart 12 m along a straight track. The force acts at 40∘ to the track. Find the scalar projection of the force onto the direction of motion, and use it to find the work done, each to one decimal place.
Solution
Scalar projection: 50cos40∘≈38.3 N. That’s the part of the force pulling along the track.
Work: W=50cos40∘×12≈459.6 J. (The same as ∣F∣∣d∣cosθ.)
8. (Challenge) Let A(1,0,2), B(4,4,2), and C(1,6,10).
(a) Find the scalar projection of AB onto AC.
(b) Find the point D on the line AC that is closest to B (the foot of the perpendicular from B).
(c) Find the distance from B to the line AC, to two decimal places.
Solution
AB=[3,4,0] and AC=[0,6,8], so AB⋅AC=0+24+0=24 and ∣AC∣=10.
(a) Scalar projection: 1024=2.4.
(b) The vector projection is 10024[0,6,8]=[0,1.44,1.92]. Starting at A:
D=(1+0,0+1.44,2+1.92)=(1,1.44,3.92)
(c) The distance is the length of the perpendicular part, DB=AB−[0,1.44,1.92]=[3,2.56,−1.92]:
∣DB∣=9+6.5536+3.6864=19.24≈4.39
Check: [3,2.56,−1.92]⋅[0,6,8]=0+15.36−15.36=0. ✓
9. (Challenge) Show that for any non-zero scalar k, the vector projection of a onto kb is the same as the vector projection of a onto b. What happens to the scalar projection when k is negative? Explain why this makes sense.
For k<0, ∣k∣k=−1, so the scalar projection changes sign. That makes sense: kb lies on the same line as b, so the shadow of a on that line is the same and the vector projection doesn’t change. But the scalar projection measures the shadow as positive or negative relative to the direction of the vector you project onto, and a negative k flips that direction.