Projection of a vector on a line

Point a lamp straight down on a tilted stick and look at the shadow it casts on the floor — that shadow's length tells you how much of the stick "acts along" the floor's direction. The projection of a vector on a line asks exactly this question for vectors: given a⃗\vec a and a direction (a line, or another vector b⃗\vec b), how much of a⃗\vec a lies along that direction? In CBSE Class 12 this sits inside the Vector Algebra chapter, immediately after the scalar (dot) product a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec a\cdot\vec b=|\vec a||\vec b|\cos\theta. The syllabus treats projection as something the dot product gives you for free, not a new formula to memorise separately — once you know the dot product, one line of algebra produces both the scalar projection (a number) and the vector projection (an actual vector). This article expands the core rules, walks a derivation, and solves a full worked example so the idea is exam-ready, not just definition-ready.

The core insight

The scalar projection of a⃗\vec a on b⃗\vec b is a⃗⋅b⃗∣b⃗∣\dfrac{\vec a\cdot\vec b}{|\vec b|} — the dot-product definition rearranged, nothing more.

The core idea

1. Projection on a unit vector. If a line's direction is given by a unit vector n^\hat n (so ∣n^∣=1|\hat n|=1), the scalar projection of a⃗\vec a on that line is simply

Projection of a⃗ on n^=a⃗⋅n^=∣a⃗∣cos⁡θ,\text{Projection of }\vec a\text{ on }\hat n = \vec a\cdot\hat n = |\vec a|\cos\theta,

where: θ\theta is the angle between a⃗\vec a and n^\hat n. This is the length of the "shadow" a⃗\vec a casts on the line — positive if the shadow falls forward along n^\hat n, negative if it falls backward.

2. Projection on a general vector. Most exam questions give a direction as an ordinary vector b⃗\vec b, not a ready-made unit vector. Convert first: b^=b⃗/∣b⃗∣\hat b=\vec b/|\vec b|, and then

Scalar projection of a⃗ on b⃗=a⃗⋅b^=a⃗⋅b⃗∣b⃗∣.\text{Scalar projection of }\vec a\text{ on }\vec b = \vec a\cdot\hat b = \frac{\vec a\cdot\vec b}{|\vec b|}.

where: a⃗⋅b⃗\vec a\cdot\vec b is the dot product of the two vectors and ∣b⃗∣=b12+b22+b32|\vec b|=\sqrt{b_1^2+b_2^2+b_3^2} is the magnitude of b⃗\vec b. Note there is exactly one factor of ∣b⃗∣|\vec b| in the denominator here — this is the single most common place marks are lost.

3. Sign tells you the angle. The projection can be positive, negative, or zero: positive when θ\theta is acute, negative when θ\theta is obtuse, and exactly zero when a⃗⊥b⃗\vec a\perp\vec b (since cos⁡90∘=0\cos 90^\circ=0). A negative answer is not a mistake — it is information.

4. Vector projection. Sometimes you need the actual shadow vector, not just its length. Multiply the scalar projection by the unit vector b^\hat b:

Vector projection of a⃗ on b⃗=(a⃗⋅b⃗∣b⃗∣)b^=(a⃗⋅b⃗∣b⃗∣2)b⃗.\text{Vector projection of }\vec a\text{ on }\vec b = \left(\frac{\vec a\cdot\vec b}{|\vec b|}\right)\hat b = \left(\frac{\vec a\cdot\vec b}{|\vec b|^2}\right)\vec b.

where: the extra factor of ∣b⃗∣|\vec b| appears because b^\hat b itself contains a 1/∣b⃗∣1/|\vec b| — so the vector projection formula carries ∣b⃗∣2|\vec b|^2 in the denominator, while the scalar projection carries only ∣b⃗∣|\vec b|. Keeping this distinction straight is the whole game.

Figure
A slanted arrow casts a shorter shadow arrow along a horizontal line, illustrating scalar projection as the length of that shadow
Projection is the shadow a vector casts on a line line (direction b) a scalar projection of a on b theta
Derivation AScalar projection from the dot-product definition

The goal is to show that the scalar-projection formula a⃗⋅b⃗∣b⃗∣\dfrac{\vec a\cdot\vec b}{|\vec b|} is not a separate law to memorise but a direct one-line rearrangement of the dot-product definition a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec a\cdot\vec b=|\vec a||\vec b|\cos\theta, so that in an exam you can rebuild it from scratch even if the name slips your mind.

Step 1. Start from the definition of the dot product between any two vectors a⃗\vec a and b⃗\vec b: a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec a\cdot\vec b=|\vec a||\vec b|\cos\theta, where θ\theta is the angle between them. This is the only fact being used — nothing about projection has been assumed yet.

Step 2. Isolate ∣a⃗∣cos⁡θ|\vec a|\cos\theta, which is precisely the length of the shadow a⃗\vec a casts along the direction of b⃗\vec b (drop a perpendicular from the tip of a⃗\vec a onto the line of b⃗\vec b; the adjacent side of that right triangle has length ∣a⃗∣cos⁡θ|\vec a|\cos\theta). Dividing both sides of the dot-product definition by ∣b⃗∣|\vec b| gives a⃗⋅b⃗∣b⃗∣=∣a⃗∣cos⁡θ\dfrac{\vec a\cdot\vec b}{|\vec b|}=|\vec a|\cos\theta.

Step 3. Recognise the right-hand side as the scalar projection of a⃗\vec a on b⃗\vec b, so Projection=a⃗⋅b⃗∣b⃗∣\text{Projection}=\dfrac{\vec a\cdot\vec b}{|\vec b|}. If b⃗\vec b happens to already be a unit vector, ∣b⃗∣=1|\vec b|=1 and the formula collapses to the simpler a⃗⋅b^\vec a\cdot\hat b seen above — the two forms are the same rule at different levels of tidiness.

Step 4. To get the vector projection, multiply this scalar length by the unit vector in b⃗\vec b's direction, b^=b⃗/∣b⃗∣\hat b=\vec b/|\vec b|: (a⃗⋅b⃗∣b⃗∣)⋅b⃗∣b⃗∣=a⃗⋅b⃗∣b⃗∣2b⃗\left(\dfrac{\vec a\cdot\vec b}{|\vec b|}\right)\cdot\dfrac{\vec b}{|\vec b|}=\dfrac{\vec a\cdot\vec b}{|\vec b|^2}\vec b, which is exactly the vector-projection formula. Every step used only the dot-product definition and basic algebra — no independent geometric assumption was needed.

Worked example

Find the scalar projection of a⃗=3i^−4j^+5k^\vec a = 3\hat i - 4\hat j + 5\hat k on the vector b⃗=2i^+j^−2k^\vec b = 2\hat i + \hat j - 2\hat k, then find the vector projection, and confirm the two are consistent.

Step 1. Compute the dot product: a⃗⋅b⃗=(3)(2)+(−4)(1)+(5)(−2)=6−4−10=−8\vec a\cdot\vec b = (3)(2)+(-4)(1)+(5)(-2) = 6-4-10 = -8.

Step 2. Compute the magnitude of b⃗\vec b: ∣b⃗∣=22+12+(−2)2=4+1+4=9=3|\vec b| = \sqrt{2^2+1^2+(-2)^2} = \sqrt{4+1+4} = \sqrt{9} = 3.

Step 3. Scalar projection: a⃗⋅b⃗∣b⃗∣=−83\dfrac{\vec a\cdot\vec b}{|\vec b|} = \dfrac{-8}{3}. The projection is −83-\dfrac{8}{3}, negative because a⃗⋅b⃗<0\vec a\cdot\vec b<0 — the angle between a⃗\vec a and b⃗\vec b is obtuse.

Step 4. Vector projection: divide by ∣b⃗∣2=9|\vec b|^2=9 instead and multiply by b⃗\vec b: (−89)(2i^+j^−2k^)=−169i^−89j^+169k^\left(\dfrac{-8}{9}\right)\left(2\hat i+\hat j-2\hat k\right) = -\dfrac{16}{9}\hat i-\dfrac{8}{9}\hat j+\dfrac{16}{9}\hat k.

Step 5. Check consistency: the magnitude of this vector should equal ∣−83∣=83\left|-\dfrac{8}{3}\right|=\dfrac{8}{3}. Indeed (169)2+(89)2+(169)2=19256+64+256=19576=249=83\sqrt{\left(\dfrac{16}{9}\right)^2+\left(\dfrac{8}{9}\right)^2+\left(\dfrac{16}{9}\right)^2} = \dfrac{1}{9}\sqrt{256+64+256} = \dfrac{1}{9}\sqrt{576} = \dfrac{24}{9} = \dfrac{8}{3}. The scalar projection is −83-\dfrac{8}{3} and the vector projection is −169i^−89j^+169k^-\dfrac{16}{9}\hat i-\dfrac{8}{9}\hat j+\dfrac{16}{9}\hat k, and their magnitudes agree, confirming the two formulas are consistent.

Common traps

  • Dividing by ∣b⃗∣|\vec b| twice, or not at all. Scalar projection needs exactly one factor of ∣b⃗∣|\vec b| in the denominator; vector projection needs ∣b⃗∣2|\vec b|^2 because a second copy of b^=b⃗/∣b⃗∣\hat b=\vec b/|\vec b| is being multiplied in.
  • Assuming the answer must be positive. A negative scalar projection is completely valid — it simply signals an obtuse angle between the two vectors.
  • Swapping which vector is "on" which. Projection of a⃗\vec a on b⃗\vec b generally differs from projection of b⃗\vec b on a⃗\vec a, because although a⃗⋅b⃗\vec a\cdot\vec b is symmetric, dividing by ∣b⃗∣|\vec b| versus ∣a⃗∣|\vec a| gives different numbers.
  • Skipping the unit-vector step for a "line." Projection onto a line means projection onto that line's direction (a unit vector); plugging a non-unit vector straight into a⃗⋅b⃗\vec a\cdot\vec b without dividing by its magnitude gives the wrong quantity entirely.

Ask the tutor: if you want to see why dividing by ∣b⃗∣2|\vec b|^2 instead of ∣b⃗∣|\vec b| turns a scalar projection into a vector projection, ask the AI tutor to walk through it with your own numbers.

Why does the vector projection formula have magnitude of b squared, but the scalar one only has magnitude of b once?

Because the vector projection is built in two stages. First you get the scalar projection, a⃗⋅b⃗∣b⃗∣\dfrac{\vec a\cdot\vec b}{|\vec b|}, which is just a number (a length). Then, to turn that length into a vector pointing along b⃗\vec b, you multiply it by the unit vector b^=b⃗/∣b⃗∣\hat b=\vec b/|\vec b|. That second step contributes one more factor of 1/∣b⃗∣1/|\vec b|, and when you write b^\hat b back in terms of b⃗\vec b itself, the two factors of ∣b⃗∣|\vec b| combine into ∣b⃗∣2|\vec b|^2 in the denominator. So the extra power is not a new rule — it is bookkeeping from converting a unit vector into the original vector b⃗\vec b.

Is projection of a on b the same as projection of b on a?

Not in general. The dot product a⃗⋅b⃗\vec a\cdot\vec b is the same either way — dot products are symmetric. But the projection formula divides that dot product by the magnitude of whichever vector you are projecting onto: projection of a⃗\vec a on b⃗\vec b divides by ∣b⃗∣|\vec b|, while projection of b⃗\vec b on a⃗\vec a divides by ∣a⃗∣|\vec a|. Unless ∣a⃗∣=∣b⃗∣|\vec a|=|\vec b|, these two divisions give different numbers. Always check which vector is named as the line or direction — that is the one whose magnitude goes in the denominator.

Do I need to memorise the projection formula separately from the dot product?

No, and that is exactly the point CBSE is making by placing this topic right after the dot product. Start from a⃗⋅b⃗=∣a⃗∣∣b⃗∣cos⁡θ\vec a\cdot\vec b=|\vec a||\vec b|\cos\theta, and dividing both sides by ∣b⃗∣|\vec b| immediately isolates ∣a⃗∣cos⁡θ|\vec a|\cos\theta, the scalar projection. Rebuilding the formula this way under exam pressure is safer than trying to recall it as an isolated fact, and it also stops you from accidentally mixing up the scalar and vector projection expressions.

Before this

Where this leads