How do we resolve one vector along the direction of another, and what do the scalar and vector projections measure geometrically?
Compute the projection of one vector onto another, distinguishing the scalar projection from the vector projection, and resolve a vector into parallel and perpendicular components
A focused answer to the HSC Maths Extension 2 dot point on vector projection. The scalar projection as a signed length, the vector projection formula, the parallel and perpendicular split in three dimensions, and the distance from a point to a line built up stage by stage, with verified worked examples and diagrams.
✦ Generated by Claude Opus 4.8·13 min answer·
Reviewed by: AI editorial process; not yet individually human-reviewed
NESA wants you to project one vector onto the direction of another. You must compute the scalar projection (a signed number measuring how much of a points along b), the vector projection (the actual vector component of a along b), and use these to split a into a part parallel to b and a part perpendicular to b. In Extension 2 this runs in three dimensions and is the engine behind one headline application: the shortest distance from a point to a line.
The scalar projection
Given vectors a and b with b=0, the scalar projection of a onto b measures the signed length of the shadow a casts on the line through b. Since a⋅b=∣a∣∣b∣cosθ, the scalar projection is
scalar projection=∣a∣cosθ=∣b∣a⋅b.
It is positive when the angle θ between the vectors is acute, zero when they are perpendicular, and negative when θ is obtuse. The sign carries genuine information about direction, so it must not be silently dropped.
The vector projection
The vector projection is the scalar projection multiplied by the unit vector in the direction of b, namely b^=∣b∣b. Thus
projba=(∣b∣a⋅b)∣b∣b=∣b∣2a⋅bb=b⋅ba⋅bb.
This is a vector, parallel to b, representing the component of a lying along b. Its magnitude equals the absolute value of the scalar projection, and its direction is along b (or against it, when the scalar projection is negative). Geometrically, to project a onto b you drop a perpendicular from the head of a to the line carrying b and read off the arrow from O to the foot. In three dimensions the picture is the same, with the perpendicular now dropping through space.
Resolving a vector into components
Every vector a can be split into a part parallel to b and a part perpendicular to b:
a=a∥+a⊥,a∥=projba,a⊥=a−projba.
The perpendicular component is genuinely perpendicular to b. Checking the scalar product confirms it,
a⊥⋅b=a⋅b−∣b∣2a⋅b(b⋅b)=a⋅b−a⋅b=0,
since b⋅b=∣b∣2. The slick way to get the perpendicular part is therefore to find the vector projection first, then subtract it from a; what is left over must be perpendicular. This decomposition is the foundation for resolving forces in mechanics and for the distance from a point to a line.
Two edge cases worth knowing
If a is already parallel to b, the shadow is all of a: projba=a and the perpendicular part is 0.
If a is perpendicular to b, then a⋅b=0, so both projections are zero: there is no shadow.
A common simplification: if b is a unit vector (∣b∣=1), the formulas collapse to scalar projection =a⋅b and vector projection =(a⋅b)b. Because both projections depend only on the direction of b, scaling b leaves the projection of a onto it unchanged.
Distance from a point to a line
The perpendicular component is what makes the distance from a point P to a line accessible. The shortest distance is the length of the perpendicular dropped from P to the line, because any slanted segment to the line is the hypotenuse of a right triangle with the perpendicular as one leg, hence longer. Build the construction up one stage at a time.
Stage 1, the line and the point. Take a line through a known point A with direction d, and an external point P. We want the shortest distance from P to the line.
Stage 2, drop the perpendicular. From P, the perpendicular to the line meets it at the foot F. There are two equivalent ways to find F. Either project AP onto d to get AF=projdAP, so F=A+AF; or write F=A+λd and impose FP⋅d=0, which gives one equation for λ. Both encode the same condition: the connector to P is perpendicular to the direction.
Stage 3, read off the distance. The shortest distance is the length ∣FP∣ of the perpendicular. Equivalently, it is the magnitude of the perpendicular component of AP relative to d, that is AP−projdAP.
How exam questions ask about projection
"Find the scalar projection of a onto b" or "the component of a in the direction of b": compute ∣b∣a⋅b (a number, possibly negative).
"Find the vector projection of a onto b" or "the projection vector": compute ∣b∣2a⋅bb (a vector).
"Show that a−b⋅ba⋅bb is perpendicular to b": this is the standard HSC phrasing of the perpendicular component; dot it with b and get 0.
"Resolve a into components parallel and perpendicular to b": the parallel part is the vector projection; the perpendicular part is a minus it.
"Find the shortest (perpendicular) distance from the point P to the line": find the foot F via the projection or the FP⋅d=0 condition, then report ∣FP∣.
"Find the component of the force in the direction of motion": a projection of the force onto the direction vector.
Exam-style practice questions
Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
2024 HSC3 marksThe vector a is (1, 2, 3) and the vector b is (2, 0, -4). (i) Find (a . b / (b . b)) b. (ii) Show that a - (a . b / (b . b)) b is perpendicular to b.
Show worked answer →
The expression (a . b / (b . b)) b is the vector projection of a onto b; subtracting it from a leaves the component of a perpendicular to b.
Part (i). Compute the dot products: a . b = (1)(2) + (2)(0) + (3)(-4) = 2 + 0 - 12 = -10. b . b = (2)^2 + 0^2 + (-4)^2 = 4 + 0 + 16 = 20.
So a . b / (b . b) = -10/20 = -1/2, and the projection is
(-1/2)(2, 0, -4) = (-1, 0, 2).
Part (ii). The perpendicular component is a - (-1, 0, 2) = (1 - (-1), 2 - 0, 3 - 2) = (2, 2, 1).
Check it is perpendicular to b by taking the dot product: (2, 2, 1) . (2, 0, -4) = (2)(2) + (2)(0) + (1)(-4) = 4 + 0 - 4 = 0.
Since the dot product is 0, a - (a . b / (b . b)) b is perpendicular to b.
Mark notes: part (i) 1 mark for the projection (-1, 0, 2). Part (ii): 1 mark for the perpendicular component (2, 2, 1), 1 mark for showing its dot product with b is 0.
2021 HSC1 marksConsider the two non-zero complex numbers z and w as vectors. Which of the following expressions is the projection of z onto w? A. (Re(z times conjugate of w)/|w|^2) w. B. (z/|w|) w. C. Re(z/w) w. D. (Re(z)/|w|^2) w.
Show worked answer →
The vector projection of one vector onto another is (dot product divided by the squared length of the target) times the target: proj = ((z . w)/(w . w)) w.
When complex numbers are treated as vectors, the dot product z . w equals Re(z times conjugate of w), and w . w = |w|^2.
Substituting gives proj = (Re(z times conjugate of w)/|w|^2) w, which is option A.
Options B, C and D do not give a real scalar multiple equal to the projection coefficient (Re(z times conjugate of w))/|w|^2, so they are incorrect.