Vector projection in HSC Mathematics Extension 2: the scalar projection, the vector projection, resolving a vector into parallel and perpendicular components, and the distance from a point to a line in 3D
“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”
The scalar projection of onto is , a signed length. The vector projection is , the part of parallel to . The perpendicular component is , and the two components sum back to . The length of the perpendicular component is the distance from a point to a line.
Jump to a section
What this dot point is asking
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 points along ), the vector projection (the actual vector component of along ), and use these to split into a part parallel to and a part perpendicular to . 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 and with , the scalar projection of onto measures the signed length of the shadow casts on the line through . Since , the scalar projection is
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 , namely . Thus
This is a vector, parallel to , representing the component of lying along . Its magnitude equals the absolute value of the scalar projection, and its direction is along (or against it, when the scalar projection is negative). Geometrically, to project onto you drop a perpendicular from the head of to the line carrying and read off the arrow from to the foot. In three dimensions the picture is the same, with the perpendicular now dropping through space.
For non-zero :
The numerator is the same dot product both times, so compute it once. Note the denominators: for the scalar, for the vector. The magnitude of the vector projection equals the absolute value of the scalar projection.
Resolving a vector into components
Every vector can be split into a part parallel to and a part perpendicular to :
The perpendicular component is genuinely perpendicular to . Checking the scalar product confirms it,
since . The slick way to get the perpendicular part is therefore to find the vector projection first, then subtract it from ; 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 is already parallel to , the shadow is all of : and the perpendicular part is .
- If is perpendicular to , then , so both projections are zero: there is no shadow.
A common simplification: if is a unit vector (), the formulas collapse to scalar projection and vector projection . Because both projections depend only on the direction of , scaling leaves the projection of onto it unchanged.
Distance from a point to a line
The perpendicular component is what makes the distance from a point to a line accessible. The shortest distance is the length of the perpendicular dropped from 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 with direction , and an external point . We want the shortest distance from to the line.
Stage 2, drop the perpendicular. From , the perpendicular to the line meets it at the foot . There are two equivalent ways to find . Either project onto to get , so ; or write and impose , which gives one equation for . Both encode the same condition: the connector to is perpendicular to the direction.
Stage 3, read off the distance. The shortest distance is the length of the perpendicular. Equivalently, it is the magnitude of the perpendicular component of relative to , that is .
How exam questions ask about projection
- "Find the scalar projection of onto " or "the component of in the direction of ": compute (a number, possibly negative).
- "Find the vector projection of onto " or "the projection vector": compute (a vector).
- "Show that is perpendicular to ": this is the standard HSC phrasing of the perpendicular component; dot it with and get .
- "Resolve into components parallel and perpendicular to ": the parallel part is the vector projection; the perpendicular part is minus it.
- "Find the shortest (perpendicular) distance from the point to the line": find the foot via the projection or the condition, then report .
- "Find the component of the force in the direction of motion": a projection of the force onto the direction vector.
Compute and once, then read off whichever projection is asked: scalar uses , vector uses . Read the wording word for word: "scalar"/"component"/"how far along" wants a number; "vector projection"/"the shadow"/"resolve into" wants a vector. Keep answers exact (leave rather than decimalising) unless told otherwise. For a "resolve" question, finish with the two checks markers reward: dot the perpendicular part with to confirm it is , and add the two parts to confirm they rebuild . For a distance-to-line question, state clearly that the perpendicular gives the shortest distance and either set or use the perpendicular component; carry all three coordinates throughout.
Project one vector onto another and resolve into components
Project onto , finding the vector projection, the scalar projection, and the perpendicular component.
Compute the dot product: The dot product measures how much of lies along the direction of . It appears in the numerator of both projection formulas, so we calculate it first:
Find the squared magnitude of : The vector projection divides by , not . Computing the squared magnitude directly avoids an unnecessary square root at this stage:
Compute the vector projection: Substituting into gives the component of that lies exactly along :
Compute the scalar projection: The scalar projection divides the same dot product by rather than , giving a signed length. Rationalising puts it in surd form:
Find the perpendicular component: Subtract the vector projection from to isolate the part orthogonal to :
Verify perpendicularity: Confirm :
Final answer: vector projection , scalar projection , perpendicular component .
Find the distance from a point to a line in 3D
Find the shortest distance from to the line , which passes through with direction .
Find the displacement from A to P: The point on the line we anchor to is . The displacement is
Project onto the direction : The vector projection is the part of along the line. Compute the dot product and :
So the parallel component is
Subtract to get the perpendicular component: The perpendicular component is minus its projection:
The distance is the magnitude of the perpendicular component: The shortest distance from to the line is :
Verify perpendicularity: As a check, the perpendicular component should be orthogonal to :
Final answer: the shortest distance is .
Dividing by instead of in the vector projection. The vector projection has in the denominator. Only the scalar projection divides by .
Projecting onto the wrong vector. and are different vectors. Read carefully which is projected onto which.
Dropping the sign of the scalar projection. A negative scalar projection means points partly against . Reporting only the magnitude loses information.
For a distance, reporting the parallel length instead of the perpendicular length. The shortest distance is the magnitude of the perpendicular component, , not the projection itself.
Forgetting the perpendicular check. Confirming (or ) catches arithmetic slips immediately.
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.
2024 HSC-style3 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 HSC-style1 markConsider 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.
The answer is A.