The Student Room Group

FP3 - Shortest Distance Between 2 Skew Lines

Hi guys,

I'm struggling to get my head round the formula for the shortest distance between two skew lines. This is what the formula is:

(a - c)(b x d)b x d\frac{\textbf{(a - c)}\cdot \textbf{(b x d)}}{|\textbf{b x d}|}

where r=a+λb r = a + \lambda b and r=c+μd r = c + \mu d are the equations of the skew lines.

Our teacher explained it as I've written in the attachment. She also mentioned that the triangle is formed because there is a parallel vector that has the same direction as b x d.

Could somebody please explain then how the triangle manages to work out the distance? Or how you can form the triangle in the first place?

Hope I've made it clear enough to answer.

Thanks,

Andrew.
Reply 1
Our teacher told us not to use that formula, as it's more confusing than other methods.

My teacher taught us to find parallel planes through each of the skew lines (find the normal of the planes [which is the same for both planes] by crossing the direction of the lines) and using the formula of:

pn\frac{|p|}{n}

where p is from the formula rn=pr \cdot n = p
(p=anp = a \cdot n)
and n is the modulus of n (normal vector of plane)

Which finds the distance from each plane to the origin, then add or subtract these numbers accordingly.

(Wow, I just edited this post 7 times, did not know it was possible to do so many things wrong in 1 post!)
(edited 13 years ago)
Reply 2
Original post by Ramjams
Our teacher told us not to use that formula, as it's more confusing than other methods.

My teacher taught us to find parallel planes through each of the skew lines (find the normal of the planes [which is the same for both planes] by crossing the direction of the lines) and using the formula of:

pn\frac{|p|}{n}

where p is from the formula rn=pr \cdot n = p
(p=anp = a \cdot n)
and n is the modulus of n (normal vector of plane)

Which finds the distance from each plane to the origin, then add or subtract these numbers accordingly.

(Wow, I just edited this post 7 times, did not know it was possible to do so many things wrong in 1 post!)


no offence but that is long lol
Reply 3
Original post by Abukar
no offence but that is long lol


Lol why would I take offense to that? But it doesn't seem that long, all you have to do is take a cross product (as you do), then find two dot products, use Pythagoras and then just sub stuff into the equation.
(edited 13 years ago)
can someone help to explain how can the cos(a-c) becomes (a-c).(bxd) / (bxd) ???
Reply 5
Original post by wilson dang
can someone help to explain how can the cos(a-c) becomes (a-c).(bxd) / (bxd) ???


X•Y=cos(θ)|X||Y|

Use X=a-c and Y=bxd
The triangle is formed by joining the start of the vectors (a-c) and (bxd).

It is done as you are finding the angle between these two vectors via the dot product.

The triangle is right angled as the vector (bxd) is perpendicular to both lines.

Through trigonometry x=cos(θ) |(a-c)|

But remember (a-c)•(bxd)= |(a-c)| |(bxd)| cosθ

And through rearranging: cos(θ) |(a-c)| = ((a-c)•(bxd)) / |(bxd)|

Therefore by substituting the trig formula: x= ((a-c)•(bxd)) / |(bxd)| which is the formula you're looking for.
(edited 6 years ago)
Original post by Quadratic
Hi guys,

I'm struggling to get my head round the formula for the shortest distance between two skew lines. This is what the formula is:

(a - c)(b x d)b x d\frac{\textbf{(a - c)}\cdot \textbf{(b x d)}}{|\textbf{b x d}|}

where r=a+λb r = a + \lambda b and r=c+μd r = c + \mu d are the equations of the skew lines.

Our teacher explained it as I've written in the attachment. She also mentioned that the triangle is formed because there is a parallel vector that has the same direction as b x d.

Could somebody please explain then how the triangle manages to work out the distance? Or how you can form the triangle in the first place?

Hope I've made it clear enough to answer.

Thanks,

Andrew.


The length of x is not dependent on (a-c) as when (a-c) changes, so does the angle between (a-c) and (bxd).

The length of x is always constant here.

Think of it as a triangle where the hypotenuse and opposite side to θ are changing but where the adjacent side stays the same.
Original post by joejohnson67
The length of x is not dependent on (a-c) as when (a-c) changes, so does the angle between (a-c) and (bxd).

The length of x is always constant here.

Think of it as a triangle where the hypotenuse and opposite side to θ are changing but where the adjacent side stays the same.


You're about 7 years too late!😂
Original post by psc---maths
You're about 7 years too late!😂


Yeah sorry about that, I had trouble understanding this concept myself until I looked at this forum.
Thought I'd try to put everybody's mind at rest in case it had been bothering them for 7 years! 😂
Original post by joejohnson67
Yeah sorry about that, I had trouble understanding this concept myself until I looked at this forum.
Thought I'd try to put everybody's mind at rest in case it had been bothering them for 7 years! 😂


Fair enough! I suppose even if they don't ever see it, it's good that you now have a better understanding of the concept because of it. 👍😁
I dont understand why we use the unit vector of the cross product.. ha..ha... :s-smilie:
Original post by moomin valley
I dont understand why we use the unit vector of the cross product.. ha..ha... :s-smilie:


It emegeres from cos(theta) formula in terms of the two vectors a and b, where theta is the angle between these vectors.

a.b = |a||b|cos(theta)

Suppose now we relate this to the question.

Replace a by (a-c) and b by (b x d) hence

(a-c).(b x d) = |a-c||b x d| cos(theta)

since shortest distance is x=|a-c|cos(theta) you use the relation above to deduce the result
Original post by RDKGames
It emegeres from cos(theta) formula in terms of the two vectors a and b, where theta is the angle between these vectors.

a.b = |a||b|cos(theta)

Suppose now we relate this to the question.

Replace a by (a-c) and b by (b x d) hence

(a-c).(b x d) = |a-c||b x d| cos(theta)

since shortest distance is x=|a-c|cos(theta) you use the relation above to deduce the result

Ok. So we are solving for x but without wanting the angle? so we want to bring it into dot form without changing its value which is already correct? So we choose the unit vector because its magnitude is 1 and doesn't change the value of |a-c| cos theta? That makes sense, just very unobvious in the different versions of this I have seen.

However for a-c cos theta to really be our x.. any arbitrary cos theta (a-c) from the two lines would have to be the same length as as b cross d. I cant see any possible right angle triangle being formed. Maybe if the lines are in parallel planes, but not unless. How on earth can i visualize this by rotating lines in my head.
(edited 5 years ago)
Ok, after wasting hours of time. I realized with my apalling visual skills and checked..
For any two skew lines; planes can be found that they lie in which are parallel to each other.

That's why we can always create the right angle triangle.
Reply 15
I'm a bit late to reply but understanding the forumla is a bit easier if you have some grasp of some relatively easy linear algebra. Any 3 linearly independent vectors in R^3 form a basis for it. If we assume direction vectors a and line are NOT parallel then by definition they are linearly independent. Now the cross product of them is by definition perpendicular to both and so forms the 3rd linearly independent vector and thus a basis from which you can define any other vector in 3d space. Great.

Now take your two original points associated with line a and b and draw a line between them, this vector will be some combination of the basis vectors. You can find out how much that point (or rather the vector to that point) contains each component by doing the dot product. OK, so take the dot product to the point normal to both lines with the line between the points.

Now consider other points along the line and the vector between them. They will have the same components as the previous vector but with some scalar multiple of each direction vector. Thus it is impossible the normal line changes.

Ok, now add or take away a scalar multiple of each line until the component of the line between two points is zero for both line dimensions. By the definition of vector length this means they will contribute a minimal amount at these points. The other dimension (the one from the cross product normal to both) cannot be increased or decreased moving along the line. Thus, the part of the vector between the two lines made up of the component within the normal direction has to be the minimum distance between the two lines. Every other point is just a vector stretched away from this point by the other components.