# Distance between two lines in 3D

1. Dec 1, 2008

### Melawrghk

1. The problem statement, all variables and given/known data
L1=(x,y,z)=(-2,-4,-3)+t(-2,3,-2)
L2=(x,y,z)=(0,0,4)+ s(-2,-3,-1)

Find the shortest distance between the two lines

3. The attempt at a solution
First, I did the cross product of the two directional vectors from both lines:
(-2,3,-2) x (-2,-3,-1) = (-9,-2, 12)
And its unit vector is:
-9x-2y+12z
-----------
2291/2

Then I found the distance between two points on the lines:
R = (0,0,4)-(-2,-4,-3) = (2,4,7)

And then I just tried to project the R onto the unit vector and got 58/sqrt(229), but that's not right. Help?

2. Dec 1, 2008

### rock.freak667

that should be correct.

EDIT: yeah Dick is right...Sorry about that

Last edited: Dec 1, 2008
3. Dec 1, 2008

### Dick

I get that the cross product is (-9,+2,+12).

4. Dec 1, 2008

### Melawrghk

Ooohhh!!! I see, I'm just retarded and forgot about the negative space in the second row. OOOOH. This all makes sense now!

Thank you!