Shortest distance between two lines (vector algebra)

In summary: Thanks!In summary, Matt tried to use the distance formula but it didn't work. He then tried using the equation s(t) which tells him the shortest distance between two points is at point s on line 2.
  • #1
FelixISF
23
0

Homework Statement


line l1 : x=2 y= -1 + p z= 2p
line l2 : x=-1 + t y=1-3t z=1-2t

Find the shortest (exact) distance between l1 and l2.

Homework Equations


That's what I am looking for!


The Attempt at a Solution



Thanks!
 
Physics news on Phys.org
  • #2
You have to show your attempt at a solution before we can help you.

Thanks
Matt
 
  • #3
I don't see your point. I have tried to solve the problem but didn't manage to do so, cause I can't find the right formulas.

All I am asking for is the information on what formulas might be helpful.

Do you expect me to write some attempt here, even if the wrong equations were used? what's the point?
 
  • #4
Yes, you are expected to post your work. If it is wrong then we can help to steer you onto the right path. So yes, write your attempt and indicate where you think you went wrong and then we can help.

That is my point.

Thanks
Matt
 
  • #5
I tried to use the following equation:

d = sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2), but it doesn't give me the right answer.
whats wrong then ?

thanks :)
 
  • #6
The distance formula is,

d = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2)

Well, the first thing you should do is substitute in you values for the quantity (x2-x1), square that quantity, and then simplify it if you can. Do the same for the other two quantities. Add them together and then take their square root.

Thanks
Matt
 
  • #7
FelixISF said:

Homework Statement


line l1 : x=2 y= -1 + p z= 2p
line l2 : x=-1 + t y=1-3t z=1-2t

Find the shortest (exact) distance between l1 and l2.

Homework Equations


That's what I am looking for!

The Attempt at a Solution



Thanks!

I will give you a few hints. The first is that you don't want to use distance formulas. From your two lines you can get direction vectors D1 and D2, right? And the cross product N = D1 X D2 would be normal to both lines. From your lines you can also get points P1 and P2 on line1 and line2 and use them to get a vector V across from one line to the other. Can you see that the distance between the lines would be the absolute value of the component of V on N? Try that.
 
Last edited:
  • #8
d = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2)
d = sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)

there's no difference between these 2..
 
  • #9
Can you please explain this a little more? I see that N=D1(cross)D2 is normal to both vectors, hence normal to the plane of the two vectors D1 and D2. Also the vector V we formed from one line to another has to be in the plane of the vectors D1 and D2. Therefore N is normal also to V; now how can V have any component on another vectos normal to it; the component of V on N is zero. Am I right?
Thanks
TJ
 
  • #10
FelixISF said:

Homework Statement


line l1 : x=2 y= -1 + p z= 2p
line l2 : x=-1 + t y=1-3t z=1-2t

Find the shortest (exact) distance between l1 and l2.

Homework Equations


That's what I am looking for!
The solution doesn't count as a relevant equation.
FelixISF said:

The Attempt at a Solution



Thanks!
 
  • #11
fawk3s said:
d = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2)
d = sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)

there's no difference between these 2..

Shhh! It's rude to point out that a post is completely useless. Oh wait...
 
  • #12
**Shortest distance between 2 lines drawn in 3D**

R1(t) = (x1(t), y1(t), z1(t)) // t is the independent variable for line 1
R2(s) = (x2(s), y2(s), z2(s)) // s is the independent variable for line 2

D = R1(t) - R2(s) // distance between anywhere on the 2 different lines

We first need to find, for a given point on line 1 (ie at position t), where the shortest distance from this point across to line 2 occurs.
So we start by finding the square of the length of the vector D (ie its dot product (denoted by D.D); this just gives us a nice positive equation to work with). We then find where the derivative of this dot product with respect to s is equal to 0, while also making sure that we are dealing with a minima and not a maxima. From this, we will find the function s(t) (see below):

∂[D.D]/∂s = 0 [1] // derivative of the dot product
∂^2[D.D]/∂s^2 > 0 // ie the double derivative must be positive to ensure that it's a minima

*Note: as there were 2 independent variable in equation D, we needed to use the partial derivative.

Now solve equation [1] to find s(t) // s as a function of t.

What equation s(t) tells us, is that for a given point t (on line 1), the shortest distance to line 2 can be found at point s (on line 2).

So, now all we need to do is find which value of t (on line 1) will give us the overall shortest distance (ie when comparing all the shortest distances already found for the different values of t).

First we re-write equation D using function s(t) (which was found from equation [1] above:
D = R1(t) - R2(s(t)) [2] // now equation D is entirely written with respect to the single independent variable t

And similarly (as we did before):

d[D.D]/dt = 0 [3] // derivative of the dot product (calculated using equation [2])
d^2[D.D]/dt^2 > 0 // ie the double derivative must be positive to ensure that it's a minima

Solving equation [3] to find t, we now have a value (point t on line 1), where the overall shortest line occurs.
Substituting this value of t into equation [2] and finding the length of this vector (ie the square root of its dot product), one should arrive at the value for "the shortest distance between 2 lines drawn in 3D".

I think this approach should also work for n-dimensions (which we would clearly need).
 

What is the shortest distance between two parallel lines?

The shortest distance between two parallel lines is the perpendicular distance between the two lines. This can be calculated by finding the distance from one line to a point on the other line that is perpendicular to it.

How do you find the shortest distance between two non-parallel lines?

To find the shortest distance between two non-parallel lines, first determine the closest points between the two lines. Then, calculate the distance between these two points using the distance formula. This will give you the shortest distance between the two lines.

Can the shortest distance between two lines be negative?

No, the shortest distance between two lines cannot be negative. It represents a physical distance between two objects and therefore must always be positive.

Is the shortest distance between two lines always the same?

No, the shortest distance between two lines can vary depending on the position and orientation of the lines. Two lines may have multiple points of closest distance, resulting in different shortest distances.

Can the shortest distance between two lines be greater than the distance between their closest points?

No, the shortest distance between two lines cannot be greater than the distance between their closest points. This is because the distance between two points is the shortest possible distance between them.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
11
Views
3K
  • Precalculus Mathematics Homework Help
Replies
1
Views
859
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
14
Views
267
  • Linear and Abstract Algebra
Replies
2
Views
3K
  • Precalculus Mathematics Homework Help
Replies
9
Views
787
  • Precalculus Mathematics Homework Help
Replies
7
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Precalculus Mathematics Homework Help
Replies
20
Views
2K
Back
Top