Three-Dimensional Geometry • Topic 3 of 3

Angle Between Lines & Shortest Distance

With two lines given by their direction vectors, two natural quantities arise: the angle between them and (if they do not meet) the shortest distance.

Angle between two lines

If the lines have direction vectors $\vec b_1,\vec b_2$, the angle $\theta$ between them satisfies

$$\cos\theta=\frac{|\vec b_1\cdot\vec b_2|}{|\vec b_1||\vec b_2|}.$$

They are perpendicular if $\vec b_1\cdot\vec b_2=0$ and parallel if $\vec b_1\times\vec b_2=\vec 0$.

Shortest distance between skew lines

For lines $\vec r=\vec a_1+\lambda\vec b_1$ and $\vec r=\vec a_2+\mu\vec b_2$, the shortest distance is

$$d=\frac{\left|(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)\right|}{|\vec b_1\times\vec b_2|}.$$

If $d=0$ the lines intersect (are coplanar). For parallel lines use $d=\dfrac{|(\vec a_2-\vec a_1)\times\vec b|}{|\vec b|}$.

1
Worked Example
Find the angle between lines with directions $\vec b_1=\hat i+\hat j+\hat k$ and $\vec b_2=\hat i-\hat j+\hat k$.
Solution

$\vec b_1\cdot\vec b_2=1-1+1=1$. $|\vec b_1|=|\vec b_2|=\sqrt3$. $\cos\theta=\dfrac{|1|}{3}=\dfrac13$, so $\theta=\cos^{-1}\tfrac13.$

2
Worked Example
Show the lines with directions $\hat i+\hat j$ and $\hat i-\hat j$ are perpendicular.
Solution

$\vec b_1\cdot\vec b_2=1\cdot1+1\cdot(-1)=0$, so the lines are perpendicular.

3
Worked Example
Are lines with directions $2\hat i+4\hat j+6\hat k$ and $\hat i+2\hat j+3\hat k$ parallel?
Solution

The first is $2\times$ the second, so $\vec b_1\times\vec b_2=\vec 0$. The lines are parallel.

4
Worked Example
State the shortest-distance formula and the condition for two lines to intersect.
Solution

$d=\dfrac{|(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)|}{|\vec b_1\times\vec b_2|}$. The lines intersect (are coplanar) when $d=0$, i.e. $(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)=0$.

Key Points

  • Angle between lines: $\cos\theta=\dfrac{|\vec b_1\cdot\vec b_2|}{|\vec b_1||\vec b_2|}$.
  • Perpendicular $\iff \vec b_1\cdot\vec b_2=0$; parallel $\iff \vec b_1\times\vec b_2=\vec 0$.
  • Skew shortest distance: $d=\dfrac{|(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)|}{|\vec b_1\times\vec b_2|}$.
  • $d=0$ means the lines intersect (coplanar).
Tap an option to check your answer0 / 4
Q1.Two lines are perpendicular when their direction vectors satisfy:
Explanation: Zero dot product.
Q2.The cosine of the angle between lines uses:
Explanation: Dot-product angle formula.
Q3.Skew lines intersect when the shortest distance is:
Explanation: $d=0$ means coplanar/intersecting.
Q4.Lines with directions $2\hat i+4\hat j+6\hat k$ and $\hat i+2\hat j+3\hat k$ are:
Explanation: One is a scalar multiple of the other.