PYQ Vault

NDA Maths · 3D Geometry

Direction Cosines & Direction Ratios

The numbers that capture a line's direction in space — direction cosines are the unit version (squaring to 1), direction ratios are any proportional set.

Why this matters

Twenty-four PYQs across 2017–2026 — the engine room of the chapter. Almost every line, plane, and angle question reduces to direction cosines and ratios. The identity l² + m² + n² = 1 and the angle-between-lines formula together unlock the bulk of the bank. Difficulty here runs a touch higher (25% HARD), so the seven concepts below earn their keep.

Test yourself — a quick 12-question 3D Geometry recall quiz, instant score.

Concept 1 of 7: Direction ratios, direction cosines, and the unit identity

A line's direction can be described by any vector along it — those components are its DIRECTION RATIOS, and there are infinitely many proportional sets. Normalise that vector to unit length and the components become the DIRECTION COSINES ⟨l,m,n⟩\langle l, m, n\rangle — the cosines of the angles the line makes with the three axes. Because they're a unit vector's components, they always satisfy l2+m2+n2=1l^2 + m^2 + n^2 = 1.

Definition

If a line has direction ratios ⟨a,b,c⟩\langle a, b, c\rangle, its direction cosines are obtained by dividing by the magnitude: l=a/a2+b2+c2l = a/\sqrt{a^2+b^2+c^2}, and similarly for m,nm, n. They are the cosines of the angles α,β,γ\alpha, \beta, \gamma the line makes with the positive xx-, yy-, zz-axes. The defining identity is below.

Direction cosines square-sum to 1

l2+m2+n2=1,l=cos⁡α, m=cos⁡β, n=cos⁡γl^2 + m^2 + n^2 = 1, \quad l = \cos\alpha,\ m = \cos\beta,\ n = \cos\gamma
  • l,m,nl,m,ndirection cosines
  • α,β,γ\alpha,\beta,\gammaangles with the x, y, z axes

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

Find the direction cosines of the line with direction ratios ⟨2,−1,2⟩\langle 2, -1, 2\rangle.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2020 · Q63Easy

Example 1 · 3D Geometry · Direction Cosines and Ratios

If a line has direction ratios ⟨a+b,b+c,c+a⟩\langle a+b, b+c, c+a\rangle, then what is the sum of the squares of its direction cosines?

Direction RATIOS are not unique; direction COSINES (almost) are

⟨2,−1,2⟩\langle 2,-1,2\rangle and ⟨4,−2,4⟩\langle 4,-2,4\rangle are the same direction. Only after normalising do you get direction cosines — and even then a line has TWO sets (±\pm) for its two orientations. Sum of squares of ratios is NOT 1; only the cosines satisfy that.

You must NORMALISE direction ratios into cosines — and the identity is = 1, not = 0

Direction ratios ⟨a,b,c⟩\langle a,b,c\rangle are NOT direction cosines until you divide each by the magnitude a2+b2+c2\sqrt{a^2+b^2+c^2}. Treating raw ratios like ⟨2,−1,2⟩\langle 2,-1,2\rangle as cosines is wrong — their square-sum is 99, not 11. And the defining identity is l2+m2+n2=1l^2 + m^2 + n^2 = 1 (a UNIT vector), never =0= 0; =0= 0 would force all three to vanish.

Concept 2 of 7: Direction cosines of the axes and special lines

The axes themselves are the simplest directions. The x-axis points purely along xx, so its direction cosines are ⟨1,0,0⟩\langle 1, 0, 0\rangle — and a line perpendicular to an axis has a 0 in that slot. Memorise this tiny table and the recall questions become instant.

Definition

A line parallel to an axis has that axis's direction cosines; a line perpendicular to an axis has a zero in the corresponding component. A line in (or parallel to) the XY-plane is perpendicular to the z-axis, so n=0n = 0.

LineDirection cosinesNote
x-axis⟨1,0,0⟩\langle 1, 0, 0 \ranglemakes 0° with x, 90° with y and z
y-axis⟨0,1,0⟩\langle 0, 1, 0 \rangleDCs ⟨0,1,0⟩\langle 0,1,0\rangle; DRs e.g. ⟨0,4,0⟩\langle 0,4,0\rangle
z-axis⟨0,0,1⟩\langle 0, 0, 1 \rangleperpendicular to the whole XY-plane
⊥ to z-axisn=0n = 0, e.g. ⟨5,6,0⟩\langle 5, 6, 0\ranglelies in / parallel to the XY-plane
A line perpendicular to the z-axis just needs its z-component zero — the x, y parts are free.
Parallel to an axis → that axis's DCs. Perpendicular to an axis → a zero in that slot.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2019 · Q65Easy

Example 2 · 3D Geometry · Direction Cosines and Ratios

What are the direction cosines of z-axis?

Concept 3 of 7: Reading direction ratios off a line

When a line is given in symmetric form x−x0a=y−y0b=z−z0c\frac{x-x_0}{a} = \frac{y-y_0}{b} = \frac{z-z_0}{c}, the denominators ⟨a,b,c⟩\langle a, b, c\rangle ARE the direction ratios. The catch: the form must have coefficient 1 on each variable in the numerator — rewrite things like 2(y+3)2(y+3) or 1−z1 - z first, watching the sign.

Definition

Put the line into true symmetric form (each numerator x−x0x - x_0, coefficient 1). The denominators are the direction ratios. A coordinates-of-a-point form (x0+at, y0+bt, z0+ct)(x_0 + at,\ y_0 + bt,\ z_0 + ct) gives direction ratios ⟨a,b,c⟩\langle a, b, c\rangle directly (the coefficients of the parameter). Normalise to get direction cosines.

Worked example

Find the direction cosines of the line x−1=2(y+3)=1−zx - 1 = 2(y+3) = 1 - z.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Sep 2019 · Q56Moderate

Example 3 · 3D Geometry · Direction Cosines and Ratios

A point on a line has coordinates (p+1, p−3, 2p)(p+1,\, p-3,\, \sqrt{2}p) where pp is any real number. What are the direction cosines of the line ?

Mind the coefficient and the sign before reading denominators

2(y+3)2(y+3) is NOT denominator 2 — it's y+31/2\frac{y+3}{1/2}, so the ratio component is 12\tfrac12. And 1−z1 - z flips the sign: z−1−1\frac{z-1}{-1}. Read symmetric form only after each variable has coefficient +1+1.

Concept 4 of 7: Angle between two lines

Two lines' directions are vectors; the angle between them comes straight from the dot product. Use direction ratios in the numerator and the product of magnitudes below — the same cos⁡θ=a⃗⋅b⃗∣a⃗∣∣b⃗∣\cos\theta = \frac{\vec a \cdot \vec b}{|\vec a||\vec b|} you know from vectors.

Definition

For lines with direction ratios ⟨a1,b1,c1⟩\langle a_1,b_1,c_1\rangle and ⟨a2,b2,c2⟩\langle a_2,b_2,c_2\rangle, the acute angle θ\theta between them satisfies the formula below. With direction cosines the denominator is 1, so cos⁡θ=l1l2+m1m2+n1n2\cos\theta = l_1l_2 + m_1m_2 + n_1n_2.

Angle between two lines (direction ratios)

cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12 a22+b22+c22\cos\theta = \frac{|a_1 a_2 + b_1 b_2 + c_1 c_2|}{\sqrt{a_1^2+b_1^2+c_1^2}\,\sqrt{a_2^2+b_2^2+c_2^2}}

Diagram · angle between two lines (drag to rotate)

xyzd₁d₂

d₁ = ⟨2, 2, 1⟩, d₂ = ⟨2, −1, 2⟩ · cos θ = |d₁·d₂| / (|d₁||d₂|) = 4/9 · θ ≈ 64°.

Worked example

Find the angle between the two lines with direction ratios ⟨1,1,0⟩\langle 1, 1, 0\rangle and ⟨0,1,1⟩\langle 0, 1, 1\rangle.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2021 · Q66Moderate

Example 4 · 3D Geometry · Direction Cosines and Ratios

What is the angle between the two lines having direction ratios ⟨6,3,6⟩\langle 6, 3, 6\rangle and ⟨3,3,0⟩\langle 3, 3, 0\rangle?

For two LINES use their DIRECTIONS, not normals; divide by BOTH magnitudes

The angle between two lines comes from the dot product of their DIRECTION ratios cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12 a22+b22+c22\cos\theta = \dfrac{|a_1a_2+b_1b_2+c_1c_2|}{\sqrt{a_1^2+b_1^2+c_1^2}\,\sqrt{a_2^2+b_2^2+c_2^2}}. Two common slips: (1) forgetting to divide by the product of the magnitudes (the bare dot product is only cos⁡θ\cos\theta when both are unit vectors / true direction cosines), and (2) borrowing a plane's normal — that's for plane angles. Lines: directions. Planes: normals.

Concept 5 of 7: Perpendicular and parallel conditions

Two lines are parallel when their direction ratios are proportional, and perpendicular when their dot product is zero. These two one-line tests answer a surprising share of the bank — and a line perpendicular to two given lines has direction ratios given by their cross product.

Definition

Lines ⟨a1,b1,c1⟩\langle a_1,b_1,c_1\rangle and ⟨a2,b2,c2⟩\langle a_2,b_2,c_2\rangle are:

  • Parallel iff a1a2=b1b2=c1c2\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2}.
  • Perpendicular iff a1a2+b1b2+c1c2=0a_1a_2 + b_1b_2 + c_1c_2 = 0.

A line perpendicular to both has direction ratios equal to their cross product ⟨a1,b1,c1⟩×⟨a2,b2,c2⟩\langle a_1,b_1,c_1\rangle \times \langle a_2,b_2,c_2\rangle.

  • Line of intersection of two planes: it lies in both planes, so it is perpendicular to BOTH normals — its direction ratios are n1⃗×n2⃗\vec{n_1} \times \vec{n_2} (cross product of the plane normals).

Perpendicularity condition

a1a2+b1b2+c1c2=0a_1 a_2 + b_1 b_2 + c_1 c_2 = 0

Worked example

Find the direction ratios of a line perpendicular to both ⟨1,2,1⟩\langle 1, 2, 1\rangle and ⟨2,−1,1⟩\langle 2, -1, 1\rangle.
Practice this conceptself-check · 5 quick reps

The same idea in a real exam question:

NDA · Apr 2017 · Q65Moderate

Example 5 · 3D Geometry · Direction Cosines and Ratios

Under which one of the following conditions are the lines x=ay+b;  z=cy+dx=ay+b;\; z=cy+d and x=ey+f;  z=gy+hx=ey+f;\; z=gy+h perpendicular?

Concept 6 of 7: Projection of a segment on an axis or line

The projection of a segment onto an axis is simply how far it reaches along that axis — the difference of the relevant coordinates. Onto a general line, it's the segment's length times the cosine of the angle, which equals the dot product of the segment vector with the line's direction cosines.

Definition

Projection of AB→\overrightarrow{AB} on the x-axis is x2−x1x_2 - x_1 (and similarly for y, z). Projection on a line with direction cosines ⟨l,m,n⟩\langle l, m, n\rangle is (x2−x1)l+(y2−y1)m+(z2−z1)n(x_2-x_1)l + (y_2-y_1)m + (z_2-z_1)n.

Projection of AB on a line of direction cosines ⟨l, m, n⟩

proj=(x2−x1) l+(y2−y1) m+(z2−z1) n\text{proj} = (x_2-x_1)\,l + (y_2-y_1)\,m + (z_2-z_1)\,n

Worked example

Find the projection of the segment joining A(2,−1,4)A(2, -1, 4) and B(7,3,1)B(7, 3, 1) on the x-axis.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2021 · Q68Easy

Example 6 · 3D Geometry · Direction Cosines and Ratios

What is the projection of the line segment joining A(1,7,−5)A(1,7,-5) and B(−3,4,−2)B(-3,4,-2) on yy-axis?

Concept 7 of 7: Direction-angle identities

Because cos⁡2α+cos⁡2β+cos⁡2γ=1\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1, a chain of useful identities follows for the angles a line makes with the axes — for example the sines square-sum to 2, and cos⁡2α+cos⁡2β+cos⁡2γ=−1\cos2\alpha + \cos2\beta + \cos2\gamma = -1. These power the chapter's hardest one-liners.

Definition

From l2+m2+n2=1l^2+m^2+n^2 = 1 with l=cos⁡αl=\cos\alpha etc.:

  • sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2 (subtract the cosine identity from 3).
  • cos⁡2α+cos⁡2β+cos⁡2γ=−1\cos2\alpha + \cos2\beta + \cos2\gamma = -1 (use cos⁡2θ=2cos⁡2θ−1\cos2\theta = 2\cos^2\theta - 1).
  • Product form: cos⁡(α+β)cos⁡(α−β)=cos⁡2α−sin⁡2β\cos(\alpha+\beta)\cos(\alpha-\beta) = \cos^2\alpha - \sin^2\beta.

Core identities

∑cos⁡2 ⁣θ=1,∑sin⁡2 ⁣θ=2,∑cos⁡2θ=−1\sum \cos^2\!\theta = 1, \quad \sum \sin^2\!\theta = 2, \quad \sum \cos 2\theta = -1

Worked example

A line makes angles α,β,γ\alpha, \beta, \gamma with the axes. Show sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

NDA · Apr 2025 · Q61Hard

Example 7 · 3D Geometry · Direction Cosines and Ratios

If a line in 3 dimensions makes angles α,β\alpha, \beta and γ\gamma with the positive directions of the coordinate axes, then what is cos⁡(α+β)cos⁡(α−β)\cos(\alpha+\beta)\cos(\alpha-\beta) equal to?

A line cannot make equal acute angles with all three axes unless it's the diagonal

If α=β=γ\alpha=\beta=\gamma, then 3cos⁡2α=13\cos^2\alpha = 1, so cos⁡α=13\cos\alpha = \tfrac{1}{\sqrt3} (≈54.7°\approx 54.7°), NOT 45°45° or 60°60°. Options offering 45°/60° for the equal-angle case are distractors.

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 (5)

  • Direction ratios, direction cosines, and the unit identity

    Direction cosines square-sum to 1

    l2+m2+n2=1,l=cos⁡α, m=cos⁡β, n=cos⁡γl^2 + m^2 + n^2 = 1, \quad l = \cos\alpha,\ m = \cos\beta,\ n = \cos\gamma
  • Angle between two lines

    Angle between two lines (direction ratios)

    cos⁡θ=∣a1a2+b1b2+c1c2∣a12+b12+c12 a22+b22+c22\cos\theta = \frac{|a_1 a_2 + b_1 b_2 + c_1 c_2|}{\sqrt{a_1^2+b_1^2+c_1^2}\,\sqrt{a_2^2+b_2^2+c_2^2}}
  • Perpendicular and parallel conditions

    Perpendicularity condition

    a1a2+b1b2+c1c2=0a_1 a_2 + b_1 b_2 + c_1 c_2 = 0
  • Projection of a segment on an axis or line

    Projection of AB on a line of direction cosines ⟨l, m, n⟩

    proj=(x2−x1) l+(y2−y1) m+(z2−z1) n\text{proj} = (x_2-x_1)\,l + (y_2-y_1)\,m + (z_2-z_1)\,n
  • Direction-angle identities

    Core identities

    ∑cos⁡2 ⁣θ=1,∑sin⁡2 ⁣θ=2,∑cos⁡2θ=−1\sum \cos^2\!\theta = 1, \quad \sum \sin^2\!\theta = 2, \quad \sum \cos 2\theta = -1

Reference tables (1)

Direction cosines of the axes and special lines4 rows
LineDirection cosinesNote
x-axis⟨1,0,0⟩\langle 1, 0, 0 \ranglemakes 0° with x, 90° with y and z
y-axis⟨0,1,0⟩\langle 0, 1, 0 \rangleDCs ⟨0,1,0⟩\langle 0,1,0\rangle; DRs e.g. ⟨0,4,0⟩\langle 0,4,0\rangle
z-axis⟨0,0,1⟩\langle 0, 0, 1 \rangleperpendicular to the whole XY-plane
⊥ to z-axisn=0n = 0, e.g. ⟨5,6,0⟩\langle 5, 6, 0\ranglelies in / parallel to the XY-plane
A line perpendicular to the z-axis just needs its z-component zero — the x, y parts are free.
Parallel to an axis → that axis's DCs. Perpendicular to an axis → a zero in that slot.

Watch out for (5)

Test yourself on 3D Geometry

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.