Skip to main content

Vector projection: scalar projection and vector projection of one vector onto another

Syllabus dot point

“Compute the scalar and vector projection of one vector onto another and interpret it geometrically”

HSCMaths Extension 1Vectors (ME-V1)13 min read

Quick answer

To project a\mathbf{a} onto b\mathbf{b}, drop a perpendicular from the head of a\mathbf{a} to the line of b\mathbf{b}. The scalar projection is the signed length a⋅b∣b∣\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|}; the vector projection is the shadow vector a⋅b∣b∣2b\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\mathbf{b}. Subtracting the vector projection from a\mathbf{a} gives the perpendicular component, splitting a\mathbf{a} into parts parallel and perpendicular to b\mathbf{b}.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Exam-style questions

What this dot point is asking

NESA wants you to find the shadow of one vector on another: the scalar projection (the signed length of that shadow) and the vector projection (the shadow as a vector), and to interpret them as the part of one vector that lies along the direction of the other. The same idea, run once more, splits any vector into a part parallel to a chosen direction and a part perpendicular to it, which is the move behind resolving forces and a string of geometric proofs.

The answer

Picture both vectors starting at a point OO. To project a\mathbf{a} onto b\mathbf{b}, shine a light straight down onto the line of b\mathbf{b} and read off the shadow of a\mathbf{a}. Formally, drop a perpendicular from the head of a\mathbf{a} to the line through b\mathbf{b}: the shadow runs from OO to the foot of that perpendicular. Building this up one stage at a time is the clearest way to see where every formula comes from.

Stage 1, the two vectors. Draw a\mathbf{a} and b\mathbf{b} from the same point OO. We are going to project a\mathbf{a} onto the direction of b\mathbf{b}, so b\mathbf{b} sets the direction and a\mathbf{a} is the vector being projected.

Stage 1: the two vectors Vectors a and b drawn from a common point O. We will project a onto the direction of b. b a O We will project a onto the direction of b.

Stage 2, drop a perpendicular. From the head of a\mathbf{a}, drop a line straight down onto the line of b\mathbf{b}. It meets that line at a right angle at the foot FF. This perpendicular is the key construction; the right-angle marker is what makes the projection "the closest point of b\mathbf{b}'s line to the head of a\mathbf{a}".

Stage 2: drop a perpendicular from the head of a A perpendicular is dropped from the head of a onto the line of b, meeting it at the foot F with a right angle marked. b a F O Drop a perpendicular from the head of a; it meets b's line at F.

Stage 3, the vector projection. The arrow from OO to FF, heavy below, is the vector projection of a\mathbf{a} onto b\mathbf{b}. It points along b\mathbf{b} (or directly opposite, if the angle is obtuse) and reaches exactly as far as the shadow of a\mathbf{a}.

Stage 3: the vector projection is O to F The segment from O to the foot F, drawn heavy, is the vector projection of a onto b. b a proj of a on b F O

Stage 4, the parallel and perpendicular split. The original a\mathbf{a}, the projection (from OO to FF) and the dropped perpendicular (from FF to the head of a\mathbf{a}) form a right triangle. So a\mathbf{a} is the sum of a parallel part (the vector projection, along b\mathbf{b}) and a perpendicular part (at right angles to b\mathbf{b}). That decomposition is what "resolve a\mathbf{a} into components" means.

Stage 4: a splits into parallel and perpendicular parts Vector a is the sum of its vector projection onto b (the parallel part, from O to F) and the perpendicular part (from F to the head of a). The three vectors form a right triangle. b a parallel part perpendicular part F O

Scalar projection

The scalar projection of a\mathbf{a} onto b\mathbf{b} is the signed length of that shadow (the length OFOF, with a sign):

proj⁡bscalara=a⋅b∣b∣=∣a∣cos⁡θ,\operatorname{proj}_{\mathbf{b}}^{\text{scalar}} \mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|} = |\mathbf{a}| \cos \theta,

where θ\theta is the angle between a\mathbf{a} and b\mathbf{b}. The two forms agree because a⋅b=∣a∣∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta, and dividing by ∣b∣|\mathbf{b}| leaves ∣a∣cos⁡θ|\mathbf{a}|\cos\theta, which is the adjacent side of the right triangle in Stage 4. The sign is positive when the angle is acute (the shadow points along b\mathbf{b}) and negative when it is obtuse (the shadow points the opposite way).

Vector projection

The vector projection of a\mathbf{a} onto b\mathbf{b} is the shadow as an actual vector (the arrow OF→\overrightarrow{OF}):

proj⁡ba=a⋅b∣b∣2 b=(a⋅b∣b∣)b^.\operatorname{proj}_{\mathbf{b}} \mathbf{a} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\,\mathbf{b} = \left(\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|}\right)\hat{\mathbf{b}}.

Read it as "scalar projection times the unit vector b^\hat{\mathbf{b}}": take the signed length, then point it along b\mathbf{b}. Writing b/∣b∣2\mathbf{b}/|\mathbf{b}|^2 rolls the two steps into one, which is why the formula has ∣b∣2|\mathbf{b}|^2 (one ∣b∣|\mathbf{b}| turns the length into the right size, the other normalises b\mathbf{b}).

Key fact

For non-zero b\mathbf{b}:

scalar projection=a⋅b∣b∣  (a signed number),vector projection=a⋅b∣b∣2 b  (a vector).\textbf{scalar projection} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|} \;(\text{a signed number}), \qquad \textbf{vector projection} = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2}\,\mathbf{b} \;(\text{a vector}).

Note the denominators: ∣b∣|\mathbf{b}| for the scalar, ∣b∣2|\mathbf{b}|^2 for the vector. The numerator is the same dot product a⋅b\mathbf{a} \cdot \mathbf{b} both times, so compute it once. The magnitude of the vector projection equals the absolute value of the scalar projection.

The parallel and perpendicular decomposition

Stage 4 says it in symbols. Any vector a\mathbf{a} splits uniquely into a part along b\mathbf{b} and a part at right angles to b\mathbf{b}:

a=proj⁡ba⏟parallel to b+a⊥⏟perpendicular to b,a⊥=a−proj⁡ba.\mathbf{a} = \underbrace{\operatorname{proj}_{\mathbf{b}} \mathbf{a}}_{\text{parallel to } \mathbf{b}} + \underbrace{\mathbf{a}_{\perp}}_{\text{perpendicular to } \mathbf{b}}, \qquad \mathbf{a}_{\perp} = \mathbf{a} - \operatorname{proj}_{\mathbf{b}} \mathbf{a}.

The slick way to get the perpendicular part is to find the vector projection first, then subtract it from a\mathbf{a}; what is left over must be perpendicular to b\mathbf{b}. You can always check by dotting the leftover with b\mathbf{b} and getting 00.

Two edge cases worth knowing

  • If a\mathbf{a} is already parallel to b\mathbf{b}, the shadow is all of a\mathbf{a}: proj⁡ba=a\operatorname{proj}_{\mathbf{b}} \mathbf{a} = \mathbf{a} and the perpendicular part is 0\mathbf{0}.
  • If a\mathbf{a} is perpendicular to b\mathbf{b}, then a⋅b=0\mathbf{a} \cdot \mathbf{b} = 0, so both projections are zero: there is no shadow.

A common simplification: if b\mathbf{b} is a unit vector (∣b∣=1|\mathbf{b}| = 1), the formulas collapse to scalar projection =a⋅b= \mathbf{a} \cdot \mathbf{b} and vector projection =(a⋅b) b= (\mathbf{a} \cdot \mathbf{b})\,\mathbf{b}.

How exam questions ask about projection

  • "Find the scalar projection of a\mathbf{a} onto b\mathbf{b}" or "the component of a\mathbf{a} in the direction of b\mathbf{b}": compute a⋅b∣b∣\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|} (a number, possibly negative).
  • "Find the vector projection of a\mathbf{a} onto b\mathbf{b}" or "the projection vector": compute a⋅b∣b∣2b\frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{b}|^2}\mathbf{b} (a vector).
  • "Resolve a\mathbf{a} into components parallel and perpendicular to b\mathbf{b}": the parallel part is the vector projection; the perpendicular part is a\mathbf{a} minus it.
  • "Find the component of the force in the direction of motion": a projection of the force onto the direction vector (resolve forces).
  • "Find the distance from a point to a line": often the magnitude of the perpendicular part of a displacement onto the line's direction.
Exam technique

Compute a⋅b\mathbf{a} \cdot \mathbf{b} and ∣b∣2|\mathbf{b}|^2 once, then read off whichever projection is asked, scalar uses ∣b∣|\mathbf{b}|, vector uses ∣b∣2|\mathbf{b}|^2. Read the question word for word: "scalar"/"component"/"how far along" wants a number; "vector projection"/"the shadow"/"resolve into" wants a vector. Keep the answer exact (leave 95(1,2)\frac{9}{5}(1,2) rather than decimalising) unless told otherwise. For a "resolve" question, finish with the two checks markers love: dot the perpendicular part with b\mathbf{b} to confirm it is 00, and add the two parts to confirm they rebuild a\mathbf{a}. A negative scalar projection is not an error, it means the shadow points opposite to b\mathbf{b}, so say so.

Worked example

Compute both projections when the target is a unit vector

Find the scalar and vector projections of a=(3,4)\mathbf{a} = (3, 4) onto b=(1,0)\mathbf{b} = (1, 0). Because ∣b∣=1|\mathbf{b}| = 1, the formulas simplify: the scalar projection is just a⋅b\mathbf{a}\cdot\mathbf{b}, and the vector projection is that scalar times b\mathbf{b}:

a⋅b=3⋅1+4⋅0=3,∣b∣=1.\mathbf{a}\cdot\mathbf{b} = 3\cdot 1 + 4\cdot 0 = 3, \qquad |\mathbf{b}| = 1.

scalar projection=31=3,vector projection=312(1,0)=(3,0).\text{scalar projection} = \frac{3}{1} = 3, \qquad \text{vector projection} = \frac{3}{1^2}(1, 0) = (3, 0).

Geometrically, projecting onto the xx-axis keeps the xx-component and drops the yy-component.

Project onto a diagonal direction

Find the vector projection of a=(4,2)\mathbf{a} = (4, 2) onto b=(1,1)\mathbf{b} = (1, 1). Now ∣b∣2=2|\mathbf{b}|^2 = 2, not 11, so use the full formula:

a⋅b=4+2=6,∣b∣2=12+12=2,proj⁡ba=62(1,1)=3(1,1)=(3,3).\mathbf{a}\cdot\mathbf{b} = 4 + 2 = 6, \qquad |\mathbf{b}|^2 = 1^2 + 1^2 = 2, \qquad \operatorname{proj}_{\mathbf{b}}\mathbf{a} = \frac{6}{2}(1, 1) = 3(1, 1) = (3, 3).

Find the perpendicular component by subtraction

Find the component of a=(4,2)\mathbf{a} = (4, 2) perpendicular to b=(1,1)\mathbf{b} = (1, 1). Subtract the parallel part (the vector projection just found) from a\mathbf{a}:

a⊥=a−proj⁡ba=(4,2)−(3,3)=(1,−1).\mathbf{a}_{\perp} = \mathbf{a} - \operatorname{proj}_{\mathbf{b}}\mathbf{a} = (4, 2) - (3, 3) = (1, -1).

Check: (1,−1)⋅(1,1)=1−1=0(1, -1)\cdot(1, 1) = 1 - 1 = 0, perpendicular confirmed, and (3,3)+(1,−1)=(4,2)=a(3,3) + (1,-1) = (4,2) = \mathbf{a}.

Apply projection to find the effective force in a given direction

A force F=(10,5)\mathbf{F} = (10, 5) N acts on an object constrained to move in the direction d=(3,4)\mathbf{d} = (3, 4). The effective force is the component of F\mathbf{F} along d\mathbf{d}, the vector projection:

F⋅d=30+20=50,∣d∣2=9+16=25,proj⁡dF=5025(3,4)=2(3,4)=(6,8) N.\mathbf{F}\cdot\mathbf{d} = 30 + 20 = 50, \qquad |\mathbf{d}|^2 = 9 + 16 = 25, \qquad \operatorname{proj}_{\mathbf{d}}\mathbf{F} = \frac{50}{25}(3, 4) = 2(3, 4) = (6, 8)\ \text{N}.

Interpret a negative scalar projection

Find the scalar projection of a=(−1,2)\mathbf{a} = (-1, 2) onto b=(3,0)\mathbf{b} = (3, 0). Compute the dot product and divide by ∣b∣|\mathbf{b}|:

a⋅b=−3+0=−3,∣b∣=3,scalar projection=−33=−1.\mathbf{a}\cdot\mathbf{b} = -3 + 0 = -3, \qquad |\mathbf{b}| = 3, \qquad \text{scalar projection} = \frac{-3}{3} = -1.

The negative sign means a\mathbf{a} has a component pointing opposite to b\mathbf{b}. The shadow has length 11 but lies on the far side of OO.

Use projection for a distance from a point to a line

Find the perpendicular distance from P=(4,2)P = (4, 2) to the line through OO in the direction b=(1,1)\mathbf{b} = (1, 1). The displacement is OP→=(4,2)\overrightarrow{OP} = (4, 2); its perpendicular part to b\mathbf{b} was found above to be (1,−1)(1, -1), so the distance is

∣a⊥∣=∣(1,−1)∣=12+(−1)2=2.|\mathbf{a}_{\perp}| = |(1, -1)| = \sqrt{1^2 + (-1)^2} = \sqrt{2}.

Common traps
Confusing scalar and vector projection
"Scalar" wants a number; "vector" wants a vector. Re-read the wording before answering.
∣b∣|\mathbf{b}| versus ∣b∣2|\mathbf{b}|^2
The scalar projection divides by ∣b∣|\mathbf{b}|; the vector projection divides by ∣b∣2|\mathbf{b}|^2. Mixing them is the most common slip.
Dropping the sign
The scalar projection can be negative (obtuse angle). The magnitude of the projection is the unsigned length; do not silently make it positive.
Projecting the wrong way round
proj⁡ba\operatorname{proj}_{\mathbf{b}}\mathbf{a} (project a\mathbf{a} onto b\mathbf{b}) is generally not proj⁡ab\operatorname{proj}_{\mathbf{a}}\mathbf{b}. Check which vector sets the direction.
Treating a⋅b\mathbf{a} \cdot \mathbf{b} as the scalar projection
They are equal only when ∣b∣=1|\mathbf{b}| = 1. In general the scalar projection is a⋅b\mathbf{a} \cdot \mathbf{b} divided by ∣b∣|\mathbf{b}|.

Exam-style questions

Questions in the style of NESA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

HSC-style3 marks
Find the vector projection of a=(5,2)\mathbf{a} = (5, 2) onto b=(1,2)\mathbf{b} = (1, 2).
Show worked answer →

Vector projection is a⋅b∣b∣2b\frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{b}|^2} \mathbf{b}.

a⋅b=(5)(1)+(2)(2)=5+4=9\mathbf{a} \cdot \mathbf{b} = (5)(1) + (2)(2) = 5 + 4 = 9.

∣b∣2=12+22=5|\mathbf{b}|^2 = 1^2 + 2^2 = 5.

Projection =95(1,2)=(95,185)= \frac{9}{5} (1, 2) = \left( \frac{9}{5}, \frac{18}{5} \right).

HSC-style4 marks
Resolve a=(4,7)\mathbf{a} = (4, 7) into a component parallel to b=(2,1)\mathbf{b} = (2, 1) and a component perpendicular to b\mathbf{b}.
Show worked answer →

a⋅b=(4)(2)+(7)(1)=8+7=15\mathbf{a} \cdot \mathbf{b} = (4)(2) + (7)(1) = 8 + 7 = 15, and ∣b∣2=22+12=5|\mathbf{b}|^2 = 2^2 + 1^2 = 5.

Parallel component (vector projection): 155(2,1)=3(2,1)=(6,3)\frac{15}{5} (2, 1) = 3 (2, 1) = (6, 3).

Perpendicular component: a−(6,3)=(4−6, 7−3)=(−2,4)\mathbf{a} - (6, 3) = (4 - 6, \, 7 - 3) = (-2, 4).

Check: (−2,4)⋅(2,1)=−4+4=0(-2, 4) \cdot (2, 1) = -4 + 4 = 0, so it is perpendicular to b\mathbf{b}. And (6,3)+(−2,4)=(4,7)=a(6, 3) + (-2, 4) = (4, 7) = \mathbf{a}.

Practise this

Sources & how we know this

ExamExplained