Quick method to find line of shortest distance for skew lines

In linear algebra it is sometimes needed to find the equation of the line of shortest distance for two skew lines. What follows is a very quick method of finding that line.

Let’s consider an example. Start with two simple skew lines:

s : \begin{cases} x = 1 + t \\ y = 0 \\ z = -t \end{cases}

r : \begin{cases} x = - k \\ y = k + 2 \\ z = k \end{cases}

(Observation: don’t make the mistake of using the same parameter for both lines. Each lines exist on its own, there’s no link between them, so there’s no reason why they should should be described by the same parameter. If this doesn’t seem convincing, get two lines you know to be intersecting, use the same parameter for both and try to find the intersection point.)

The directional vectors are:

V_{s} = (1, 0, -1), V_{r} = (- 1, 1, 1)

So they clearly aren’t parallel. They aren’t incidental as well, because the only possible intersection point is for y = 0, but when y = 0, r is at (2, 0, -2), which doesn’t belong to s. It does indeed make sense to look for the line of shortest distance between the two, confident that we will find a non-zero result.

The idea is to consider the vector linking the two lines in their generic points and then force the perpendicularity with both lines.
We will call the line of shortest distance t. In our case, the vector between the generic points is (obtained as difference from the generic points of the two lines in their parametric form):

V_{t} = (1 + t + k, -k - 2, -t - k)

Imposing perpendicularity gives us:

V_{t} \cdot V_{s} = (1 + t + k, -k - 2, -t - k) \cdot (1, 0, -1) = 1 + 2t + 2k = 0

V_{t} \cdot V_{r} = (1 + t + k, -k - 2, -t - k) \cdot (- 1, 1, 1) = - 3 - 2t - 3k = 0

Solving the two simultaneous linear equations we obtain as solution (t, k) = (\frac{3}{2}, -2).

This solution allows us to quickly get three results:

  1. The equation of the line of shortest distance between the two skew lines: just replace t and k in V_{t} with the values found. In our case, V_{t} = (\frac{1}{2}, 0, \frac{1}{2}).
  2. The intersection point between t and s: just replace t in the parametric equation of s. In our case, V_{s} = (\frac{5}{2}, 0, -\frac{3}{2}).
  3. The intersection point between t and r: just replace k in the parametric equation of r. In our case, V_{r} = (2, 0, -2).

Do you have a quicker method? Share it in the comments!

  • Was this Helpful ?
  • yes   no

2 thoughts on “Quick method to find line of shortest distance for skew lines”

  1. If Vt is s – r then the first term should be (1+t-k , …) not as above.
    This impacts what follows.

    1. Hi Frank,
      thanks for catching the mistake! I’ve changed the directional vector of the first line, so that numbers should be correct now 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *