Shortest Distance between two lines

How to find shortest distance between two lines in space.

The shortest distance d between two lines

\dpi{120} \mathbf{\overrightarrow{r_{1}}=\overrightarrow{a_{1}}+s\overrightarrow{b_{1}}}                and

\dpi{120} \mathbf{\overrightarrow{r_{2}}=\overrightarrow{a_{2}}+s\overrightarrow{b_{2}}}

is given by the following formula.

\dpi{150} \mathbf{d = \left |\frac{\left ( \overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right ).\left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )}{\left | \overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right |} \right |}

 

Example1: Find shortest distance between the lines

 r =〈4,-1,0〉 + s〈1,2-3〉  and  r =〈1,-1,2〉 + t〈2,4,-5〉  .

Solution: Here we have a1 = (4,-1,0) , a2 = (1,-1,2)  and  b1 = (1,2,-3)  , b2 = (2,4,-5)

Step1)    a2-a1  = (1,-1,2)-(4,-1,0) =

Step2)

\dpi{120} \overrightarrow{b_{1}}\times\overrightarrow{ b_{2}}=\begin{vmatrix} i & j & k\\ 1& 2& -3\\ 2 & 4 & -5 \end{vmatrix}

= i(-10+12) –j(-5+6) +k(4-4)

= 2i-j+0k

Step3)       \dpi{120} \left |\overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right |=\sqrt{2^{2}+(-1)^{2}+0^{2}}=\sqrt{5}

Step4)            Plug in all the values into formula

\dpi{120} d = \left |\frac{\left ( \overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right ).\left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )}{\left | \overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right |} \right | =\left |\frac{\left \langle -3,0,2 \right \rangle.\left \langle 2,-1,0 \right \rangle}{\sqrt{5}} \right |

\dpi{120} =\left |\frac{-6+0+0}{\sqrt{5}} \right |= \frac{6}{\sqrt{5}}

 

Example2.By computing the shortest distance  determine whether the following pair of lines intersect or not.

\dpi{120} {\color{Red} \frac{x-1}{2}=\frac{y+1}{3}=z }     and    \dpi{120} {\color{Red} \frac{x+1}{5}=\frac{y-2}{1},z=2 }

Solution: Given equation can be rewritten in proper form as,

\dpi{120} \frac{x-1}{2}=\frac{y+1}{3}=\frac{z-0}{1}   and    \dpi{120} \frac{x+1}{5}=\frac{y-2}{1}=\frac{z-2}{0}

Here we have a1 = (1,-1,0) , a2 =(-1,2,2) , b1= (2,3,1) and  b2=(5,1,0)

Step1)  a2 -a1 = (-1,2,2)-(1,-1,0) = (-2,3,2)

Step2)

\dpi{120} \overrightarrow{b_{1}}\times\overrightarrow{ b_{2}}=\begin{vmatrix} i & j & k\\ 2& 3& 1\\ 5 & 1 & 0 \end{vmatrix}

= i(0-1) –j(0-5)+k(2-15)

= -i+5j-13k

Step3)    \dpi{120} \left (\overrightarrow{ a_{2}}-\overrightarrow{a_{1}} \right ).\left ( \overrightarrow{b_{1}}\times \overrightarrow{b_{2}} \right )

= (-2,3,2).(-1,5,-13)

= 2+15-26= -9 ≠ 0

If the shortest distance between two lines is 0 , then the lines intersect  each other.

Here we got that distance is not 0 so the two lines doesn’t intersect each other.

 

Shortest distance between two Parallel lines:

Lets assume two parallel lines with same direction vector b  are given by the equations

\dpi{120} \mathbf{\overrightarrow{r_{1}}=\overrightarrow{a_{1}}+s\overrightarrow{b}}      and

\dpi{120} \mathbf{\overrightarrow{r_{2}}=\overrightarrow{a_{2}}+t\overrightarrow{b}}

Then the shortest distance between them is found by the following formula.

\dpi{150} \mathbf{d = \left |\frac{\left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )\times b}{\left | \overrightarrow{b} \right |} \right |}

 

Example3: Find shortest distance between the lines

r = 〈1,2,3〉 + s 〈2,3,4〉   and r =〈2,4,5〉+ t 〈4,6,8〉 .

Solution: Rewriting second equation we get ,

r = 〈2,4,5〉 + 2t 〈2,3,4〉

We see that both lines have same direction vector , therefore both are parallel lines. Here we have  a1 = (1,2,3) , a2 = (2,4,5)  and  b= (2,3,4).

Step1)

a2 -a1 = (2,4,5)-(1,2,3) = 〈1,2,2〉

Step2)

\dpi{120} \left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )\times\overrightarrow{ b}=\begin{vmatrix} i & j & k\\ 1& 2& 2\\ 2 & 3 & 4 \end{vmatrix}

= i(8-6) –j(4-4)+k(3-4)

= 2i-0j-k

Step3)

\dpi{120} \left |\left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )\times \overrightarrow{b} \right |=\sqrt{2^{2}+0+(-1)^{2}}=\sqrt{5}

\dpi{120} \left | b \right |=\sqrt{2^{2}+3^{2}+4^{2}}=\sqrt{29}

Step 4)  Plug in the values into the formula.

\dpi{120} \mathbf{d = \left |\frac{\left ( \overrightarrow{a_{2}}-\overrightarrow{a_{1}} \right )\times b}{\left | \overrightarrow{b} \right |} \right |}=\frac{\sqrt{5}}{\sqrt{29}}

 

 

 

 

Practice problems:

  • Find shortest distance between the lines

r = 〈3,8,3〉 + s〈3,-1,1〉   and r = 〈-3,-7,-6〉 +t 〈-3,2,4〉

  • Find shortest distance between the lines

\dpi{120} \frac{x-1}{2}=\frac{y-2}{3}=\frac{z-3}{4} ,  and   \dpi{120} \frac{x-2}{3}=\frac{y-3}{4}=\frac{z-5}{5}

  • By computing the shortest distance determine whether the following pair of lines intersect or not.

\dpi{120} \frac{x-5}{4}=\frac{y-7}{-5}=\frac{z+3}{-5} ,   and     \dpi{120} \frac{x-8}{7}=\frac{y-7}{1}=\frac{z-5}{3}

 

 

 

 

 

 

 

Answers:

  • √270
  • 1/√6
  • NO

 

 

 

 

 

 

 

 

 

 

 

Leave a comment