[Math] Shortest distance between two lines and common perpendicular

vectors

Line 1 has equation: $\dfrac{x-8}{3}=\dfrac{y+9}{-16}=\dfrac{z+1}{-2}$

Line 2 has equation:
$\left(\begin{matrix}x\\y\\z
\end{matrix}\right)=\left(\begin{matrix}15\\29\\5
\end{matrix}\right) + \left(\begin{matrix}3\\8\\-5
\end{matrix}\right)t$

How do you find the shortest distance between lines 1 and 2?

Also how would I find the coordinates of the points where the common perpendicular meets the line 1 and 2? Would I use cross product of direction vectors from both lines? But how would I find the coordinate that starts from?

Best Answer

My answer is based on Lee Yiyuan's suggestion.

Rewrite the equation of line 1 as

$$\left(\begin{matrix}x\\y\\z\end{matrix}\right) =\left(\begin{matrix}8\\-9\\-1\end{matrix}\right) +\left(\begin{matrix}3\\-16\\-2\end{matrix}\right) t. $$

A vector perpendicular to both lines is

$$\begin{vmatrix}i&j&k\\3&-16&-2\\3&8&-5\end{vmatrix} =96i+9j+72k.$$

One of the vectors joining two lines is

$$\left(\begin{matrix}8\\-9\\-1\end{matrix}\right) -\left(\begin{matrix}15\\29\\5\end{matrix}\right) =\left(\begin{matrix}-7\\-38\\-6\end{matrix}\right). $$

Calculate the projection of this vector to the vector perpendicular to both lines, and then take its absolute value as the final answer.

\begin{split} & \mbox{Distance between $L_1$ and $L_2$}\\ =&\left\lvert\frac{\langle(-7,-38,-6),(96,9,72)\rangle}{\lVert(96,9,72)\rVert}\right\rvert\\ =&\left\lvert\frac{-1446}{\sqrt{14481}}\right\rvert\\ =&\frac{482}{\sqrt{1609}} \end{split}