= Distance between parallel lines
{title2=$d=\|\mathbf d\times\mathbf v\|/\|\mathbf v\|$}
For two parallel <lines> $\mathbf a_1+s\mathbf v$ and $\mathbf a_2+t\mathbf v$ in three-dimensional <Euclidean space>, with $\mathbf v\ne0$ and $\mathbf d=\mathbf a_2-\mathbf a_1$, their shortest distance is
$$
\boxed{d=\left\|\mathbf d-\frac{\mathbf d\cdot\mathbf v}{\mathbf v\cdot\mathbf v}\mathbf v\right\|=\frac{\|\mathbf d\times\mathbf v\|}{\|\mathbf v\|}.}
$$
Every joining displacement is $\mathbf d+(t-s)\mathbf v$. Its component perpendicular to $\mathbf v$ is fixed, and its parallel component can be cancelled by a suitable $t-s$. The <Pythagorean theorem> proves that this perpendicular component has the shortest <Euclidean norm>. The <cross product> expression follows from $\|\mathbf d\times\mathbf v\|=\|\mathbf d\|\|\mathbf v\|\sin\theta$. For coincident <lines> the distance is zero. The perpendicular-component formula also applies in any finite-dimensional <Euclidean space>, where a three-dimensional <cross product> need not be available.
Back to article page