Shortest distance between two lines

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 3K views
Anden
Messages
75
Reaction score
0
I'm a bit uncertain about this question and would like some help, as I don't have the correct answer. Have I done this correctly?

Homework Statement


What is the shortest distance between the two lines A = (1,2,3) + t(0,1,1) and B = (1,1,1) + s(2,3,1)

The Attempt at a Solution


My reasoning: The vector AB is shortest when AB is orthogonal to BOTH A and B.

Therefore the scalar product AB [tex]\circ[/tex] A = AB [tex]\circ[/tex] B = 0. That gives a system with two equations

AB = (2s, -1+3s-t, -2+s-t)

AB [tex]\circ[/tex] A = -3+4s-2t=0
AB [tex]\circ[/tex] B = 14s-5-4t=0

which when solved gives s = -1/6 and t = -11/6.

I now seek |AB|, or the LENGTH of the vector.

Substituting s and t with the corresponding values and then using Pythagoras gives:

|AB| = sqrt(1/3)

Is this correct? Is there perhaps an easier way to do this?

Danke schön!
 
on Phys.org
Yes, your method is correct. Another approach that doesn't involve simultaneous equations is to cross the two direction vectors and make a unit normal n from it. That gives the orthogonal direction. Then let V be a vector from a point on one line to a point on the other.

Then d = |V dot n|
 
LCKurtz said:
Yes, your method is correct. Another approach that doesn't involve simultaneous equations is to cross the two direction vectors and make a unit normal n from it. That gives the orthogonal direction. Then let V be a vector from a point on one line to a point on the other.

Then d = |V dot n|

Worked excellent, thank you. I also noticed that I could use the normal vector without turning it into a unit vector. I used it to create a system of equations
1+2s=1-2a
1+3s=2+t+2a
1+s=3+t-2a
which gives that a = 1/6

Then I multiplied that(1/6) with (-2,2,-2) and then used Pythagoras to calculate the length of the vector, which in this case is 1/sqrt(3).
 
or you could use projection