Mathematics · Ch 9 — Three-Dimensional Geometry
Shortest Distance Between Two Lines
Shortest Distance Between Two Lines
What "shortest distance" means. Given two lines and in space, the shortest distance between them is the length of the shortest possible line segment joining a point of to a point of -- equivalently, the length of the unique segment that is perpendicular to both lines simultaneously (the common perpendicular). For two intersecting lines this distance is trivially ; for two skew lines it is a genuine positive length; for two parallel lines it reduces to the ordinary perpendicular distance between them.
Shortest distance between two skew lines -- derivation. Let and be two skew lines. Since is perpendicular to both and (a defining property of the cross product), it points along the direction of the common perpendicular to both lines -- so the shortest distance is exactly the length of the projection of the vector (joining a point of to a point of ) onto this common-perpendicular direction . The scalar projection of a vector onto a direction is , so
The absolute value is essential: the scalar triple product can come out negative depending on the order the two lines are labelled or the direction chosen for , but a distance is always taken to be non-negative -- a sign flip here reflects only a labelling choice, never an error in the lines themselves. If , the lines are parallel and this formula cannot be used (division by a zero vector) -- the parallel-line formula below applies instead. If the numerator itself works out to while , the lines are not skew after all -- a zero shortest distance between non-parallel lines means they actually intersect (Section 6).
In Cartesian form. If passes through with direction ratios and through with direction ratios , the same formula, written using the scalar triple product as a determinant, is
…