1

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?

Alex M.
  • 35,207
Ivy
  • 225
  • http://math.stackexchange.com/questions/210848/finding-the-shortest-distance-between-two-lines –  Dec 01 '15 at 14:05
  • Hint: to find two points on Line 1, you can look for values for (x;y;z) which result in 0 or 1. This leads to points (8; -9; -1) and (11; -25; -3). From there, you directly get an equation of the second form, including both direction vectors. – Axel Kemper Dec 01 '15 at 14:09
  • What do you mean by second form?? – Ivy Dec 01 '15 at 14:17
  • 1
    The shortest distance between two lines is the length of projection of any vector between the two lines onto the cross product of the direction of the two lines. – Yiyuan Lee Dec 01 '15 at 14:20
  • The "second form" is the form used for Line 2: point plus multiple of direction vector. Once you have two points, you can use their difference as direction vector and one of the points as starting point. – Axel Kemper Dec 01 '15 at 14:28
  • Choose a point on each line, and let $U$ denote the difference between those points as a column vector. Let $R$ be a matrix with 2 columns that are directions of the lines. Then the distance is $U^T(I - R(R^T R)^{-1}R^T)U$. For detail see https://math.stackexchange.com/q/2255365 The thing to understand is that your problem is the same as finding the distance from $U$ to the plane through origin spanned by the direction vectors of the lines. – MeMyselfI Sep 30 '17 at 09:13
  • It doesn't matter which points choose to compute $U$, because $U$ will just move parallel to the (hyper)plane spanned by the columns of $R$. – MeMyselfI Sep 30 '17 at 09:19

1 Answers1

0

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}