A vector from the point on to the point on is
Choosing the opposite direction negates this vector and does not change its norm or the shortest distance.
For nonparallel direction vectors, let . Every joining vector has the same normal component, . Its norm is therefore at least the absolute value of that component. Minimizing makes it perpendicular to both directions, and hence parallel to , attaining the bound:
The expression printed without absolute values is an oriented separation, not a nonnegative distance. Reversing either line's parametrization can flip its sign. For parallel nonzero directions, this normal is undefined and the distance is instead .
Write , , and . Differentiating with respect to the two parameters gives
For nonparallel directions, . Solving this linear system yields
The quadratic being minimized is strictly convex in the two parameters under this nonparallel assumption, so the critical point gives the unique pair of closest points. Parallel lines do not select a unique value of .

Articles by others on the same topic (0)

There are currently no matching articles.