Skip to content

Mathematics · Ch 11 — Three-Dimensional Geometry

Distance Between Two Skew Lines

11.5.1

Distance Between Two Skew Lines

11.5.1 Distance Between Two Skew Lines

Understanding Skew Lines

Two lines in space that are neither parallel nor intersecting are called skew lines — they do not lie in the same plane and never meet. The shortest distance between them is the length of the segment perpendicular to both lines; this common perpendicular is unique.


Vector Form: Deriving the Shortest Distance Formula

Consider two skew lines:

l1:r⃗=a⃗1+λb⃗1l_1: \vec{r} = \vec{a}_1 + \lambda \vec{b}_1

l2:r⃗=a⃗2+μb⃗2l_2: \vec{r} = \vec{a}_2 + \mu \vec{b}_2

Here a⃗1\vec{a}_1 is the position vector of a point SS on l1l_1, a⃗2\vec{a}_2 of a point TT on l2l_2, and b⃗1\vec{b}_1, b⃗2\vec{b}_2 are the direction vectors.

Let PQ→\overrightarrow{PQ} be the shortest-distance segment. Being perpendicular to both lines, it is perpendicular to both b⃗1\vec{b}_1 and b⃗2\vec{b}_2.

Important

The direction of the shortest distance vector is perpendicular to both b⃗1\vec{b}_1 and b⃗2\vec{b}_2, so it is along b⃗1×b⃗2\vec{b}_1 \times \vec{b}_2.

The unit vector along the shortest distance is:

n^=b⃗1×b⃗2∣b⃗1×b⃗2∣\hat{n} = \frac{\vec{b}_1 \times \vec{b}_2}{|\vec{b}_1 \times \vec{b}_2|}

Write PQ→=d n^\overrightarrow{PQ} = d\,\hat{n}, where dd is the shortest distance. The vector ST→=a⃗2−a⃗1\overrightarrow{ST} = \vec{a}_2 - \vec{a}_1 joins a point on l1l_1 to a point on l2l_2, and dd equals the magnitude of the projection of ST→\overrightarrow{ST} onto n^\hat{n}:

d=∣ST→⋅n^∣=∣(a⃗2−a⃗1)⋅b⃗1×b⃗2∣b⃗1×b⃗2∣∣d = |\overrightarrow{ST} \cdot \hat{n}| = \left| (\vec{a}_2 - \vec{a}_1) \cdot \frac{\vec{b}_1 \times \vec{b}_2}{|\vec{b}_1 \times \vec{b}_2|} \right|

Shortest distance between two skew lines (vector form)

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣∣b⃗1×b⃗2∣d = \frac{|(\vec{b}_1 \times \vec{b}_2) \cdot (\vec{a}_2 - \vec{a}_1)|}{|\vec{b}_1 \times \vec{b}_2|}

The numerator is the absolute value of the scalar triple product [b⃗1  b⃗2  (a⃗2−a⃗1)][\vec{b}_1\;\vec{b}_2\;(\vec{a}_2 - \vec{a}_1)].

Watch out

If b⃗1×b⃗2=0⃗\vec{b}_1 \times \vec{b}_2 = \vec{0}, the lines are parallel (or coincident), not skew. This formula applies only when the cross product is non-zero.


Cartesian Form: Shortest Distance Between Skew Lines

Let the two skew lines be given in symmetric (cartesian) form:

l1:x−x1a1=y−y1b1=z−z1c1l_1: \frac{x - x_1}{a_1} = \frac{y - y_1}{b_1} = \frac{z - z_1}{c_1}

l2:x−x2a2=y−y2b2=z−z2c2l_2: \frac{x - x_2}{a_2} = \frac{y - y_2}{b_2} = \frac{z - z_2}{c_2}

with direction ratios (a1,b1,c1)(a_1, b_1, c_1) and (a2,b2,c2)(a_2, b_2, c_2). Substituting a⃗1=(x1,y1,z1)\vec{a}_1 = (x_1, y_1, z_1), b⃗1=(a1,b1,c1)\vec{b}_1 = (a_1, b_1, c_1), a⃗2=(x2,y2,z2)\vec{a}_2 = (x_2, y_2, z_2), b⃗2=(a2,b2,c2)\vec{b}_2 = (a_2, b_2, c_2) into the vector formula:

Shortest distance between two skew lines (cartesian form)

d=∣∣x2−x1y2−y1z2−z1a1b1c1a2b2c2∣∣(b1c2−b2c1)2+(c1a2−c2a1)2+(a1b2−a2b1)2d = \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}}

The numerator is the determinant formed by the difference vector and the two direction vectors; the denominator is the magnitude of their cross product.


11.5.2 Distance Between Parallel Lines

Parallel lines are coplanar, so the distance between them is the perpendicular distance from any point on one line to the other. Let:

l1:r⃗=a⃗1+λb⃗l_1: \vec{r} = \vec{a}_1 + \lambda \vec{b}

l2:r⃗=a⃗2+μb⃗l_2: \vec{r} = \vec{a}_2 + \mu \vec{b}

sharing direction vector b⃗\vec{b}, with SS on l1l_1 (position a⃗1\vec{a}_1) and TT on l2l_2 (position a⃗2\vec{a}_2).

Tip

For parallel lines, the shortest distance is the length of the perpendicular from any point on one line to the other. Choose the simplest point available.

Let PP be the foot of the perpendicular from TT onto l1l_1, so the required distance is ∣TP→∣|\overrightarrow{TP}|. With ST→=a⃗2−a⃗1\overrightarrow{ST} = \vec{a}_2 - \vec{a}_1 and θ\theta the angle between ST→\overrightarrow{ST} and b⃗\vec{b}:

∣ST→×b⃗∣=∣ST→∣ ∣b⃗∣ sin⁡θ=∣TP→∣ ∣b⃗∣|\overrightarrow{ST} \times \vec{b}| = |\overrightarrow{ST}|\,|\vec{b}|\,\sin\theta = |\overrightarrow{TP}|\,|\vec{b}| …

Figure 11.6Two skew lines l1 and l2 with points S and T, the join ST, and the common-perpendicular segment PQ giving the shortest distance, meeting both lines at right angles.
Fig. 11.6 — Two skew lines l1 and l2 with points S and T, the join ST, and the common-perpendicular segment PQ giving the shortest distance, meeting both lines at right angles.

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.

Fig 11.6 is the key visual for understanding the shortest distance between two skew lines. It shows two non-parallel, non-intersecting lines in space — the defining property of skew lines. The lower line is labelled l1l_1, the upper line l2l_2, each drawn as an indigo arrow to indicate direction.

Two arbitrary points are marked: point SS on l1l_1 and point TT on l2l_2, connected by a segment STST. This segment is not perpendicular to either line — it is just any line joining a point on one skew line to a point on the other. The figure then introduces the critical feature: a segment PQPQ that rises vertically from PP on l1l_1 to QQ on l2l_2. This segment is drawn as an upward arrow, and it meets l1l_1 at a right angle. The text tells us PQPQ is perpendicular to both l1l_1 and l2l_2. That is the shortest distance segment — the unique line segment that is simultaneously orthogonal to both skew lines.

The physical idea is simple: among all possible segments joining a point on l1l_1 to a point on l2l_2, the one that is perpendicular to both lines is the shortest. Any other segment, like STST, is longer because it has a component along the direction of the lines. The figure makes this geometric fact concrete: PQPQ is the "straightest" bridge between the two lines.

The textbook uses this figure to derive the formula for the shortest distance dd. The derivation proceeds as follows. Let the lines be given in vector form:

r⃗=a⃗1+λb⃗1andr⃗=a⃗2+μb⃗2\vec{r} = \vec{a}_1 + \lambda \vec{b}_1 \quad \text{and} \quad \vec{r} = \vec{a}_2 + \mu \vec{b}_2

where a⃗1\vec{a}_1 and a⃗2\vec{a}_2 are position vectors of points on l1l_1 and l2l_2 (here SS and TT), and b⃗1\vec{b}_1, b⃗2\vec{b}_2 are direction vectors. The vector PQ→\overrightarrow{PQ} is the shortest distance vector. Since it is perpendicular to both b⃗1\vec{b}_1 and b⃗2\vec{b}_2, a unit vector along it is:

n^=b⃗1×b⃗2∣b⃗1×b⃗2∣\hat{n} = \frac{\vec{b}_1 \times \vec{b}_2}{|\vec{b}_1 \times \vec{b}_2|}

Then PQ→=d n^\overrightarrow{PQ} = d\,\hat{n}, where dd is the magnitude we want. Now consider ST→=a⃗2−a⃗1\overrightarrow{ST} = \vec{a}_2 - \vec{a}_1. The projection of ST→\overrightarrow{ST} onto n^\hat{n} gives the component of STST along the shortest distance direction. Since PQPQ is exactly that component (the perpendicular drop), we have:

d=∣ST→⋅n^∣d = |\overrightarrow{ST} \cdot \hat{n}|

Substituting n^\hat{n} gives the central formula:

d=∣(b⃗1×b⃗2)⋅(a⃗2−a⃗1)∣∣b⃗1×b⃗2∣d = \frac{|(\vec{b}_1 \times \vec{b}_2) \cdot (\vec{a}_2 - \vec{a}_1)|}{|\vec{b}_1 \times \vec{b}_2|}

In words: the shortest distance between two skew lines equals the absolute value of the scalar triple product of their direction vectors and the vector joining a point on each line, divided by the magnitude of the cross product of the direction vectors. The denominator ∣b⃗1×b⃗2∣|\vec{b}_1 \times \vec{b}_2| is the area of the parallelogram formed by the two direction vectors; the numerator is the volume of the parallelepiped they span with a⃗2−a⃗1\vec{a}_2 - \vec{a}_1. The distance dd is the height of that parallelepiped — the perpendicular distance between the two lines. …