Master 3D geometry with visual diagrams — direction cosines, lines in space, angle between lines, shortest distance between skew lines, and step-marked solutions.
Foundation of 3D geometry
If a directed line L makes angles $\alpha, \beta, \gamma$ with the positive directions of $x, y, z$ axes respectively, then the cosines of these angles are called direction cosines of the line:
Fundamental identity:
Any three numbers $(a, b, c)$ proportional to the direction cosines $(l, m, n)$ are called direction ratios of the line:
Direction cosines from direction ratios:
If the line passes through $P(x_1, y_1, z_1)$ and $Q(x_2, y_2, z_2)$, then:
where
| Axis | Direction Cosines |
|---|---|
| X-axis | $(1, 0, 0)$ |
| Y-axis | $(0, 1, 0)$ |
| Z-axis | $(0, 0, 1)$ |
Understand 3D geometry geometrically
Vector and Cartesian forms
Let $\vec{a}$ be the position vector of point A, and $\vec{b}$ be a vector parallel to line. Then the vector equation is:
Cartesian form: If A$(x_1, y_1, z_1)$ and $\vec{b} = a\hat{i} + b\hat{j} + c\hat{k}$:
If line passes through A$(\vec{a})$ and B$(\vec{b})$:
Cartesian form:
Using dot product of direction vectors
If lines are $\vec{r} = \vec{a}_1 + \lambda\vec{b}_1$ and $\vec{r} = \vec{a}_2 + \mu\vec{b}_2$:
If lines have direction ratios $(a_1, b_1, c_1)$ and $(a_2, b_2, c_2)$:
Skew lines and parallel lines
For lines $\vec{r} = \vec{a}_1 + \lambda\vec{b}_1$ and $\vec{r} = \vec{a}_2 + \mu\vec{b}_2$:
For lines $\dfrac{x - x_1}{a_1} = \dfrac{y - y_1}{b_1} = \dfrac{z - z_1}{c_1}$ and $\dfrac{x - x_2}{a_2} = \dfrac{y - y_2}{b_2} = \dfrac{z - z_2}{c_2}$:
For lines $\vec{r} = \vec{a}_1 + \lambda\vec{b}$ and $\vec{r} = \vec{a}_2 + \mu\vec{b}$:
Everything you need from Chapter 11
Speed techniques for board exams
"Divide by magnitude"
"Subtract coordinates, divide by distance"
Dot product of direction ratios = 0
Direction ratios proportional
"Direction ratios of AB and BC proportional"
"Not parallel, not intersecting"
"Numerator: (b₁×b₂) · (a₂−a₁)"
Take absolute value of cos θ
Direction vector ↔ direction ratios
Substitute and verify equality
Click "Show Answer" to reveal step-by-step solutions with marks
Q1. Find the direction cosines of a line with direction ratios $(2, -1, -2)$.
$R = \sqrt{2^2 + (-1)^2 + (-2)^2} = \sqrt{4 + 1 + 4} = \sqrt{9} = 3$
$l = \frac{2}{3}$, $m = \frac{-1}{3}$, $n = \frac{-2}{3}$
Q2. Find the angle between lines $\frac{x-2}{2} = \frac{y-1}{5} = \frac{z+3}{-3}$ and $\frac{x+2}{-1} = \frac{y-4}{8} = \frac{z-5}{4}$.
$a_1, b_1, c_1 = 2, 5, -3$
$a_2, b_2, c_2 = -1, 8, 4$
$a_1 a_2 + b_1 b_2 + c_1 c_2 = 2(-1) + 5(8) + (-3)(4) = -2 + 40 - 12 = 26$
$\sqrt{a_1^2 + b_1^2 + c_1^2} = \sqrt{4+25+9} = \sqrt{38}$
$\sqrt{a_2^2 + b_2^2 + c_2^2} = \sqrt{1+64+16} = \sqrt{81} = 9$
$\cos\theta = \left|\frac{26}{9\sqrt{38}}\right|$
$\theta = \cos^{-1}\left(\frac{26}{9\sqrt{38}}\right)$
Q3. Find the shortest distance between lines $\vec{r} = \hat{i} + \hat{j} + \lambda(2\hat{i} - \hat{j} + \hat{k})$ and $\vec{r} = 2\hat{i} + \hat{j} - \hat{k} + \mu(3\hat{i} - 5\hat{j} + 2\hat{k})$.
$\vec{a}_1 = \hat{i} + \hat{j}$, $\vec{b}_1 = 2\hat{i} - \hat{j} + \hat{k}$
$\vec{a}_2 = 2\hat{i} + \hat{j} - \hat{k}$, $\vec{b}_2 = 3\hat{i} - 5\hat{j} + 2\hat{k}$
$\vec{a}_2 - \vec{a}_1 = \hat{i} - \hat{k}$
$\vec{b}_1 \times \vec{b}_2 = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 2 & -1 & 1 \\ 3 & -5 & 2 \end{vmatrix}$
$= \hat{i}(-2 + 5) - \hat{j}(4 - 3) + \hat{k}(-10 + 3) = 3\hat{i} - \hat{j} - 7\hat{k}$
$|\vec{b}_1 \times \vec{b}_2| = \sqrt{9 + 1 + 49} = \sqrt{59}$
$d = \frac{|(\vec{b}_1 \times \vec{b}_2) \cdot (\vec{a}_2 - \vec{a}_1)|}{|\vec{b}_1 \times \vec{b}_2|}$
$= \frac{|3(1) + (-1)(0) + (-7)(-1)|}{\sqrt{59}} = \frac{10}{\sqrt{59}}$
Select your answer and click "Check Answers"
Each question has an Assertion (A) and a Reason (R). Choose the correct option.
(A) Both A and R are true, and R is the correct explanation of A.
(B) Both A and R are true, but R is NOT the correct explanation of A.
(C) A is true, but R is false.
(D) A is false, but R is true.
Frequently asked questions in board exams
Q. Find the direction cosines of the line passing through points $(-2, 4, -5)$ and $(1, 2, 3)$.
$(1-(-2), 2-4, 3-(-5)) = (3, -2, 8)$
$PQ = \sqrt{9 + 4 + 64} = \sqrt{77}$
$\left(\frac{3}{\sqrt{77}}, \frac{-2}{\sqrt{77}}, \frac{8}{\sqrt{77}}\right)$
Q. Find the vector and Cartesian equation of the line through point (5, 2, -4) parallel to vector $3\hat{i} + 2\hat{j} - 8\hat{k}$.
$\vec{r} = (5\hat{i} + 2\hat{j} - 4\hat{k}) + \lambda(3\hat{i} + 2\hat{j} - 8\hat{k})$
$\frac{x-5}{3} = \frac{y-2}{2} = \frac{z+4}{-8}$
Q. Show that the lines $\vec{r} = 3\hat{i} + 2\hat{j} - 4\hat{k} + \lambda(\hat{i} + 2\hat{j} + 2\hat{k})$ and $\vec{r} = 5\hat{i} - 2\hat{j} + \mu(3\hat{i} + 2\hat{j} + 6\hat{k})$ are intersecting. Also find the angle between them.
$\vec{b}_1 = \hat{i} + 2\hat{j} + 2\hat{k}$, $\vec{b}_2 = 3\hat{i} + 2\hat{j} + 6\hat{k}$
$\vec{b}_1 \cdot \vec{b}_2 = 3 + 4 + 12 = 19$
$|\vec{b}_1| = \sqrt{1+4+4} = 3$, $|\vec{b}_2| = \sqrt{9+4+36} = 7$
$\cos\theta = \frac{19}{3 \times 7} = \frac{19}{21}$
$\theta = \cos^{-1}\left(\frac{19}{21}\right)$
Q. Show that the line through points $(1, -1, 2)$, $(3, 4, -2)$ is perpendicular to the line through points $(0, 3, 2)$ and $(3, 5, 6)$.
$(3-1, 4-(-1), -2-2) = (2, 5, -4)$
$(3-0, 5-3, 6-2) = (3, 2, 4)$
$2(3) + 5(2) + (-4)(4) = 6 + 10 - 16 = 0$ ✓
Since dot product = 0, lines are perpendicular.
Q. Find the shortest distance between lines $\vec{r} = \hat{i} + 2\hat{j} + \hat{k} + \lambda(\hat{i} - \hat{j} + \hat{k})$ and $\vec{r} = 2\hat{i} - \hat{j} - \hat{k} + \mu(2\hat{i} + \hat{j} + 2\hat{k})$.
$\vec{a}_1 = \hat{i} + 2\hat{j} + \hat{k}$, $\vec{b}_1 = \hat{i} - \hat{j} + \hat{k}$
$\vec{a}_2 = 2\hat{i} - \hat{j} - \hat{k}$, $\vec{b}_2 = 2\hat{i} + \hat{j} + 2\hat{k}$
$\vec{b}_1 \times \vec{b}_2 = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 1 & -1 & 1 \\ 2 & 1 & 2 \end{vmatrix} = -3\hat{i} + 0\hat{j} + 3\hat{k}$
$|\vec{b}_1 \times \vec{b}_2| = \sqrt{9 + 0 + 9} = 3\sqrt{2}$
$\vec{a}_2 - \vec{a}_1 = \hat{i} - 3\hat{j} - 2\hat{k}$
$d = \frac{|(-3)(1) + 0(-3) + 3(-2)|}{3\sqrt{2}} = \frac{|-9|}{3\sqrt{2}} = \frac{3}{\sqrt{2}}$
Q. Find the angle between the lines $\frac{x-2}{2} = \frac{y-1}{5} = \frac{z+3}{-3}$ and $\frac{x+2}{-1} = \frac{y-4}{8} = \frac{z-5}{4}$.
$a_1, b_1, c_1 = 2, 5, -3$
$a_2, b_2, c_2 = -1, 8, 4$
$2(-1) + 5(8) + (-3)(4) = -2 + 40 - 12 = 26$
$\sqrt{4+25+9} = \sqrt{38}$
$\sqrt{1+64+16} = \sqrt{81} = 9$
$\cos\theta = \frac{26}{9\sqrt{38}}$
$\theta = \cos^{-1}\left(\frac{26}{9\sqrt{38}}\right)$
Q. Find the distance between parallel lines $\vec{r} = \hat{i} + 2\hat{j} - 4\hat{k} + \lambda(2\hat{i} + 3\hat{j} + 6\hat{k})$ and $\vec{r} = 3\hat{i} + 3\hat{j} - 5\hat{k} + \mu(2\hat{i} + 3\hat{j} + 6\hat{k})$.
$\vec{a}_1 = \hat{i} + 2\hat{j} - 4\hat{k}$, $\vec{a}_2 = 3\hat{i} + 3\hat{j} - 5\hat{k}$
$\vec{b} = 2\hat{i} + 3\hat{j} + 6\hat{k}$, $|\vec{b}| = \sqrt{4+9+36} = 7$
$\vec{a}_2 - \vec{a}_1 = 2\hat{i} + \hat{j} - \hat{k}$
$\vec{b} \times (\vec{a}_2 - \vec{a}_1) = \begin{vmatrix} \hat{i} & \hat{j} & \hat{k} \\ 2 & 3 & 6 \\ 2 & 1 & -1 \end{vmatrix}$
$= \hat{i}(-3 - 6) - \hat{j}(-2 - 12) + \hat{k}(2 - 6) = -9\hat{i} + 14\hat{j} - 4\hat{k}$
$|\vec{b} \times (\vec{a}_2 - \vec{a}_1)| = \sqrt{81 + 196 + 16} = \sqrt{293}$
$d = \frac{\sqrt{293}}{7}$
Q. If a line makes angles $90°, 135°, 45°$ with $x, y, z$ axes respectively, find its direction cosines.
$l = \cos 90° = 0$
$m = \cos 135° = -\frac{1}{\sqrt{2}}$
$n = \cos 45° = \frac{1}{\sqrt{2}}$
$l^2 + m^2 + n^2 = 0 + \frac{1}{2} + \frac{1}{2} = 1$ ✓