Shortest distance between two lines

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 6K views
Galadirith
Messages
107
Reaction score
0
Hi guys this problem should be simple enough but I just can't get the correct answer. Well the question is:

Show that the shortest distance between the line ([itex]l_1[/itex]) with equation

[tex]\frac{x+4}{3} = \frac{y-3}{2} = \frac{z+6}{5}[/tex]

and the line ([itex]l_2[/itex]) with equations

i. [tex]x -2y -z =0[/tex]

ii. [tex]x -10y -3z =-7[/tex]

is [itex]\frac{1}{2}\sqrt{14}[/itex]

So my attempt

first find direction vector of [itex]l_1[/itex] so let's get parametric form:

[tex]\mu = \frac{x+4}{3} = \frac{y-3}{2} = \frac{z+6}{5}[/tex]

[tex]x = 3\mu -4[/tex]

[tex]y = 2\mu +3[/tex]

[tex]z = 5\mu -6[/tex]

which gives the parametric equation

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

so now to find the parametric equation of [itex]l_2[/itex]:

[tex]x = t[/tex]

using i.

[tex]t - 2y - z = 0[/tex]

[tex]z = t - 2y[/tex]

using ii.

[tex]t - 10y - 3(t - 2y) = -7[/tex]

[tex]t - 10y -3t + 6y = -7[/tex]

[tex]-2t - 4y = -7[/tex]

[tex]y = \frac{7}{4} - \frac{1}{2}t[/tex]

using i.

[tex]z = t - 2(\frac{7}{4} - \frac{1}{2}t)[/tex]

[tex]z = t - \frac{7}{2} + t[/tex]

[tex]z = 2t - \frac{7}{2}[/tex]

so written in parametric vector form:

[tex]\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)[/tex]

(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 [itex]l_1[/itex] to [itex]l_2[/itex] 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:

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

Now to find a random vector [itex]\mathbf{R}[/itex] between [itex]l_1[/itex] and [itex]l_2[/itex]

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

[tex]\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)[/tex]

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

[tex]\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 <br /> \left( \begin{array}{c} 13 \\ -2 \\ -7 \end{array} \right) = <br /> \frac{52 + \frac{5}{2} - \frac{35}{2}}{\sqrt{169 + 4 + 49}} =<br /> \frac{\left( \frac{104 + 5 - 35}{2} \right)}{\sqrt{222}} = <br /> \frac{37}{\sqrt{222}}[/tex]

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, I am 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
 
Physics news on Phys.org
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.
 
Hi Galadirith! Hi gabbagabbahey! :smile:

Yes, I make it the same.

What is the given answer?

(222 = 37 x 6 … does that help?)
 
Hi guys, thanks for the replies, yeh the question at the beginning of my post is exactly as the question is worded (doubley checked :D), although I did simply add the [itex]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 completely 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}[/itex].<br /> <br /> And tiny yeh I noticed that to but if you go that root youll end with something like [itex]\sqrt{37} / \sqrt{6}[/itex] 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:<br /> <br /> [tex]\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}}[/tex]<br /> <br /> and em 74/3 = aprox. 24, sort of 14, ha now I am just trying to see where they went wrong:D<br /> <br /> 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 into 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.<br /> <br /> Thanks so much guys, I can rest now knowing the brains of PF come to the same conclusion as me, thanks a lot :D really appreciated[/itex]
 
Hi Galadirith! :smile:
Galadirith said:
… so tiny-tim the given answer is [itex]\frac{1}{2} \sqrt{14}[/itex].

ok :rolleyes: … let's work this backwards :wink:

(√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 …
Galadirith said:
[tex]\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 3 & 2 & 5 \\ 2 & -1 & 4 \end{array} \right| =<br /> \mathbf{i} \left| \begin{array}{cc} 2 & 5 \\ -1 & 4 \\ \end{array} \right|<br /> - \mathbf{j} \left| \begin{array}{cc} 3 & 5 \\ 2 & 4 \\ \end{array} \right|<br /> + \mathbf{k} \left| \begin{array}{cc} 3 & 2 \\ 2 & -1 \\ \end{array} \right| = <br /> \mathbf{i} (8 + 5) - \mathbf{j} (12 -10) + \mathbf{k} (-3 -4) = <br /> 13\mathbf{i} - 2\mathbf{j} -7\mathbf{k} = \mathbf{n}[/tex]

(nice LaTeX, btw! :smile:)

by replacing the -1 by 1, we get

[tex]\left| \begin{array}{ccc} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 3 & 2 & 5 \\ 2 & 1 & 4 \end{array} \right| =<br /> \mathbf{i} \left| \begin{array}{cc} 2 & 5 \\ 1 & 4 \\ \end{array} \right|<br /> - \mathbf{j} \left| \begin{array}{cc} 3 & 5 \\ 2 & 4 \\ \end{array} \right|<br /> + \mathbf{k} \left| \begin{array}{cc} 3 & 2 \\ 2 & 1 \\ \end{array} \right| = <br /> \mathbf{i} (8 - 5) - \mathbf{j} (12 -10) + \mathbf{k} (3 -4) = <br /> 3\mathbf{i} - 2\mathbf{j} -\mathbf{k} = \mathbf{n}[/tex]

… I'll leave the rest to you! :biggrin:
 
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 got to love LaTex
 
easy, man …

Hi Galadirith! :smile:
Galadirith said:
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?

easy :biggrin: … 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 :wink:

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! o:)
PS: thanks for the comment about the LaTex :D got to love LaTex

Now you got to learn smilies :-p

gotta love :!) LaTex​

:wink: smilies are your friends! :smile:
 
Thanks tiny-tim :smile:, I don't 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 [itex]\sqrt{14}[/itex] but you then lost me at
there's only going to be two mistakes, so assume the 2 is ok …
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 [itex]\sqrt{14}[/itex], 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 [itex]M_{2,2}[/itex] 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 :biggrin: I see you thought process there I suppose the first part is more logic but the second is more mathematical intuition :wink:, 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
 
Galadirith said:
oh ha, I think I have just answered my own question!

:smile: :smile:
we get a lot of that! :biggrin: