 # Shortest Distance between Two Skew Lines

Initializing live version Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Select four points , , , in three dimensions to determine two lines (green) and (blue). For almost all choices of coordinates, the lines are skew: neither parallel nor intersecting. The goal is to find the shortest distance between the two lines. As a by-product, the shortest segment between the lines is shown in red.

[more]

Write the points as vectors , , , .

The cross-product of the directions of the lines is , which gives a vector perpendicular to both lines. The unit vector in this direction is then . The equations and determine parallel planes through the two lines at distances and from the origin. Therefore, .

Here is one way to find the shortest line segment connecting the two lines. Project the points and to the plane containing the line ; call the projected points and . Let be the intersection of and .

To find the intersection, express the lines in parametric form: and . Set the right-hand sides equal and solve for . Substitute that value of in either equation to find .

Similarly for : Project the points and to the plane containing ; call the projected points ' and . Let be the intersection of and .

[less]

Contributed by: S. M. Blinder (August 2022)
Open content licensed under CC BY-NC-SA

## Snapshots   ## Permanent Citation

S. M. Blinder

 Feedback (field required) Email (field required) Name Occupation Organization Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback. Send