Example 9: Shortest distance between two skew lines in vector form
Find the shortest distance between the lines and whose vector equations are
and
Comparing (1) and (2) with and :
,
,
The shortest distance is
The shortest distance is units.
Want the reason behind every step, the basics and the checks?
The shortest segment between two skew lines is perpendicular to both lines, so it points along . Join any point of to any point of (we use and ); the shadow of this joining vector on the direction is the shortest distance, whichever two points we chose.
- Given
- : ; : .
- To find
- The shortest distance between and .
- Plan
- (1) Read off . (2) Find . (3) Find . (4) Find its length. (5) Find the dot product. (6) Put everything into the formula. (7) Check by finding the closest points themselves.
Basics you need
For and (Section 11.5.1):
is perpendicular to both and ; it is computed as a determinant with in the top row (Section 10.6.3). Basics: the cross product
The projection of on the direction of has length (Section 10.6.2). Basics: the shadow on the gap direction
Lines in space that are neither parallel nor intersecting (Section 11.5). Lesson: skew lines
Solution
Read off the points and directions
Compare (1) with and (2) with : the vector multiplied by the parameter is the direction, the rest is a point. So passes through (there is no term, so its -coordinate is 0) and through .Vector equation of a line, Section 11.3.1. Basics: a⃗ + λb⃗The joining vector
This is , from the point of to the point of . Its component is 0, which we must remember when taking the dot product later.Vector joining two points: terminal minus initial (Section 10.5.2). Basics: points in spaceThe cross product
Expand along the top row; the term carries a minus sign. The result is perpendicular to both directions: and . So it points along the common perpendicular of the two lines. It is not the zero vector, so the lines are not parallel.Determinant form of the cross product (Section 10.6.3). Basics: a⃗ × b⃗ stands up from bothIts length
We divide by this length so that only the direction of counts: is the unit vector of equation (3) in Section 11.5.1.Length of a vector. Basics: Pythagoras in 3DThe dot product
Multiply matching components of and and add. The last product is : two negatives give a positive.Put it into the formula
This is the length of the projection of on the unit vector along the common perpendicular: , where is the angle between and . The modulus makes the distance positive whichever way points. One misprint to watch: the final formula for on page 387 of the book (set in bold) prints where is meant; the derivation just before it, and this example, both use the difference.Section 11.5.1, shortest distance between skew lines. Lesson: the shortest distanceCheck: find the closest points
Let on and on . The segment is shortest when it is perpendicular to both lines:
Here , that is
and the two conditions become
so and . Then
Oblique projection, not to scale (lengths and right angles are not shown true). passes through and through . The common perpendicular has length ; (dashed) is longer, . This works the problem from scratch, without the formula, and gets the same distance. comes out as a multiple of , as the formula assumes. Since , the lines do not meet, and Step 3 showed they are not parallel, so they are skew. The given points are not the closest ones: .The line of shortest distance is perpendicular to both lines (Section 11.5). Lesson: skew lines
The shortest distance between and is units . The lines are skew.
(Textbook answer: .)
, so . The closest points are , about , and , about ; the distance between them is again. For comparison, .
- The sign of the term. In the determinant the middle term is ; forgetting the minus gives and the wrong dot product.
- Using , copying the misprint in the book's final formula on page 387. The formula needs the difference .
- Forgetting the zero component. ; the part contributes 0, not .
- Dividing by the wrong length. The bottom is , not .
- Skew lines: .
- gives the direction of the common perpendicular; the dot product projects the joining vector onto it.
- If the answer is 0 the lines meet; if the lines are parallel and a different formula is needed (Example 10).
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Reading and from | Step 1 | Section 11.3.1 (Basics) |
| Vector joining two points | Step 2 | Section 10.5.2 |
| as a determinant; it is perpendicular to both vectors | Step 3 | Section 10.6.3 (Basics) |
| , | Steps 4, 6 | Section 11.5.1, equation (3) and Fig 11.6 (Basics) |
| ; the final form on p. 387 misprints as | Step 6 | Section 11.5.1 (Lesson) |
| Dot product in components | Steps 3, 5, 7 | Section 10.6.1 (Basics) |
| Shortest segment is perpendicular to both skew lines; skew lines | Step 7 | Section 11.5 (Lesson) |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →