[Math] The shortest distance between two parallel lines

geometryvector-spaces

I was working on a set of problems involving finding the shortest distance between two skew lines, which was fine, but then parallel lines showed up. In essence this should be much easier to solve since I do not need to do any cross products. However I quickly got stuck.

Two lines are defined by the following parametric equations: $x=6t$, $y=3+8t$, $z=-1+2t$ and $x=2+3s$, $y=4s$, $z=1+s$ which can be represented as $\vec{a}=\begin{pmatrix} 6t \\ 8t+3 \\2t-1 \end{pmatrix}$ and $\vec{b}=\begin{pmatrix} 2+3s \\ 4s \\1+s \end{pmatrix}$ respectively. Therefore the line between the two is defined by the vector $$\vec{c}=\begin{pmatrix} 6t-3s-2 \\ 8t-4s+3 \\2t-s-2 \end{pmatrix}$$

Since the shortest line between the two lines is perpendicular to both, $\vec a \cdot\vec c=\vec b \cdot\vec c=0$. However , I have tried this and it seems overly complicated for such an easy problem. My initial thought was to find the distance between the initial coordinates of the parametric equations, but those points could be any points on the line. Does anyone have any suggestion on how to continue?

Best Answer

Take any two points, one on each line, and form the difference vector $\bf w$ of these points. Then find the projection ${\bf v}_\parallel$ of $\bf w$ onto the direction vector ${\bf v}$ of one of the lines: $$ {\bf v}_\parallel = {{\bf v}\cdot{\bf w}\over ||{\bf v}||^2}{\bf v}. $$ Then the norm of the vector $$ {\bf v}_\perp = {\bf w}-{\bf v_\parallel} $$ is the minimum distance you're seeking.

Related Question