PYQ Vault

CBSE Class 12 Maths · Three Dimensional Geometry

Direction Cosines and Direction Ratios

The direction cosines of a line are the cosines of the angles it makes with the positive x, y and z axes; any three numbers proportional to them are its direction ratios.

Why this matters

40 questions, thirty of them from board papers, set in every year from 2022 to 2026. Most are one-mark MCQs and assertion-reason items: direction cosines from the angles a line makes with the axes and the rule l² + m² + n² = 1 (every year), the direction cosines of a line whose equation is not in standard form (2022, 2023, 2024 and 2026), the foot of a perpendicular on an axis and the distance of a point from an axis (2023 to 2025), and the unknowns that make two lines parallel (2026). The written ones asked for the third angle when two are given (2022) and for the direction cosines and a point of a line given as three equal expressions (2023). The textbook adds Examples 1 to 5 and Exercise 11.1.

Concept 1 of 4: Direction cosines from the angles with the axes

Let a line make angles α\alpha, β\beta and γ\gamma with the positive x, y and z axes. Their cosines ll, mm, nn are the components of a unit vector along the line, so the sum of their squares is 1. Turn the line round and each angle becomes its supplement, so every cosine changes sign: a line has two sets of direction cosines, one for each direction along it.

Definition

  • l=cos⁡αl = \cos\alpha, m=cos⁡βm = \cos\beta, n=cos⁡γn = \cos\gamma, where each angle lies from 00 to π\pi.
  • Always l2+m2+n2=1l^2 + m^2 + n^2 = 1. Given two of the angles, this gives the square of the third cosine, so the third cosine has two signs and the third angle can be acute or obtuse.
  • From the same rule: sin⁡2α+sin⁡2β+sin⁡2γ=2\sin^2\alpha + \sin^2\beta + \sin^2\gamma = 2 and cos⁡2α+cos⁡2β+cos⁡2γ=−1\cos 2\alpha + \cos 2\beta + \cos 2\gamma = -1. There is no such rule for cos⁡α+cos⁡β+cos⁡γ\cos\alpha + \cos\beta + \cos\gamma.
  • A line equally inclined to the three axes has l=m=n=±13l = m = n = \pm\dfrac{1}{\sqrt{3}}.
  • No line makes 90∘90^\circ with all three axes, since 0+0+0≠10 + 0 + 0 \ne 1.
  • Three numbers whose squares do not add up to 1, such as 1,1,11, 1, 1, cannot be direction cosines. They can still be direction ratios.

Direction cosines

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

Worked example

A line makes an angle of 120∘120^\circ with the positive x-axis and also with the positive y-axis. Find the angle it makes with the positive z-axis, and write its direction cosines.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2022 · 65/4/1 · 10 (a)Moderate

Example 1 · Three Dimensional Geometry · Direction Cosines and Direction Ratios

If a line makes 60∘60^\circ and 45∘45^\circ angles with the positive directions of x-axis and z-axis respectively, then find the angle that it makes with the positive direction of y-axis. Hence, write the direction cosines of the line.

Keeping one sign of the third cosine

When you find the third cosine from l2+m2+n2=1l^2 + m^2 + n^2 = 1, you get its square. Both signs are possible, so the angle can be acute or obtuse. Write both unless the question says which.

Calling 1, 1, 1 direction cosines

Direction cosines must satisfy l2+m2+n2=1l^2 + m^2 + n^2 = 1, and 1+1+1=31 + 1 + 1 = 3. So 1,1,11, 1, 1 are direction ratios; the direction cosines are ±13\pm\dfrac{1}{\sqrt{3}} each.

An angle bigger than a straight angle

The angle a line makes with an axis lies from 00 to π\pi. An option such as 5π4\dfrac{5\pi}{4} can never be that angle.

Assertion-reason code (D) in Mathematics

In CBSE Mathematics papers, code (D) means the Assertion is false and the Reason is true. Decide each statement on its own first, then ask whether the Reason explains the Assertion.

Concept 2 of 4: Direction ratios, and reading them from an equation

Any three numbers a,b,ca, b, c proportional to l,m,nl, m, n are direction ratios. To get back the direction cosines, divide each by a2+b2+c2\sqrt{a^2 + b^2 + c^2}. In the Cartesian equation of a line the denominators are direction ratios, but only once every numerator has the form (variable minus a number) with the variable's coefficient equal to 1.

Definition

  • l=±aa2+b2+c2l = \pm\dfrac{a}{\sqrt{a^2 + b^2 + c^2}}, and the same for mm and nn, taking one sign for all three.
  • If a,b,ca, b, c are direction ratios, so are ka,kb,kcka, kb, kc for any k≠0k \ne 0. 0,0,00, 0, 0 is never a set of direction ratios.
  • Standard form first. 1−y3=y−1−3\dfrac{1 - y}{3} = \dfrac{y - 1}{-3} and 2x−14=x−122\dfrac{2x - 1}{4} = \dfrac{x - \frac{1}{2}}{2}.
  • For a chain such as 2x=3y=−z2x = 3y = -z, divide through: x1/2=y1/3=z−1\dfrac{x}{1/2} = \dfrac{y}{1/3} = \dfrac{z}{-1}, so the direction ratios are 12,13,−1\dfrac{1}{2}, \dfrac{1}{3}, -1, that is 3,2,−63, 2, -6.
  • x=ay+bx = ay + b, z=cy+dz = cy + d is x−ba=y1=z−dc\dfrac{x - b}{a} = \dfrac{y}{1} = \dfrac{z - d}{c}: direction ratios a,1,ca, 1, c.
  • The numbers subtracted in the standard form give a point of the line.

Direction cosines from direction ratios

l=aa2+b2+c2,m=ba2+b2+c2,n=ca2+b2+c2l = \dfrac{a}{\sqrt{a^2 + b^2 + c^2}},\quad m = \dfrac{b}{\sqrt{a^2 + b^2 + c^2}},\quad n = \dfrac{c}{\sqrt{a^2 + b^2 + c^2}}
  • a,b,ca, b, cdirection ratios of the line

Worked example

Find the direction cosines of the line 3x−6=6−6y=3z+33x - 6 = 6 - 6y = 3z + 3, and a point through which it passes.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2023 · 65/4/1 · 25 (b)Moderate

Example 2 · Three Dimensional Geometry · Direction Cosines and Direction Ratios

The equations of a line are 5x−3=15y+7=3−10z5x - 3 = 15y + 7 = 3 - 10z. Write the direction cosines of the line and find the coordinates of a point through which it passes.

Reading the printed denominators

In 2z+18\dfrac{2z + 1}{8} the denominator 8 is not a direction ratio: the coefficient of zz is 2. Rewrite it as z+124\dfrac{z + \frac{1}{2}}{4} first, and change the sign of the denominator when the variable has a minus sign.

Mixing signs

Divide all three direction ratios by +a2+b2+c2+\sqrt{a^2 + b^2 + c^2}, or all three by −a2+b2+c2-\sqrt{a^2 + b^2 + c^2}. Changing the sign of only one cosine gives a different line.

Forgetting to divide

Direction ratios such as 2,−3,62, -3, 6 are not direction cosines. When the question asks for direction cosines, divide by the square root of the sum of squares, here 7.

Concept 3 of 4: The coordinate axes: direction cosines, feet and distances

The x-axis makes 0∘0^\circ with itself and 90∘90^\circ with the other two axes, so its direction cosines are 1,0,01, 0, 0. Drop a perpendicular from a point onto an axis and only the coordinate along that axis survives at the foot. The length of that perpendicular is made of the other two coordinates.

Definition

  • Direction cosines: x-axis 1,0,01, 0, 0; y-axis 0,1,00, 1, 0; z-axis 0,0,10, 0, 1.
  • A line parallel to an axis has the same direction ratios. In Cartesian form a zero denominator, such as x−10\dfrac{x - 1}{0}, only records that xx stays equal to 1 along the line.
  • Foot on an axis: keep the coordinate of that axis and make the other two zero.
  • Distance from an axis: leave out the coordinate of that axis. From the y-axis it is x2+z2\sqrt{x^2 + z^2}.
  • A line perpendicular to two of the axes is parallel to the third.
AxisDirection cosinesFoot of the perpendicular from (x, y, z)Distance of (x, y, z) from the axis
x-axis1,0,01, 0, 0(x,0,0)(x, 0, 0)y2+z2\sqrt{y^2 + z^2}
y-axis0,1,00, 1, 0(0,y,0)(0, y, 0)x2+z2\sqrt{x^2 + z^2}Q
Board 2023 and 2024 asked the distance of a point from the y-axis: it is √(x² + z²), not |y|.
z-axis0,0,10, 0, 1(0,0,z)(0, 0, z)x2+y2\sqrt{x^2 + y^2}Q
Board 2023 asked the direction ratios of a line parallel to the z-axis: 0, 0, 1.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2025 · 65/4/3 · Q6Easy

Example 3 · Three Dimensional Geometry · Direction Cosines and Direction Ratios

The coordinates of the foot of the perpendicular drawn from the point A(−2,3,5)(-2, 3, 5) on the y-axis is :

Keeping the wrong coordinate

The foot on the y-axis keeps the y-coordinate. The distance from the y-axis leaves the y-coordinate out. Mixing these up gives the option ∣y∣|y| or y2+z2\sqrt{y^2 + z^2}, both wrong.

A zero denominator is not division by zero

x−10=y−10=z−11\dfrac{x - 1}{0} = \dfrac{y - 1}{0} = \dfrac{z - 1}{1} is a line parallel to the z-axis through (1,1,1)(1, 1, 1). The 0 says xx and yy do not change along the line.

Concept 4 of 4: The line through two points: collinear points and parallel lines

Going from P(x1,y1,z1)P(x_1, y_1, z_1) to Q(x2,y2,z2)Q(x_2, y_2, z_2) you move x2−x1x_2 - x_1, y2−y1y_2 - y_1, z2−z1z_2 - z_1 along the axes, so these are direction ratios of PQPQ; dividing by the length PQPQ gives its direction cosines. Two lines point the same way exactly when their direction ratios are proportional.

Definition

  • Direction ratios of PQPQ: x2−x1,y2−y1,z2−z1x_2 - x_1, y_2 - y_1, z_2 - z_1 (or their negatives).
  • Direction cosines of PQPQ: each of these divided by PQ=(x2−x1)2+(y2−y1)2+(z2−z1)2PQ = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}.
  • Parallel lines: a1a2=b1b2=c1c2\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2}, one common multiplier for all three.
  • Collinear points A,B,CA, B, C: the direction ratios of ABAB and BCBC are proportional, and BB is common to both, so the three points lie on one line.

Direction cosines of the line through two points

x2−x1PQ, y2−y1PQ, z2−z1PQ\dfrac{x_2 - x_1}{PQ},\ \dfrac{y_2 - y_1}{PQ},\ \dfrac{z_2 - z_1}{PQ}

Worked example

Find the direction cosines of the line through A(1,−2,3)A(1, -2, 3) and B(3,−1,5)B(3, -1, 5).
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/3/1 · Q17Moderate

Example 4 · Three Dimensional Geometry · Direction Cosines and Direction Ratios

Direction ratios of lines l1l_1 and l2l_2 are <12,−3,9><12, -3, 9> and <4,q,−p><4, q, -p> respectively. The values of p and q for which l1l_1 and l2l_2 are parallel are respectively :

Checking only two of the three ratios

Parallel needs one common multiplier for all three pairs, signs included. Two ratios agreeing is not enough; check the third as well.

Parallel is not collinear

Proportional direction ratios of ABAB and BCBC show the segments are parallel. Say also that BB is common to both; that is what puts the three points on one line.

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

Reference tables (1)

The coordinate axes: direction cosines, feet and distances3 rows
AxisDirection cosinesFoot of the perpendicular from (x, y, z)Distance of (x, y, z) from the axis
x-axis1,0,01, 0, 0(x,0,0)(x, 0, 0)y2+z2\sqrt{y^2 + z^2}
y-axis0,1,00, 1, 0(0,y,0)(0, y, 0)x2+z2\sqrt{x^2 + z^2}Q
Board 2023 and 2024 asked the distance of a point from the y-axis: it is √(x² + z²), not |y|.
z-axis0,0,10, 0, 1(0,0,z)(0, 0, z)x2+y2\sqrt{x^2 + y^2}Q
Board 2023 asked the direction ratios of a line parallel to the z-axis: 0, 0, 1.

Watch out for (11)

Test yourself on Three Dimensional Geometry

15 past CBSE Class 12 questions from this chapter, timed at 23 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.