Chapter 11 · Three Dimensional Geometry · Topic 03

Angle Between Lines &
Shortest Distance

Learn to find angles between intersecting lines and the shortest distance between skew lines in 3D space.

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

Angle Between Two Lines

If two lines have direction vectors $\vec{b_1}$ and $\vec{b_2}$, the acute angle $\theta$ between them is found using the dot product:

📐 Angle — Vector Form
$$\cos\theta = \left|\frac{\vec{b_1} \cdot \vec{b_2}}{|\vec{b_1}|\ |\vec{b_2}|}\right|$$

The modulus gives the acute angle (since lines don't have orientation)

📐 Angle — Cartesian Form

If DRs of two lines are $(a_1,b_1,c_1)$ and $(a_2,b_2,c_2)$:

$$\cos\theta = \left|\frac{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}}\right|$$
02

Parallel and Perpendicular Lines

ConditionVector FormCartesian Form
Parallel ($\theta=0°$) $\vec{b_1} \times \vec{b_2} = \vec{0}$
or $\vec{b_1} = k\vec{b_2}$
$\dfrac{a_1}{a_2} = \dfrac{b_1}{b_2} = \dfrac{c_1}{c_2}$
Perpendicular ($\theta=90°$) $\vec{b_1} \cdot \vec{b_2} = 0$ $a_1a_2+b_1b_2+c_1c_2=0$
Mnemonic: Parallel → Cross product is ZERO. Perpendicular → Dot product is ZERO. They're opposite!
03

Skew Lines

In 3D, two lines can be:

  • Intersecting — they meet at exactly one point
  • Parallel — same direction, never meet
  • Skew lines — neither parallel nor intersecting; they lie in different planes
🌀 Skew Lines

Skew lines are lines that do not intersect and are not parallel. They have a unique shortest distance between them.

How to Check if Lines are Coplanar (Intersecting or Parallel)

Two lines $\vec{r}=\vec{a_1}+\lambda\vec{b_1}$ and $\vec{r}=\vec{a_2}+\mu\vec{b_2}$ are coplanar if and only if:

📌 Coplanarity Condition (Vector)
$$(\vec{a_2}-\vec{a_1})\cdot(\vec{b_1}\times\vec{b_2}) = 0$$
📌 Coplanarity Condition (Cartesian)
$$\begin{vmatrix} x_2-x_1 & y_2-y_1 & z_2-z_1 \\ a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \end{vmatrix} = 0$$
04

Shortest Distance Between Skew Lines

For two skew lines $\vec{r}=\vec{a_1}+\lambda\vec{b_1}$ and $\vec{r}=\vec{a_2}+\mu\vec{b_2}$:

⭐ Shortest Distance Formula — Vector Form
$$d = \frac{|(\vec{a_2}-\vec{a_1})\cdot(\vec{b_1}\times\vec{b_2})|}{|\vec{b_1}\times\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}$:

⭐ Shortest Distance Formula — Cartesian Form
$$d = \frac{\left|\begin{vmatrix} x_2-x_1 & y_2-y_1 & z_2-z_1 \\ a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \end{vmatrix}\right|}{\sqrt{(b_1c_2-b_2c_1)^2+(c_1a_2-c_2a_1)^2+(a_1b_2-a_2b_1)^2}}$$
Note: The denominator $= |\vec{b_1}\times\vec{b_2}|$. If $d = 0$, the lines are coplanar (intersecting or parallel).
Understanding the Formula

The shortest distance lies along the common perpendicular — a line segment that is perpendicular to both lines simultaneously.

  • $\vec{b_1}\times\vec{b_2}$ gives a vector perpendicular to both direction vectors
  • $\hat{n} = \dfrac{\vec{b_1}\times\vec{b_2}}{|\vec{b_1}\times\vec{b_2}|}$ is the unit normal to the common perpendicular
  • Project $\vec{a_2}-\vec{a_1}$ onto $\hat{n}$ to get the distance
05

Distance Between Parallel Lines

For parallel lines $\vec{r}=\vec{a_1}+\lambda\vec{b}$ and $\vec{r}=\vec{a_2}+\mu\vec{b}$ (same direction $\vec{b}$):

📏 Distance Between Parallel Lines
$$d = \frac{|(\vec{a_2}-\vec{a_1})\times\vec{b}|}{|\vec{b}|}$$

This gives the perpendicular distance between the two parallel lines.

06

Solved Examples

Board LevelExample 1 — Angle Between Two Lines

Find the angle between lines with DRs $(1, 2, 2)$ and $(3, 4, 0)$.

Solution
$$\cos\theta = \left|\frac{(1)(3)+(2)(4)+(2)(0)}{\sqrt{1+4+4}\cdot\sqrt{9+16+0}}\right| = \left|\frac{3+8+0}{3\cdot 5}\right| = \frac{11}{15}$$ $$\theta = \cos^{-1}\!\left(\frac{11}{15}\right)$$
Board LevelExample 2 — Perpendicularity Check

Show that lines with DRs $(1,-2,2)$ and $(2,2,1)$ are perpendicular.

Solution
$$a_1a_2+b_1b_2+c_1c_2 = (1)(2)+(-2)(2)+(2)(1) = 2-4+2 = 0$$

Since the dot product $= 0$, the lines are perpendicular. ✓

Board LevelExample 3 — Shortest Distance (Vector)

Find the shortest distance between $\vec{r} = (4\hat{i}-\hat{j})+\lambda(\hat{i}+2\hat{j}-3\hat{k})$ and $\vec{r} = (\hat{i}-\hat{j}+2\hat{k})+\mu(2\hat{i}+4\hat{j}-5\hat{k})$.

Solution

$\vec{a_1}=4\hat{i}-\hat{j}$, $\vec{a_2}=\hat{i}-\hat{j}+2\hat{k}$, $\vec{b_1}=\hat{i}+2\hat{j}-3\hat{k}$, $\vec{b_2}=2\hat{i}+4\hat{j}-5\hat{k}$

$\vec{a_2}-\vec{a_1} = -3\hat{i}+0\hat{j}+2\hat{k}$

$$\vec{b_1}\times\vec{b_2} = \begin{vmatrix}\hat{i}&\hat{j}&\hat{k}\\1&2&-3\\2&4&-5\end{vmatrix} = \hat{i}((-10)-(-12))-\hat{j}((-5)-(-6))+\hat{k}(4-4)$$ $$= 2\hat{i}-\hat{j}+0\hat{k}$$ $$|\vec{b_1}\times\vec{b_2}| = \sqrt{4+1} = \sqrt{5}$$ $$(\vec{a_2}-\vec{a_1})\cdot(\vec{b_1}\times\vec{b_2}) = (-3)(2)+(0)(-1)+(2)(0) = -6$$ $$d = \frac{|-6|}{\sqrt{5}} = \frac{6}{\sqrt{5}} = \frac{6\sqrt{5}}{5}$$
JEE LevelExample 4 — Check Coplanarity

Show that the lines $\dfrac{x-1}{3}=\dfrac{y-2}{-1}=\dfrac{z-3}{2}$ and $\dfrac{x-1}{3}=\dfrac{y-1}{2}=\dfrac{z-6}{2}$ are coplanar.

Solution

$(x_1,y_1,z_1)=(1,2,3)$, $(a_1,b_1,c_1)=(3,-1,2)$; $(x_2,y_2,z_2)=(1,1,6)$, $(a_2,b_2,c_2)=(3,2,2)$

$$\Delta = \begin{vmatrix}1-1&1-2&6-3\\3&-1&2\\3&2&2\end{vmatrix} = \begin{vmatrix}0&-1&3\\3&-1&2\\3&2&2\end{vmatrix}$$ $$= 0[(-1)(2)-(2)(2)] - (-1)[(3)(2)-(3)(2)] + 3[(3)(2)-(-1)(3)]$$ $$= 0 - (-1)(0) + 3(6+3) = 0+0+27 \neq 0$$
Wait: Let me recheck the problem. Since $\Delta\neq 0$, these lines are skew, not coplanar. This is a good example showing how to determine the type of lines!
JEE LevelExample 5 — S.D. by Cartesian Formula

Find the shortest distance between lines $\dfrac{x-3}{1}=\dfrac{y-5}{-2}=\dfrac{z-7}{1}$ and $\dfrac{x+1}{7}=\dfrac{y-1}{-6}=\dfrac{z+1}{1}$.

Solution

$(x_1,y_1,z_1)=(3,5,7)$, $(a_1,b_1,c_1)=(1,-2,1)$; $(x_2,y_2,z_2)=(-1,1,-1)$, $(a_2,b_2,c_2)=(7,-6,1)$

$$\text{Numerator} = \begin{vmatrix}-4&-4&-8\\1&-2&1\\7&-6&1\end{vmatrix}$$ $$= -4[(-2)(1)-(-6)(1)]-(-4)[(1)(1)-(7)(1)]+(-8)[(1)(-6)-(-2)(7)]$$ $$= -4(-2+6)+4(1-7)+(-8)(-6+14)$$ $$= -4(4)+4(-6)+(-8)(8) = -16-24-64 = -104$$

$|\text{numerator}| = 104$

$\vec{b_1}\times\vec{b_2}$: using $b_1=(1,-2,1)$, $b_2=(7,-6,1)$:

$$= \hat{i}((-2)(1)-(-6)(1))-\hat{j}((1)(1)-(7)(1))+\hat{k}((1)(-6)-(-2)(7))$$ $$= \hat{i}(-2+6)-\hat{j}(1-7)+\hat{k}(-6+14) = 4\hat{i}+6\hat{j}+8\hat{k}$$ $$|\vec{b_1}\times\vec{b_2}| = \sqrt{16+36+64} = \sqrt{116} = 2\sqrt{29}$$ $$d = \frac{104}{2\sqrt{29}} = \frac{52}{\sqrt{29}} = \frac{52\sqrt{29}}{29}$$
07

Board & JEE Tips

✅ Board Exam Tips
  • For finding angle, always take the acute angle: use $|\cos\theta|$
  • Perpendicular check: $a_1a_2+b_1b_2+c_1c_2=0$ is a 1-line test
  • SD formula is commonly asked for 5 marks — memorise both vector and Cartesian versions
  • If SD comes out to 0, the lines intersect (or are parallel)
⚡ JEE Preparation Tips
  • Practice computing $\vec{b_1}\times\vec{b_2}$ quickly using the determinant shorthand
  • If $|\vec{b_1}\times\vec{b_2}|=0$ (lines parallel), use the parallel line distance formula
  • JEE often asks: "Are the lines coplanar? If not, find SD" — combined question
  • For MCQs: verify coplanarity first using the $3\times3$ determinant
❌ Common Mistakes
  • Forgetting the modulus sign in the angle formula — always take $|\cos\theta|$
  • Using DCs instead of DRs in the angle formula — any proportional values work
  • Computing the cross product incorrectly — practice the $3\times3$ determinant carefully
  • Confusing the SD formula for skew lines vs parallel lines
⚡ Quick Formula Sheet
Angle (Vector)
$\cos\theta=\left|\dfrac{\vec{b_1}\cdot\vec{b_2}}{|\vec{b_1}||\vec{b_2}|}\right|$
Angle (Cartesian)
$\cos\theta=\left|\dfrac{a_1a_2+b_1b_2+c_1c_2}{\sqrt{\Sigma a_1^2}\sqrt{\Sigma a_2^2}}\right|$
Perpendicular
$a_1a_2+b_1b_2+c_1c_2=0$
Parallel
$\dfrac{a_1}{a_2}=\dfrac{b_1}{b_2}=\dfrac{c_1}{c_2}$
S.D. (Skew lines)
$d=\dfrac{|(\vec{a_2}-\vec{a_1})\cdot(\vec{b_1}\times\vec{b_2})|}{|\vec{b_1}\times\vec{b_2}|}$
Coplanarity
$(\vec{a_2}-\vec{a_1})\cdot(\vec{b_1}\times\vec{b_2})=0$
Parallel Line Dist.
$d=\dfrac{|(\vec{a_2}-\vec{a_1})\times\vec{b}|}{|\vec{b}|}$
SD Numerator (Cart.)
$3\times3$ determinant with rows: $(x_2-x_1,y_2-y_1,z_2-z_1)$, $(a_1,b_1,c_1)$, $(a_2,b_2,c_2)$