The parametric equation of a straight line through with unit direction is
If the two lines meet, then for some real , so lies in the linear span of their direction vectors. Its dot product with their cross product is consequently zero:
This is not sufficient without excluding parallel lines. For instance , and satisfy it, but the lines are distinct and never meet. For nonparallel lines the condition is sufficient, because the two directions span the plane perpendicular to their nonzero cross product.
For nonparallel skew lines, put . Every joining vector is , with fixed component along . Its length is at least the absolute value of that component. Its perpendicular component can be canceled by a unique choice of , since the two independent directions span . This lower bound is attained, proving the distance between skew lines:
Take points and with directions and . A common normal is , of length . The planes through the two lines with this common normal have separation
This is a lower bound for the distance between skew lines. It is attained at and : the two points are and , whose difference is perpendicular to both directions and has length . Thus the shortest distance is .
Assume the direction vectors are nonzero. The cross product equation is equivalent to
so is parallel to and the locus is the line .
For nonparallel directions, is normal to both lines. Projecting their displacement onto the corresponding unit vector gives the distance between skew lines
If the directions are parallel, the corresponding formula is
The nonparallel direction unit vectors have nonzero cross product. Let
For any joining vector , its normal component is fixed:
Thus its length is at least the absolute value of that component. Since the two line directions span , suitable cancel the entire component in that plane, attaining the bound. Therefore the distance between skew lines, including the zero-distance intersecting case, is
The numerator is a scalar triple product. The nonparallel hypothesis is essential to the denominator and to the spanning argument.
The cross product of the direction vectors is . It is nonzero, so a common perpendicular direction exists. Projecting onto its unit vector gives the distance between skew lines:
Thus
The numerator is a scalar triple product; movement along either line does not change this perpendicular projection.
The square is minimized when its first term vanishes. Therefore
This agrees with the distance between skew lines found in part (b). The corresponding parameter on the first line is its orthogonal projection value
The closest pair is and ; their connecting vector is perpendicular to both direction vectors.
Let and . The assumed linear independence gives . Every displacement joining one line to the other is
Its dot product with is always . The component in that direction is therefore fixed, so orthogonal decomposition gives .
The two linearly independent vectors span the plane perpendicular to . Suitable cancel the component of in that plane, attaining the lower bound. Thus the distance between skew lines formula, also valid when the lines intersect, gives