# Homework Help: Shortest distance between two lines

1. Jun 5, 2009

Hi guys this problem should be simple enough but I just cant get the correct answer. Well the question is:

Show that the shortest distance between the line ($l_1$) with equation

$$\frac{x+4}{3} = \frac{y-3}{2} = \frac{z+6}{5}$$

and the line ($l_2$) with equations

i. $$x -2y -z =0$$

ii. $$x -10y -3z =-7$$

is $\frac{1}{2}\sqrt{14}$

So my attempt

first find direction vector of $l_1$ so lets get parametric form:

$$\mu = \frac{x+4}{3} = \frac{y-3}{2} = \frac{z+6}{5}$$

$$x = 3\mu -4$$

$$y = 2\mu +3$$

$$z = 5\mu -6$$

which gives the parametric equation

$$\mathbf{r} = \left( \begin{array}{c} -4 \\ 3 \\ -6 \end{array} \right) + \mu \left( \begin{array}{c} 3 \\ 2 \\ 5 \end{array} \right)$$

so now to find the parametric equation of $l_2$:

$$x = t$$

using i.

$$t - 2y - z = 0$$

$$z = t - 2y$$

using ii.

$$t - 10y - 3(t - 2y) = -7$$

$$t - 10y -3t + 6y = -7$$

$$-2t - 4y = -7$$

$$y = \frac{7}{4} - \frac{1}{2}t$$

using i.

$$z = t - 2(\frac{7}{4} - \frac{1}{2}t)$$

$$z = t - \frac{7}{2} + t$$

$$z = 2t - \frac{7}{2}$$

so written in parametric vector form:

$$\mathbf{r} = \left( \begin{array}{c} 0 \\ \frac{7}{4} \\ - \frac{7}{2} \end{array} \right) + t \left( \begin{array}{c} 2 \\ -1 \\ 4 \end{array} \right)$$

(obviously note the fact that I multiplied my direction vector x2 just to give integers)

so what is required is to project an arbitary vector from and point on $l_1$ to $l_2$ in the direction of the vector orthogonal to both the lines

so to find this vector will do the cross of the two direction vectors of the lines:

$$\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 3 & 2 & 5 \\ 2 & -1 & 4 \end{array} \right| = \mathbf{i} \left| \begin{array}{cc} 2 & 5 \\ -1 & 4 \\ \end{array} \right| - \mathbf{j} \left| \begin{array}{cc} 3 & 5 \\ 2 & 4 \\ \end{array} \right| + \mathbf{k} \left| \begin{array}{cc} 3 & 2 \\ 2 & -1 \\ \end{array} \right| = \mathbf{i} (8 + 5) - \mathbf{j} (12 -10) + \mathbf{k} (-3 -4) = 13\mathbf{i} - 2\mathbf{j} -7\mathbf{k} = \mathbf{n}$$

Now to find a random vector $\mathbf{R}$ between $l_1$ and $l_2$

for this I will simply use their starting vectors when their respective parameters are each 0:

$$\mathbf{R} = l_2(0) - l_1(0) \left( \begin{array}{c} 0 + 4 \\ \frac{7}{4} - 3 \\ - \frac{7}{2} + 6 \end{array} \right) = \left( \begin{array}{c} 4 \\ -\frac{5}{4} \\ \frac{5}{2} \end{array} \right)$$

so the final step should be to take the scalar product of R and $\mathbf{\hat{n}}$:

$$\mathbf{R} \cdot \mathbf{\hat{n}} = \frac{1}{\sqrt{169 + 4 + 49}} \left( \begin{array}{c} 4 \\ -\frac{5}{4} \\ \frac{5}{2} \end{array} \right) \cdot \left( \begin{array}{c} 13 \\ -2 \\ -7 \end{array} \right) = \frac{52 + \frac{5}{2} - \frac{35}{2}}{\sqrt{169 + 4 + 49}} = \frac{\left( \frac{104 + 5 - 35}{2} \right)}{\sqrt{222}} = \frac{37}{\sqrt{222}}$$

and that's it, and its not what they give that it should be, I have tried approaching it other ways but I always get the same answer, Im pretty sure I havnt made any numeral errors, and pretty sure i havnt made any conceptual errors, so I am really stumped, and help would be so appreciated guys, thanks allot :D

2. Jun 5, 2009

### gabbagabbahey

I get the exact same thing as you using two different methods. So unless you've made a typo transcribing the original problem, it looks as though the error is with whomever created the question.

3. Jun 5, 2009

### tiny-tim

Yes, I make it the same.

(222 = 37 x 6 … does that help?)

4. Jun 5, 2009

Hi guys, thanks for the replies, yeh the question at the begining of my post is exaclty as the question is worded (doubley checked :D), although I did simply add the $l_i[/tex]'s and the i. and ii. oviously though that was purly so I could reference them in my solution. Yeh so I am completly stumped, as posted the answer is actually in the question, so you have to show that that is correct so tiny-tim the given answer is [itex]\frac{1}{2} \sqrt{14}$.

And tiny yeh I noticed that to but if you go that root youll end with something like $\sqrt{37} / \sqrt{6}$ or manipulate it differently but still not really ovious in any way how there could be an error to get there answer. I suppose pehaps:

$$\frac{37}{\sqrt{222}} = \frac{\sqrt{37}}{\sqrt{6}} = \sqrt{\frac{74}{12}} = \sqrt{\frac{74}{3 \times 4}} = \frac{1}{2} \sqrt{\frac{74}{3}}$$

and em 74/3 = aprox. 24, sort of 14, ha now Im just trying to see where they went wrong:D

It has to be an error they made then, as the answer is quite precise and not of a form you would get from straight from computing the scalar product (ie you would have to manipulate your answer from a scalar product to get it in to a form where you have a surd in the numerator, in most cases at least) I would quess that they wrote the question down wrong, I can imagine that if I change 1 or 2 of the values for on of the equations defining the lines I would get their answer.

Thanks so much guys, I can rest now knowing the brains of PF come to the same conclusion as me, thanks alot :D really appreciated

5. Jun 6, 2009

### tiny-tim

ok … let's work this backwards

(√14)/2 = 7/√14,

and the only place that √14 can come from is the magnitude of n

Now 14 = 9 + 4 + 1, so n is probably in the direction (±3,±2,±1), not necessarily in that order

So if we change the cross-product …
(nice LaTeX, btw! )

by replacing the -1 by 1, we get

$$\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 3 & 2 & 5 \\ 2 & 1 & 4 \end{array} \right| = \mathbf{i} \left| \begin{array}{cc} 2 & 5 \\ 1 & 4 \\ \end{array} \right| - \mathbf{j} \left| \begin{array}{cc} 3 & 5 \\ 2 & 4 \\ \end{array} \right| + \mathbf{k} \left| \begin{array}{cc} 3 & 2 \\ 2 & 1 \\ \end{array} \right| = \mathbf{i} (8 - 5) - \mathbf{j} (12 -10) + \mathbf{k} (3 -4) = 3\mathbf{i} - 2\mathbf{j} -\mathbf{k} = \mathbf{n}$$

… I'll leave the rest to you!

6. Jun 6, 2009

Oh tiny-tim wow that's some insane back tracking :D. Thanks for that so yeh it was a numeral error on their part, thanks tiny-tim, I don't know how you noticed that error even working backwards that was awesome :D, can I ask how did you see that?

PS: thanks for the comment about the LaTex :D gotta love LaTex

7. Jun 6, 2009

### tiny-tim

easy, man …

easy … the question only has whole numbers, so the only place the √ can come from is the magnitude …

then 14 as a sum of squares is obviously 3,2,1

then just compare 3,2,1 with 13,2,7 …

there's only going to be two mistakes, so assume the 2 is ok …

and there you are!
Now you gotta learn smilies :tongue2: …

gotta love :!!) LaTex​

8. Jun 6, 2009

Thanks tiny-tim , I dont want to take you time at all but really do want to understand how you came to that, I actually got all the first bit from you previous post to do with the $\sqrt{14}$ but you then lost me at
Im not quite sure what you meant by "two mistakes" and the "2". What I am assuming is that you compared the actual vector that was correctly computed with the 3 2 1 components that you reasoned from the $\sqrt{14}$, you see that both contain 2, so the j component is correct so the only values that should be changed are the j components of the two direction vector of the two lines do to how one evaluates the determinant of a matrix ... oh ha, I think I have just answered my own question!

ooooooh the 2 your referring to is the two in $M_{2,2}$ of the matrix and I quess you thought that the error they made would simply be a simple error i.e. a change of sign I see you thought process there I suppose the first part is more logic but the second is more mathematical intuition , I suppose for me I could have just tried all the possible combinations of ±2 and ±1 of the column of the matrix (only 4 so not exactly exhaustive) , lol, thanks again tiny-tim

9. Jun 6, 2009

### tiny-tim

:rofl: :rofl:
we get a lot of that!