Skip to content

Mathematics · Ch 6 — Line and Plane

Distance between skew lines

6.3.1

Distance between skew lines

Theorem 6.6 (Distance between skew lines). If line L1L_1 has vector equation r⃗=a⃗1+λ1b⃗1\vec r = \vec a_1 + \lambda_1 \vec b_1 and line L2L_2 has vector equation r⃗=a⃗2+λ2b⃗2\vec r = \vec a_2 + \lambda_2 \vec b_2, then the shortest distance between L1L_1 and L2L_2 is

d=∣(a⃗2−a⃗1)⋅(b⃗1×b⃗2)∣b⃗1×b⃗2∣∣d = \left|\dfrac{(\vec a_2 - \vec a_1)\cdot(\vec b_1\times\vec b_2)}{|\vec b_1\times\vec b_2|}\right|

Proof (outline). Let L1L_1 pass through the point A(a⃗1)A(\vec a_1) in the direction b⃗1\vec b_1, and let L2L_2 pass through B(a⃗2)B(\vec a_2) in the direction b⃗2\vec b_2. Let PQPQ be the unique line segment perpendicular to both L1L_1 and L2L_2, with PP on L1L_1 and QQ on L2L_2 (see Fig. 6.6) -- this is exactly the segment whose length is the shortest distance we want. Since PQPQ is perpendicular to both b⃗1\vec b_1 and b⃗2\vec b_2, it must be parallel to b⃗1×b⃗2\vec b_1\times\vec b_2, because the cross product of two vectors is, by definition, perpendicular to both of them. So the unit vector along PQPQ is n^=b⃗1×b⃗2∣b⃗1×b⃗2∣\hat n = \dfrac{\vec b_1\times\vec b_2}{|\vec b_1\times\vec b_2|}.

Now PQPQ is the length of the projection of AB→\overrightarrow{AB} along n^\hat n, i.e. PQ=AB→⋅n^PQ = \overrightarrow{AB}\cdot\hat n. Since AB→=a⃗2−a⃗1\overrightarrow{AB} = \vec a_2-\vec a_1, this gives

PQ=(a⃗2−a⃗1)⋅n^=(a⃗2−a⃗1)⋅(b⃗1×b⃗2)∣b⃗1×b⃗2∣,PQ = (\vec a_2-\vec a_1)\cdot\hat n = \dfrac{(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)}{|\vec b_1\times\vec b_2|},

and taking the modulus (distance is never negative) gives the formula of Theorem 6.6.

Remark -- the intersection test. Two lines intersect each other if and only if the shortest distance between them is zero. Combined with Theorem 6.6, this means that lines r⃗=a⃗1+λ1b⃗1\vec r=\vec a_1+\lambda_1\vec b_1 and r⃗=a⃗2+λ2b⃗2\vec r=\vec a_2+\lambda_2\vec b_2 intersect each other if and only if

(a⃗2−a⃗1)⋅(b⃗1×b⃗2)=0.(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2) = 0.

In Cartesian form, if the lines are x−x1a1=y−y1b1=z−z1c1\dfrac{x-x_1}{a_1}=\dfrac{y-y_1}{b_1}=\dfrac{z-z_1}{c_1} and x−x2a2=y−y2b2=z−z2c2\dfrac{x-x_2}{a_2}=\dfrac{y-y_2}{b_2}=\dfrac{z-z_2}{c_2}, they intersect each other if and only if

∣x2−x1y2−y1z2−z1a1b1c1a2b2c2∣=0.\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.

This determinant is exactly the scalar triple product (a⃗2−a⃗1)⋅(b⃗1×b⃗2)(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2) written out in coordinates -- the same test in a different notation, useful when the lines are given directly in symmetric (Cartesian) form instead of vector form. If a pair of lines is neither parallel nor satisfies this condition, the lines are skew.

Ex.(14) Find the shortest distance between lines r⃗=(2i^−j^)+λ(2i^+j^−3k^)\vec r=(2\hat i-\hat j)+\lambda(2\hat i+\hat j-3\hat k) and r⃗=(i^−j^+2k^)+μ(2i^+j^−5k^)\vec r=(\hat i-\hat j+2\hat k)+\mu(2\hat i+\hat j-5\hat k)

Solution. Here a⃗1=2i^−j^\vec a_1=2\hat i-\hat j, a⃗2=i^−j^+2k^\vec a_2=\hat i-\hat j+2\hat k, b⃗1=2i^+j^−3k^\vec b_1=2\hat i+\hat j-3\hat k, b⃗2=2i^+j^−5k^\vec b_2=2\hat i+\hat j-5\hat k.

a⃗2−a⃗1=(i^−j^+2k^)−(2i^−j^)=−i^+2k^\vec a_2-\vec a_1=(\hat i-\hat j+2\hat k)-(2\hat i-\hat j)=-\hat i+2\hat k

b⃗1×b⃗2=∣i^j^k^21−321−5∣=i^(1(−5)−(−3)(1))−j^(2(−5)−(−3)(2))+k^(2(1)−1(2))=−2i^+4j^\vec b_1\times\vec b_2=\begin{vmatrix}\hat i&\hat j&\hat k\\2&1&-3\\2&1&-5\end{vmatrix}=\hat i\big(1(-5)-(-3)(1)\big)-\hat j\big(2(-5)-(-3)(2)\big)+\hat k\big(2(1)-1(2)\big)=-2\hat i+4\hat j

∣b⃗1×b⃗2∣=4+16=20=25|\vec b_1\times\vec b_2|=\sqrt{4+16}=\sqrt{20}=2\sqrt5

(a⃗2−a⃗1)⋅(b⃗1×b⃗2)=(−i^+2k^)⋅(−2i^+4j^)=2(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)=(-\hat i+2\hat k)\cdot(-2\hat i+4\hat j)=2

∴d=∣225∣=15 unit\therefore d=\left|\dfrac{2}{2\sqrt5}\right|=\dfrac{1}{\sqrt5}\text{ unit}

Ex.(15) Find the shortest distance between lines x−12=y−23=z−34\dfrac{x-1}{2}=\dfrac{y-2}{3}=\dfrac{z-3}{4} and x−23=y−44=z−55\dfrac{x-2}{3}=\dfrac{y-4}{4}=\dfrac{z-5}{5}

Solution. The vector forms of the given lines are r⃗=(i^+2j^+3k^)+λ(2i^+3j^+4k^)\vec r=(\hat i+2\hat j+3\hat k)+\lambda(2\hat i+3\hat j+4\hat k) and r⃗=(2i^+4j^+5k^)+μ(3i^+4j^+5k^)\vec r=(2\hat i+4\hat j+5\hat k)+\mu(3\hat i+4\hat j+5\hat k), so a⃗1=i^+2j^+3k^\vec a_1=\hat i+2\hat j+3\hat k, a⃗2=2i^+4j^+5k^\vec a_2=2\hat i+4\hat j+5\hat k, b⃗1=2i^+3j^+4k^\vec b_1=2\hat i+3\hat j+4\hat k, b⃗2=3i^+4j^+5k^\vec b_2=3\hat i+4\hat j+5\hat k.

a⃗2−a⃗1=i^+2j^+2k^\vec a_2-\vec a_1=\hat i+2\hat j+2\hat k

b⃗1×b⃗2=∣i^j^k^234345∣=−i^+2j^−k^,∣b⃗1×b⃗2∣=1+4+1=6\vec b_1\times\vec b_2=\begin{vmatrix}\hat i&\hat j&\hat k\\2&3&4\\3&4&5\end{vmatrix}=-\hat i+2\hat j-\hat k,\qquad |\vec b_1\times\vec b_2|=\sqrt{1+4+1}=\sqrt6 …

Figure 6.6Fig. 6.6 — Distance between skew lines L₁ and L₂ = length of the common perpendicular PQ (perpendicular to both lines)
Fig. 6.6 — Fig. 6.6 — Distance between skew lines L₁ and L₂ = length of the common perpendicular PQ (perpendicular to both lines)

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

What this figure shows. Fig. 6.6 illustrates the proof of Theorem 6.6 for two skew lines L1 and L2. L1 passes through point A(a-bar 1) in the direction of b-bar 1, and L2 passes through point B(a-bar 2) in the direction of b-bar 2. The unique common-perpendicular segment PQ is drawn with P marked on L1 and Q marked on L2, each shown with a right-angle symbol, to show that PQ is perpendicular to both b-bar 1 and b-bar 2 simultaneously -- the length of PQ is exactly the shor …