Direction cosines and direction ratios of a line joining two points

easy CBSE JEE-MAIN NCERT Class 12 3 min read

Question

Find the direction cosines and direction ratios of the line joining the points A(2,1,3)A(2, 1, -3) and B(4,1,5)B(4, -1, 5).

(NCERT Class 12, Chapter 11 — Three Dimensional Geometry)


Solution — Step by Step

Direction ratios (DRs) of the line ABAB are simply the differences in coordinates:

a=x2x1=42=2a = x_2 - x_1 = 4 - 2 = 2 b=y2y1=11=2b = y_2 - y_1 = -1 - 1 = -2 c=z2z1=5(3)=8c = z_2 - z_1 = 5 - (-3) = 8

Direction ratios: (2, -2, 8) or equivalently (1, -1, 4) (dividing by 2).

AB=a2+b2+c2=4+4+64=72=62|AB| = \sqrt{a^2 + b^2 + c^2} = \sqrt{4 + 4 + 64} = \sqrt{72} = 6\sqrt{2}

Direction cosines (DCs) are the direction ratios divided by the magnitude:

l=aAB=262=132l = \frac{a}{|AB|} = \frac{2}{6\sqrt{2}} = \frac{1}{3\sqrt{2}} m=bAB=262=132m = \frac{b}{|AB|} = \frac{-2}{6\sqrt{2}} = \frac{-1}{3\sqrt{2}} n=cAB=862=432n = \frac{c}{|AB|} = \frac{8}{6\sqrt{2}} = \frac{4}{3\sqrt{2}}

Direction cosines: (132,132,432)\left(\frac{1}{3\sqrt{2}}, \frac{-1}{3\sqrt{2}}, \frac{4}{3\sqrt{2}}\right)

Verification: l2+m2+n2=118+118+1618=1818=1l^2 + m^2 + n^2 = \frac{1}{18} + \frac{1}{18} + \frac{16}{18} = \frac{18}{18} = 1


Why This Works

Direction ratios tell us the “direction” of a line — they’re proportional to the components of the line’s direction vector. Any scalar multiple of DRs gives the same direction, so (2,2,8)(2, -2, 8) and (1,1,4)(1, -1, 4) represent the same line direction.

Direction cosines are the normalised version — they’re the cosines of the angles the line makes with the three coordinate axes (xx, yy, zz). Because they represent cosines of angles in a unit direction, they always satisfy l2+m2+n2=1l^2 + m^2 + n^2 = 1. This property is a useful self-check.

The relationship is: DCs = DRs ÷\div magnitude. DCs are unique (up to sign), while DRs can be any proportional set.


Alternative Method — Using the direction vector directly

The direction vector of ABAB is AB=BA=(2,2,8)\vec{AB} = B - A = (2, -2, 8).

The unit vector: AB^=ABAB=(2,2,8)62=(132,132,432)\hat{AB} = \frac{\vec{AB}}{|\vec{AB}|} = \frac{(2, -2, 8)}{6\sqrt{2}} = \left(\frac{1}{3\sqrt{2}}, \frac{-1}{3\sqrt{2}}, \frac{4}{3\sqrt{2}}\right)

The components of the unit vector ARE the direction cosines.

Always verify l2+m2+n2=1l^2 + m^2 + n^2 = 1 after computing direction cosines. If it doesn’t equal 1, you’ve made an arithmetic error somewhere. This check takes 10 seconds and can save you from a wrong answer. For CBSE boards, showing this verification step also earns marks.


Common Mistake

Students confuse direction ratios with direction cosines. Direction ratios are NOT unique — (2,2,8)(2, -2, 8), (1,1,4)(1, -1, 4), and (4,4,16)(4, -4, 16) all represent the same direction. Direction cosines ARE unique (up to a ±\pm sign). When the question asks for “direction cosines,” you MUST divide by the magnitude. When it asks for “direction ratios,” any proportional set is acceptable.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next