Skip to content

Mathematics · Ch 11 — Three-Dimensional Geometry

Shortest Distance Between Two Lines

11.5

Shortest Distance Between Two Lines

11.5 Shortest Distance Between Two Lines

Concept of Shortest Distance

The shortest distance between two lines in space is the length of the smallest possible segment joining a point on one line to a point on the other.

For intersecting lines, this distance is zero. For parallel lines, it is the perpendicular distance from any point on one line to the other, which is constant.

A third category exists: lines that are neither intersecting nor parallel. These are called skew lines.

Note

Skew lines are non-coplanar — no single plane can contain both lines. This is what distinguishes them from intersecting or parallel lines, which always lie in some common plane.

For example, in a rectangular room of dimensions 1, 3, 2 units along the xx, yy, and zz-axes, the ceiling diagonal GEGE and the wall diagonal DBDB are skew — they are not parallel and they never meet.

For skew lines, the segment giving the shortest distance is perpendicular to both lines (the common perpendicular).


Shortest Distance for Skew Lines

The shortest distance between two skew lines is the length of the common perpendicular segment — perpendicular to both lines and joining a point on one to a point on the other.

Vector Form

For two skew lines

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

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

where a⃗1\vec{a}_1, a⃗2\vec{a}_2 are position vectors of points on the lines and b⃗1\vec{b}_1, b⃗2\vec{b}_2 are their direction vectors, the shortest distance is:

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|}

Important

The denominator ∣b⃗1×b⃗2∣|\vec{b}_1 \times \vec{b}_2| is non-zero because for skew lines the direction vectors are not parallel (otherwise the lines would be parallel, not skew).

Derivation of the Formula

›Proof

The shortest-distance segment is perpendicular to both lines, so its direction is along b⃗1×b⃗2\vec{b}_1 \times \vec{b}_2. The unit vector along the common perpendicular 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|}

The vector joining a point on L1L_1 (position a⃗1\vec{a}_1) to a point on L2L_2 (position a⃗2\vec{a}_2) is a⃗2−a⃗1\vec{a}_2 - \vec{a}_1. The shortest distance dd is the magnitude of its projection onto n^\hat{n}:

d=∣(a⃗2−a⃗1)⋅n^∣=∣(a⃗2−a⃗1)⋅b⃗1×b⃗2∣b⃗1×b⃗2∣∣d = |(\vec{a}_2 - \vec{a}_1) \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|

Therefore:

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|}

Watch out

A common mistake is to forget the absolute value in the numerator. The distance must be positive, so take the absolute value of the scalar triple product.

Cartesian Form

For skew lines in Cartesian form

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

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

with points (x1,y1,z1)(x_1, y_1, z_1), (x2,y2,z2)(x_2, y_2, z_2) and direction ratios (a1,b1,c1)(a_1, b_1, c_1), (a2,b2,c2)(a_2, b_2, c_2):

d=∣x2−x1y2−y1z2−z1a1b1c1a2b2c2∣(b1c2−b2c1)2+(c1a2−c2a1)2+(a1b2−a2b1)2d = \frac{\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}}{\sqrt{(b_1 c_2 - b_2 c_1)^2 + (c_1 a_2 - c_2 a_1)^2 + (a_1 b_2 - a_2 b_1)^2}}

The numerator is the determinant formed by the vector joining the two points and the two direction vectors; the denominator is ∣b⃗1×b⃗2∣|\vec{b}_1 \times \vec{b}_2| expressed in Cartesian components.


Shortest Distance Between Parallel Lines

For parallel lines the shortest distance is constant — the perpendicular distance from any point on one line to the other.

Vector Form

For parallel lines

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

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

sharing direction vector b⃗\vec{b}:

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

›Proof

Take a⃗2−a⃗1\vec{a}_2 - \vec{a}_1 joining a point on each line. Then ∣(a⃗2−a⃗1)×b⃗∣=∣a⃗2−a⃗1∣ ∣b⃗∣ sin⁡θ|(\vec{a}_2 - \vec{a}_1) \times \vec{b}| = |\vec{a}_2 - \vec{a}_1|\,|\vec{b}|\,\sin\theta, where θ\theta is the angle between a⃗2−a⃗1\vec{a}_2 - \vec{a}_1 and b⃗\vec{b}. Since ∣a⃗2−a⃗1∣ sin⁡θ|\vec{a}_2 - \vec{a}_1|\,\sin\theta is the perpendicular distance from the point to the other line, dividing by ∣b⃗∣|\vec{b}| gives dd.

Cartesian Form

For parallel lines in Cartesian form …

Figure 11.5A room-shaped cuboid on the X, Y, Z axes with vertices O, A, B, C, D, E, F, G showing the two skew lines formed by the ceiling diagonal GE and the wall diagonal DB, each extended with arrows.
Fig. 11.5 — A room-shaped cuboid on the X, Y, Z axes with vertices O, A, B, C, D, E, F, G showing the two skew lines formed by the ceiling diagonal GE and the wall diagonal DB, each extended with arrows.

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

The figure shows a rectangular room drawn as a cuboid with dimensions 1 unit along the xx-axis, 3 units along the yy-axis, and 2 units along the zz-axis. The axes are drawn in an oblique projection so you can see depth. The floor vertices are labelled OO (origin), AA (on the xx-axis), BB (the far floor corner), and CC (on the yy-axis). The ceiling vertices directly above these are GG (on the zz-axis, above OO), DD (above AA), EE (above BB), and FF (above CC). Two skew lines are drawn in indigo, extended beyond the box with arrows at both ends to show they are infinite lines. One line is GEGE, the diagonal across the ceiling from GG to EE. The other line is DBDB, which runs from DD (the ceiling corner directly above AA) diagonally down the wall to BB (the floor corner opposite OO).

The physical idea is simple: these two lines are neither parallel nor intersecting. They lie in different planes — GEGE is entirely in the ceiling plane, DBDB runs from the ceiling down a wall to the floor — so they are non-coplanar. Such lines are called skew lines. The figure makes it visually clear that no matter how far you extend them, they will never meet, and they are not parallel either. The shortest distance between them is the length of the unique line segment that is perpendicular to both lines.

The textbook uses this figure to introduce the concept of the shortest distance between skew lines. The key formulas developed are:

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|}

where:

  • a⃗1\vec{a}_1 and a⃗2\vec{a}_2 are position vectors of any point on line 1 and line 2 respectively.
  • b⃗1\vec{b}_1 and b⃗2\vec{b}_2 are direction vectors of line 1 and line 2 respectively.
  • b⃗1×b⃗2\vec{b}_1 \times \vec{b}_2 is the cross product, giving a vector perpendicular to both lines.
  • The numerator is the absolute value of the scalar triple product, which gives the volume of the parallelepiped formed by the three vectors. Dividing by the area of the base (the magnitude of the cross product) gives the perpendicular height — that height is the shortest distance. …