PYQ Vault

NDA Maths · Vectors

Magnitude, Components, Projection, Direction Cosines

How to measure a vector's length, decompose it along axes, project it onto another vector, and read off the angles it makes with the coordinate axes.

Why this matters

This is where you learn to MEASURE vectors. How long is one (its magnitude)? At what angles to the coordinate axes does it point (its direction cosines)? How much of one vector lies along another (its scalar projection)? And how do you build a unit vector pointing exactly where you want it? Each of these turns the geometric arrow from the foundations into a number you can compute with. 11 PYQs across 2018–2024, almost entirely EASY or MODERATE — the formulas are short and the trap surface is narrow, so it's also the lowest-hanging-fruit subtopic in the chapter.

Test yourself — a quick 12-question Vectors recall quiz, instant score.

Concept 1 of 4: Magnitude of a vector and distance between two points

The magnitude of a vector is its length — extended Pythagoras applied to its components. The distance between two points is the magnitude of the displacement vector joining them, which is also why AB→=b⃗−a⃗\overrightarrow{AB}=\vec{b}-\vec{a}: subtract the tail's position vector from the head's.

Definition

If v⃗=v1i^+v2j^+v3k^\vec{v} = v_1\hat{i} + v_2\hat{j} + v_3\hat{k}, then ∣v⃗∣=v12+v22+v32|\vec{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2}. For two points A,BA, B with position vectors a⃗,b⃗\vec{a}, \vec{b}: AB→=b⃗−a⃗\overrightarrow{AB} = \vec{b} - \vec{a} and AB=∣b⃗−a⃗∣AB = |\vec{b} - \vec{a}|.

Magnitude and distance

∣v⃗∣=v12+v22+v32AB=∣b⃗−a⃗∣|\vec{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2} \qquad AB = |\vec{b} - \vec{a}|
  • v1,v2,v3v_1, v_2, v_3components of v⃗\vec{v} along i^,j^,k^\hat{i}, \hat{j}, \hat{k}
  • a⃗,b⃗\vec{a}, \vec{b}position vectors of the endpoints

Diagram · magnitude = √(x² + y²)

x = 4y = 3|v| = 5

The components x and y are the legs of a right triangle; the vector is the hypotenuse, so |v| = √(x² + y²) = √(16 + 9) = 5. In 3-D the same idea adds a third leg: |v| = √(x² + y² + z²).

Worked example

Position vectors of points AA and BB are a⃗=2i^+j^−k^\vec{a} = 2\hat{i} + \hat{j} - \hat{k} and b⃗=5i^+5j^+11k^\vec{b} = 5\hat{i} + 5\hat{j} + 11\hat{k}. Find the length ABAB.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2019 · Q67Easy

Example 1 · Vectors · Magnitude, Components, Projection, and Direction Cosines

If the position vectors of points A and B are 3i^−2j^+k^3\hat{i}-2\hat{j}+\hat{k} and 2i^+4j^−3k^2\hat{i}+4\hat{j}-3\hat{k} respectively, then what is the length of AB→\overrightarrow{AB}?

AB→\overrightarrow{AB} is b⃗−a⃗\vec{b} - \vec{a} — head minus tail

Reverse the subtraction and you get BA→\overrightarrow{BA} — the magnitude is the same but the displacement points the other way. Direction matters whenever the result feeds into a dot product or angle.

Lagrange identity gives you the missing magnitude

Whenever a question gives ∣a⃗×b⃗∣2+(a⃗⋅b⃗)2=k|\vec{a}\times\vec{b}|^2 + (\vec{a}\cdot\vec{b})^2 = k together with one magnitude, use the identity ∣a⃗∣2∣b⃗∣2=∣a⃗×b⃗∣2+(a⃗⋅b⃗)2|\vec{a}|^2|\vec{b}|^2 = |\vec{a}\times\vec{b}|^2 + (\vec{a}\cdot\vec{b})^2 to read the other magnitude off directly. (The same identity is the central formula of a⃗×b⃗\vec{a}\times\vec{b} magnitude work — see the cross-product note.)

Concept 2 of 4: Direction Cosines

If a vector makes angles α,β,γ\alpha, \beta, \gamma with the positive x,y,zx, y, z axes, its direction cosines are cos⁡α,cos⁡β,cos⁡γ\cos\alpha, \cos\beta, \cos\gamma — exactly the components of the unit vector along v⃗\vec{v}. Their squares sum to 1 (Pythagoras on the unit sphere). From this, the sum of the sines squared is forced to be 2 — the most-tested sister identity.

Definition

For v⃗=v1i^+v2j^+v3k^\vec{v} = v_1\hat{i} + v_2\hat{j} + v_3\hat{k} of magnitude ∣v⃗∣|\vec{v}|, the direction cosines are l=cos⁡α=v1∣v⃗∣,  m=cos⁡β=v2∣v⃗∣,  n=cos⁡γ=v3∣v⃗∣l = \cos\alpha = \dfrac{v_1}{|\vec{v}|}, \; m = \cos\beta = \dfrac{v_2}{|\vec{v}|}, \; n = \cos\gamma = \dfrac{v_3}{|\vec{v}|}. They satisfy l2+m2+n2=1l^2 + m^2 + n^2 = 1, and consequently sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2.

Direction-cosine identities

cos⁡2α+cos⁡2β+cos⁡2γ=1sin⁡2α+sin⁡2β+sin⁡2γ=2\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1 \qquad \sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2
  • α,β,γ\alpha, \beta, \gammaangles between v⃗\vec{v} and the positive x,y,zx, y, z axes
  • l,m,nl, m, ndirection cosines (the unit vector's components)

Diagram · direction cosines (drag to rotate)

xyzr
α ≈ 49° · l = 0.66β ≈ 62° · m = 0.48γ ≈ 54° · n = 0.58

l, m, n are the cosines of the angles r makes with the x-, y-, z-axes — and the components of the unit vector along r. So l² + m² + n² = 1.00 = 1, always.

Worked example

A vector a⃗=4i^−8j^+k^\vec{a} = 4\hat{i} - 8\hat{j} + \hat{k} makes angles α,β,γ\alpha, \beta, \gamma with the positive axes. Find cos⁡α\cos\alpha and verify the identity cos⁡2α+cos⁡2β+cos⁡2γ=1\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2023 · Q67Easy

Example 2 · Vectors · Magnitude, Components, Projection, and Direction Cosines

Consider the following for the items that follow: Let a vector a⃗=4i^−8j^+k^\vec{a}=4\hat{i}-8\hat{j}+\hat{k} make angles α\alpha, β\beta, γ\gamma with the positive directions of xx, yy, zz axes respectively.
What is cos⁡α\cos\alpha equal to?

Factor-of-2 trap: sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2, not 1

From ∑cos⁡2=1\sum\cos^2 = 1 and sin⁡2=1−cos⁡2\sin^2 = 1 - \cos^2, summing three times: ∑sin⁡2=3−∑cos⁡2=3−1=2\sum\sin^2 = 3 - \sum\cos^2 = 3 - 1 = 2. The distractor =1= 1 (copying the cosine identity) is the single most common wrong answer in this concept.

Direction cosines can be negative

An obtuse angle with an axis gives a negative cosine — totally fine. Some students try to force l,m,n≥0l, m, n \geq 0; don't. The identity l2+m2+n2=1l^2 + m^2 + n^2 = 1 holds with signs.

Concept 3 of 4: Scalar projection of one vector on another

The scalar projection of a⃗\vec{a} on b⃗\vec{b} measures how far a⃗\vec{a} reaches in the direction of b⃗\vec{b} — drop a perpendicular from the tip of a⃗\vec{a} onto the line through b⃗\vec{b}, and the signed length from the foot back to the origin is the projection. Algebraically it's just (a⃗⋅b⃗)/∣b⃗∣(\vec{a}\cdot\vec{b})/|\vec{b}|, where the dot product a⃗⋅b⃗=a1b1+a2b2+a3b3\vec{a}\cdot\vec{b} = a_1b_1 + a_2b_2 + a_3b_3 is the sum of products of corresponding components (it gets its own full treatment in the next subtopic) — divided by the length you're projecting onto.

Definition

The scalar projection of a⃗\vec{a} on b⃗\vec{b} is projb⃗a⃗=a⃗⋅b⃗∣b⃗∣\text{proj}_{\vec{b}}\vec{a} = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|}, with a⃗⋅b⃗=a1b1+a2b2+a3b3\vec{a}\cdot\vec{b} = a_1b_1 + a_2b_2 + a_3b_3. It is a signed scalar (positive when the projection lands in the direction of b⃗\vec{b}, negative when opposite). The corresponding vector projection — projecting and keeping a vector — is a⃗⋅b⃗∣b⃗∣2b⃗\dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|^2}\vec{b}. When an unknown component is fixed by a stated projection, the SIGN is data: "the projection of a⃗\vec{a} on b⃗\vec{b} is 22" rejects any root of the resulting equation that makes a⃗⋅b⃗\vec{a}\cdot\vec{b} negative — squaring to solve introduces that spurious root, so substitute back before choosing.

Scalar and vector projection

projb⃗a⃗=a⃗⋅b⃗∣b⃗∣projb⃗a⃗→=a⃗⋅b⃗∣b⃗∣2 b⃗\text{proj}_{\vec{b}}\vec{a} = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|} \qquad \overrightarrow{\text{proj}_{\vec{b}}\vec{a}} = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|^2}\,\vec{b}
  • a⃗\vec{a}vector being projected
  • b⃗\vec{b}vector providing the direction
  • ∣b⃗∣|\vec{b}|magnitude of b⃗\vec{b} (NOT ∣b⃗∣2|\vec{b}|^2 for scalar version)

Worked example

Find the scalar projection of a⃗=3i^+j^−k^\vec{a} = 3\hat{i} + \hat{j} - \hat{k} on b⃗=2i^+2j^+k^\vec{b} = 2\hat{i} + 2\hat{j} + \hat{k}.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Sep 2023 · Q91Easy

Example 3 · Vectors · Magnitude, Components, Projection, and Direction Cosines

What is the length of projection of the vector i^+2j^+3k^\hat{i}+2\hat{j}+3\hat{k} on the vector 2i^+3j^−2k^2\hat{i}+3\hat{j}-2\hat{k}?

Divide by ∣b⃗∣|\vec{b}|, not ∣b⃗∣2|\vec{b}|^2, for the scalar projection

Vector projection has ∣b⃗∣2|\vec{b}|^2 in the denominator because it carries the direction b⃗\vec{b} back into the answer; scalar projection drops the direction and divides only once. Mixing the two is a frequent factor-of-∣b⃗∣|\vec{b}| bug.

Sign of the scalar projection encodes obtuse/acute

If the projection comes out negative, the angle between a⃗\vec{a} and b⃗\vec{b} is obtuse. Don't reach for absolute value automatically — the sign is the information.

Concept 4 of 4: Unit vectors and direction-given construction

To strip a vector of its length and keep only its direction, divide by its magnitude — the result is a unit vector. To go the other way, multiply a unit vector by the desired magnitude. When a question describes a vector by its angles with axes, use the cosines of those angles as the components of its unit form, then scale.

Definition

For any non-zero v⃗\vec{v}, the unit vector along v⃗\vec{v} is v^=v⃗∣v⃗∣\hat{v} = \dfrac{\vec{v}}{|\vec{v}|}. A vector of magnitude rr making angles α,β,γ\alpha, \beta, \gamma with the positive axes is v⃗=r(cos⁡α i^+cos⁡β j^+cos⁡γ k^)\vec{v} = r(\cos\alpha\,\hat{i} + \cos\beta\,\hat{j} + \cos\gamma\,\hat{k}). Special 2-D case: a unit vector in the xyxy-plane at angle θ\theta to the xx-axis is cos⁡θ i^+sin⁡θ j^\cos\theta\,\hat{i} + \sin\theta\,\hat{j}.

Unit vector and direction construction

v^=v⃗∣v⃗∣v⃗=r(cos⁡α i^+cos⁡β j^+cos⁡γ k^)\hat{v} = \dfrac{\vec{v}}{|\vec{v}|} \qquad \vec{v} = r(\cos\alpha\,\hat{i} + \cos\beta\,\hat{j} + \cos\gamma\,\hat{k})
  • v^\hat{v}unit vector along v⃗\vec{v}
  • rrdesired magnitude of the constructed vector
  • α,β,γ\alpha, \beta, \gammaangles with the positive coordinate axes

Worked example

Find a vector of magnitude 15 in the direction of 4i^−3k^4\hat{i} - 3\hat{k}.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2021 · Q71Easy

Example 4 · Vectors · Magnitude, Components, Projection, and Direction Cosines

A vector r⃗=ai^+bj^\vec{r} = a\hat{i} + b\hat{j} is equally inclined to both xx and yy axes. If the magnitude of the vector is 2 units, then what are the values of aa and bb respectively?

Check that the given angles are consistent with ∑cos⁡2=1\sum\cos^2 = 1

A vector cannot make α=60∘\alpha = 60^\circ and β=45∘\beta = 45^\circ with the xx and yy axes AND have γ\gamma acute unless the third cosine fits. From cos⁡2α+cos⁡2β+cos⁡2γ=1\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1: cos⁡2γ=1−14−12=14\cos^2\gamma = 1 - \tfrac{1}{4} - \tfrac{1}{2} = \tfrac{1}{4}, so γ=60∘\gamma = 60^\circ (acute) or 120∘120^\circ.

Equally inclined to two axes only fixes one component pair

\"Vector inclined equally to xx and yy axes\" means a1=a2a_1 = a_2, which combined with the magnitude pins down both. Don't read it as a1=a2=a3a_1 = a_2 = a_3 — that's three axes, a different constraint.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (4)

  • Magnitude of a vector and distance between two points

    Magnitude and distance

    ∣v⃗∣=v12+v22+v32AB=∣b⃗−a⃗∣|\vec{v}| = \sqrt{v_1^2 + v_2^2 + v_3^2} \qquad AB = |\vec{b} - \vec{a}|
  • Direction Cosines

    Direction-cosine identities

    cos⁡2α+cos⁡2β+cos⁡2γ=1sin⁡2α+sin⁡2β+sin⁡2γ=2\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1 \qquad \sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2
  • Scalar projection of one vector on another

    Scalar and vector projection

    projb⃗a⃗=a⃗⋅b⃗∣b⃗∣projb⃗a⃗→=a⃗⋅b⃗∣b⃗∣2 b⃗\text{proj}_{\vec{b}}\vec{a} = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|} \qquad \overrightarrow{\text{proj}_{\vec{b}}\vec{a}} = \dfrac{\vec{a}\cdot\vec{b}}{|\vec{b}|^2}\,\vec{b}
  • Unit vectors and direction-given construction

    Unit vector and direction construction

    v^=v⃗∣v⃗∣v⃗=r(cos⁡α i^+cos⁡β j^+cos⁡γ k^)\hat{v} = \dfrac{\vec{v}}{|\vec{v}|} \qquad \vec{v} = r(\cos\alpha\,\hat{i} + \cos\beta\,\hat{j} + \cos\gamma\,\hat{k})

Watch out for (8)

Test yourself on Vectors

20 past NDA questions from this chapter, timed at 25 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.

Related notes