Find the distance between the two lines (linear algebra)

nicknaq
Messages
67
Reaction score
0

Homework Statement


Find the distance between the two lines.
b) L1: (2,1,0)+t[1,1,2]^T and L2: (2,3,-1)+t[-1,1,-3]

Homework Equations



see below at my attempt.

The Attempt at a Solution


I assume that I can't use the distance formula because these lines are not parallel? Is that a correct assumption?
So instead I will calculate the projection ...

P1 (2,1,0) d1= [1,1,2]
P2 (2,3,-1) d2=[-1,1,-3]
normal=d1xd2= [-5,1,2]^T
v=p1p2= [0,2,01]^T
v1=projn(v)= 0?

Not sure what to do with a proj=0 !

Help, quick!
 
Physics news on Phys.org
Maybe the lines intersect.
 
Hi LCKurtz,

So what work is to be shown for this question?

If proj=0, does that mean the lines intersect?

Thanks for the continued help.
 
nicknaq said:

Homework Statement


Find the distance between the two lines.
b) L1: (2,1,0)+t[1,1,2]^T and L2: (2,3,-1)+t[-1,1,-3]

Homework Equations



see below at my attempt.

The Attempt at a Solution


I assume that I can't use the distance formula because these lines are not parallel? Is that a correct assumption?
So instead I will calculate the projection ...

P1 (2,1,0) d1= [1,1,2]
P2 (2,3,-1) d2=[-1,1,-3]
normal=d1xd2= [-5,1,2]^T
v=p1p2= [0,2,01]^T
v1=projn(v)= 0?

Not sure what to do with a proj=0 !

Help, quick!

nicknaq said:
Hi LCKurtz,

So what work is to be shown for this question?

If proj=0, does that mean the lines intersect?

Thanks for the continued help.

Above you said you would "calculate the projection". I would ask you what projection did you calculate? The projection of what on what? If you can answer that you may see why the projection being 0 means the lines intersect.
 
LCKurtz said:
Above you said you would "calculate the projection". I would ask you what projection did you calculate? The projection of what on what? If you can answer that you may see why the projection being 0 means the lines intersect.

Proj of v on normal.
 
LCKurtz said:
Above you said you would "calculate the projection". I would ask you what projection did you calculate? The projection of what on what? If you can answer that you may see why the projection being 0 means the lines intersect.

nicknaq said:
Proj of v on normal.

So do you understand or not? Can you explain why the projection being zero means the lines intersect?
 
LCKurtz said:
So do you understand or not? Can you explain why the projection being zero means the lines intersect?

Would it entail that the lines are orthogonal?

For example, the projection of x=0 on y=0 would be zero since y=0 has no component in the direction of x=0. If that makes sense?
 
Well, you can use the distance formula. Parametrize one line by t, the other by s, write down the distance formula and minimize it over s and t.
 
arkajad said:
Well, you can use the distance formula. Parametrize one line by t, the other by s, write down the distance formula and minimize it over s and t.

Does that involve calculus? If so, it's really not necessary.
 
  • #10
Of course calculus is not necessary, but it instantly gives the conditions for the normals.
 
  • #11
arkajad said:
Of course calculus is not necessary, but it instantly gives the conditions for the normals.

So if I want to stay away from calc, is the best way to prove distance=0 by simply showing the projection is zero?
 
  • #12
I do not know what textbook or conventions you are using - I have no idea what your particular notation means.
 
  • #13
arkajad said:
I do not know what textbook or conventions you are using - I have no idea what your particular notation means.

well..
projv(w) would mean the projection of w on v. For example.
d is direction vector
n is normal

...anything else you need to know?
 
  • #14
nicknaq said:
Would it entail that the lines are orthogonal?

For example, the projection of x=0 on y=0 would be zero since y=0 has no component in the direction of x=0. If that makes sense?

No, it doesn't make sense. See below.

arkajad said:
Well, you can use the distance formula. Parametrize one line by t, the other by s, write down the distance formula and minimize it over s and t.

Of course he could, making a two variable minimization problem out of a simple geometric one.

nicknaq said:
So if I want to stay away from calc, is the best way to prove distance=0 by simply showing the projection is zero?

Yes. It's the best way even if you like calculus. I have included a picture below to show you why it works. The top picture shows two skew lines with the normal N between a and b marking the closest the lines come to each other. Remember that your vector V went from a point on one line to a point on the other (that is important). I have labeled these points P and Q. The lower view is looking at the picture from the "edge", where the skew lines appear parallel. Of course, they aren't because one is going into the viewing plane and the other out of it. The dotted lines show the perpendicular projection of V on N. This shows why the length of that projection is the distance between the lines.

forumprojection.jpg
 
  • #15
Just one remark: the only calculus you need is to know that the derivative of x^2 is 2x. Then it instantly follows that the minimal distance equations are that the line connecting the two lines at the minimum distance is perpendicular to both lines.

Of course this is the way for those like me, who do not have a sufficiently developed 3d geometrical imagination.
 
Back
Top