Angle Between Lines &
Shortest Distance
Learn to find angles between intersecting lines and the shortest distance between skew lines in 3D space.
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:
The modulus gives the acute angle (since lines don't have orientation)
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|$$Parallel and Perpendicular Lines
| Condition | Vector Form | Cartesian 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$ |
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 are lines that do not intersect and are not parallel. They have a unique shortest distance between them.
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:
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}$:
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}$:
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
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}$):
This gives the perpendicular distance between the two parallel lines.
Solved Examples
Find the angle between lines with DRs $(1, 2, 2)$ and $(3, 4, 0)$.
Show that lines with DRs $(1,-2,2)$ and $(2,2,1)$ are perpendicular.
Since the dot product $= 0$, the lines are perpendicular. ✓
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})$.
$\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}$$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.
$(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$$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}$.
$(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}$$Board & JEE 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)
- 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
- 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