Chapter 11 · Three Dimensional Geometry · Topic 01

Direction Cosines &
Direction Ratios

Master the fundamental language of 3D space — how lines orient themselves relative to the three coordinate axes.

✓ Board Exam ⚡ JEE Main & Advanced 📘 NCERT Class 12
📋 Contents
01

Introduction

In 3D coordinate geometry, a point is represented as $(x, y, z)$ with respect to three mutually perpendicular axes $OX$, $OY$, $OZ$. The direction of a line in 3D space is characterised by the angles it makes with these axes.

Unlike 2D where a single slope describes direction, in 3D we need three angles — giving rise to direction cosines and direction ratios.

Key Idea: Just as a line in 2D has a slope $m = \tan\theta$, a line in 3D has direction cosines $(l, m, n)$ that describe its orientation in 3D space.
02

Direction Cosines of a Line

If a line makes angles $\alpha$, $\beta$, $\gamma$ with the positive directions of the $x$-axis, $y$-axis, and $z$-axis respectively, then the cosines of these angles are called the direction cosines (DCs) of the line.

📐 Definition of Direction Cosines
$$l = \cos\alpha, \quad m = \cos\beta, \quad n = \cos\gamma$$

where $\alpha, \beta, \gamma$ are direction angles ($0 \le \alpha,\beta,\gamma \le \pi$)

Direction Cosines of Coordinate Axes
Line / Axis$\alpha$ (with $x$)$\beta$ (with $y$)$\gamma$ (with $z$)DCs $(l, m, n)$
$x$-axis$0°$$90°$$90°$$(1,\ 0,\ 0)$
$y$-axis$90°$$0°$$90°$$(0,\ 1,\ 0)$
$z$-axis$90°$$90°$$0°$$(0,\ 0,\ 1)$
Equally inclined to all axes$\cos^{-1}\!\tfrac{1}{\sqrt{3}}$$\cos^{-1}\!\tfrac{1}{\sqrt{3}}$$\cos^{-1}\!\tfrac{1}{\sqrt{3}}$$\left(\pm\tfrac{1}{\sqrt{3}},\pm\tfrac{1}{\sqrt{3}},\pm\tfrac{1}{\sqrt{3}}\right)$
Note: If a directed line $OP$ has DCs $(l, m, n)$, then the reverse direction $PO$ has DCs $(-l, -m, -n)$. So an undirected line has two sets of DCs.
03

Fundamental Relation

⭐ Most Important Formula
$$l^2 + m^2 + n^2 = 1 \quad \Longleftrightarrow \quad \cos^2\!\alpha + \cos^2\!\beta + \cos^2\!\gamma = 1$$
Proof

Let $P(x, y, z)$ be any point on the line and $r = |OP|$. The foot of perpendicular from $P$ to the $x$-axis has distance $x$, so $\cos\alpha = x/r$. Similarly $\cos\beta = y/r$, $\cos\gamma = z/r$. Therefore:

$$l^2+m^2+n^2 = \frac{x^2+y^2+z^2}{r^2} = \frac{r^2}{r^2} = 1 \quad\checkmark$$
Derived Results (Crucial for JEE)
  • $\sin^2\!\alpha + \sin^2\!\beta + \sin^2\!\gamma = 2$   (since $1-\cos^2\theta$ for each, sum = $3-1=2$)
  • $\cos 2\alpha + \cos 2\beta + \cos 2\gamma = -1$   (using $\cos 2\theta = 2\cos^2\theta -1$)
  • Each DC is in the range $[-1,\ 1]$
  • If $l=m=n$, then $3l^2=1 \Rightarrow l = \pm\dfrac{1}{\sqrt{3}}$
04

Direction Ratios

Any three numbers $a, b, c$ which are proportional to the direction cosines $l, m, n$ are called direction ratios (DRs) of the line.

📌 Direction Ratios
$$\frac{a}{l} = \frac{b}{m} = \frac{c}{n} = k \quad \Rightarrow \quad (a,b,c) \text{ are DRs of the line}$$
PropertyDirection CosinesDirection Ratios
UniquenessUnique (up to ± sign)Not unique — any proportional set works
Constraint$l^2+m^2+n^2 = 1$No constraint
RangeEach $\in[-1,1]$Any real numbers
Example$\left(\frac{2}{7}, -\frac{3}{7}, \frac{6}{7}\right)$$(2,-3,6)$ or $(4,-6,12)$ etc.
05

Converting Direction Ratios to Direction Cosines

Given direction ratios $(a, b, c)$, find direction cosines by dividing each by $\sqrt{a^2+b^2+c^2}$:

🔄 DR → DC Conversion Formula
$$l = \frac{\pm a}{\sqrt{a^2+b^2+c^2}}, \quad m = \frac{\pm b}{\sqrt{a^2+b^2+c^2}}, \quad n = \frac{\pm c}{\sqrt{a^2+b^2+c^2}}$$

The $\pm$ sign corresponds to the two opposite directions along the line.

Memory Trick: This is exactly the same as finding a unit vector — divide by the magnitude! If DRs are components $(a,b,c)$, then DCs are components of the unit vector $\hat{b} = \dfrac{(a,b,c)}{|(a,b,c)|}$.
06

Line Joining Two Points

For a line passing through $P(x_1, y_1, z_1)$ and $Q(x_2, y_2, z_2)$:

📍 DRs from Two Points
$$\text{DRs} = (x_2 - x_1,\; y_2 - y_1,\; z_2 - z_1)$$ $$|PQ| = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$$
📐 DCs from Two Points
$$l = \frac{x_2-x_1}{|PQ|}, \qquad m = \frac{y_2-y_1}{|PQ|}, \qquad n = \frac{z_2-z_1}{|PQ|}$$
Projection of a Line Segment

The projection of $\overrightarrow{PQ}$ on any line with DCs $(l',m',n')$ is:

$$\text{Projection} = l'(x_2-x_1) + m'(y_2-y_1) + n'(z_2-z_1)$$

Special case — projection on coordinate axes:

  • On $x$-axis: $x_2-x_1$
  • On $y$-axis: $y_2-y_1$
  • On $z$-axis: $z_2-z_1$
07

Solved Examples

Board LevelExample 1 — DCs from DRs

Find the direction cosines of a line whose direction ratios are $2, -3, 6$.

Solution

$a=2,\ b=-3,\ c=6$

$$\sqrt{a^2+b^2+c^2} = \sqrt{4+9+36} = \sqrt{49} = 7$$ $$\boxed{l = \frac{2}{7},\quad m = \frac{-3}{7},\quad n = \frac{6}{7}}$$

Check: $\dfrac{4}{49}+\dfrac{9}{49}+\dfrac{36}{49} = \dfrac{49}{49} = 1$ ✓

Board LevelExample 2 — DCs from Two Points

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

Solution

DRs $= (4-2,\ 3+1,\ 1-3) = (2,4,-2)$

$$|AB| = \sqrt{4+16+4} = \sqrt{24} = 2\sqrt{6}$$ $$l = \frac{2}{2\sqrt{6}} = \frac{1}{\sqrt{6}},\quad m = \frac{4}{2\sqrt{6}} = \frac{2}{\sqrt{6}},\quad n = \frac{-2}{2\sqrt{6}} = \frac{-1}{\sqrt{6}}$$
JEE LevelExample 3 — Derived Identity

If a line makes angles $\alpha$, $\beta$, $\gamma$ with the coordinate axes, find the value of $\cos 2\alpha + \cos 2\beta + \cos 2\gamma$.

Solution

Using $\cos 2\theta = 2\cos^2\theta - 1$:

$$\cos 2\alpha + \cos 2\beta + \cos 2\gamma = 2(\cos^2\!\alpha + \cos^2\!\beta + \cos^2\!\gamma) - 3 = 2(1) - 3 = \boxed{-1}$$
JEE LevelExample 4 — Equally Inclined Line

A line is equally inclined to all three coordinate axes. Find its direction cosines and the angle it makes with each axis.

Solution

Let the angle with each axis be $\alpha$. Then $l=m=n=\cos\alpha$.

$$l^2+m^2+n^2=1 \implies 3\cos^2\!\alpha=1 \implies \cos\alpha = \pm\frac{1}{\sqrt{3}}$$ $$\text{DCs}: \left(\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}},\frac{1}{\sqrt{3}}\right) \quad \text{or} \quad \left(-\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}},-\frac{1}{\sqrt{3}}\right)$$ $$\alpha = \cos^{-1}\!\left(\frac{1}{\sqrt{3}}\right) \approx 54.74°$$
Board LevelExample 5 — Angles with Axes

If a line makes angles $90°$, $60°$, $30°$ with the positive $x$, $y$, $z$-axes, find its direction cosines. Verify $l^2+m^2+n^2=1$.

Solution
$$l=\cos 90°=0,\quad m=\cos 60°=\frac{1}{2},\quad n=\cos 30°=\frac{\sqrt{3}}{2}$$ $$l^2+m^2+n^2 = 0 + \frac{1}{4} + \frac{3}{4} = 1 \quad\checkmark$$
08

Board & JEE Tips

✅ Board Exam Tips
  • Always verify your DCs by checking $l^2+m^2+n^2=1$ — easy 1-mark check
  • When finding DRs from two points, order matters: use $Q-P$ consistently
  • DRs are not unique — $(2,-3,6)$, $(4,-6,12)$, $(-2,3,-6)$ are all valid DRs for the same line
  • Common 4-mark question: "Find DCs of line joining two given points"
  • Another classic: "If a line makes equal angles with axes, find the DCs"
⚡ JEE Preparation Tips
  • Memorise: $\cos 2\alpha + \cos 2\beta + \cos 2\gamma = -1$ — appears in integer-type JEE questions
  • $\sin^2\!\alpha + \sin^2\!\beta + \sin^2\!\gamma = 2$ — quick proof: $3 - (l^2+m^2+n^2+\text{extra})$
  • Unit vector along direction $(l,m,n)$ is $l\hat{i}+m\hat{j}+n\hat{k}$ — connects DCs to vectors
  • JEE often tests: "If $l,m,n$ are DCs, what is the unit vector along the line?"
❌ Common Mistakes
  • Writing DCs as $(a,b,c)$ instead of $\dfrac{(a,b,c)}{\sqrt{a^2+b^2+c^2}}$ — DRs ≠ DCs!
  • Forgetting the $\pm$ sign when computing DCs from DRs
  • Taking $\cos\alpha > 1$ — this is impossible; check your arithmetic
  • Confusing $\sin^2+\sin^2+\sin^2 = 2$ with $= 1$ (that's for DCs, not $\sin^2$)
⚡ Quick Formula Sheet
Direction Cosines
$l=\cos\alpha,\ m=\cos\beta,\ n=\cos\gamma$
Fundamental Identity
$l^2+m^2+n^2=1$
DR → DC
$l=\dfrac{\pm a}{\sqrt{a^2+b^2+c^2}}$
Two-Point DRs
$(x_2-x_1,\ y_2-y_1,\ z_2-z_1)$
JEE Identity
$\cos2\alpha+\cos2\beta+\cos2\gamma=-1$
Equally Inclined
$l=m=n=\pm\dfrac{1}{\sqrt{3}}$
$\sin^2$ Identity
$\sin^2\!\alpha+\sin^2\!\beta+\sin^2\!\gamma=2$
x-axis DCs
$(1,0,0)$; y-axis: $(0,1,0)$; z-axis: $(0,0,1)$