Min. distance from a line to a line

  • Thread starter Thread starter spacetimedude
  • Start date Start date
  • Tags Tags
    Line
Click For Summary

Homework Help Overview

The discussion revolves around finding the minimum distance between two lines in three-dimensional space. One line is inclined at equal angles to the x-, y-, and z-axes and passes through the origin, while the other line is defined by two points: (1,2,4) and (0,0,1).

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the parametrization of the lines and the calculation of the normal vector using the cross product of the directional vectors. Questions are raised about the correct formulation of the distance equation and the implications of the order of subtraction in the distance formula.

Discussion Status

Several participants provide insights into the parametrization of the second line and the calculation of the normal vector. There is an ongoing exploration of the implications of different approaches to the distance calculation, with some participants clarifying misconceptions about the vectors involved.

Contextual Notes

Participants note that the original poster's confusion may stem from the choice of points for the parametrization and the calculation of the normal vector. There is also a mention of the importance of understanding the properties of the scalar product in relation to the distance formula.

spacetimedude
Messages
87
Reaction score
1

Homework Statement


A line is inclined at equal angles to the x-, y-, z- axes and passes through the origin. Another line passes through the points (1,2,4) and (0,0,1). Find the minimum distance between the two lines.

Homework Equations


d=|(r2-r1).n(hat)|

The Attempt at a Solution



r1=i+j+k
r2=i+2j+4k

n=(i+j+k)x(i+2j+4k)=2i-3j+k
|n|=1/\sqrt{14}

d=(1/14)|k.(2i-3j+k)|=1/\sqrt{14}

The answer says that the r2=k+λ(i+2j+3k) and the final answer is 1/\sqrt{6}.

Could you care to explain why r2=k+λ(i+2j+3k) and when finding n, the answer excludes the lone k in r2=k+λ(i+2j+3k)? Also, when doing these kind of problems, does it matter if d=|(r1-r2).n(hat)| and not d=|(r2-r1).n(hat)|? I'm having difficulties trying to figure out which vector to subtract first.
Thank you
 
Physics news on Phys.org
r1 and r2 are the directional vectors of the lines in the formula for the distance.

ehild
 
spacetimedude said:

Homework Statement


A line is inclined at equal angles to the x-, y-, z- axes and passes through the origin. Another line passes through the points (1,2,4) and (0,0,1). Find the minimum distance between the two lines.


Homework Equations


d=|(r2-r1).n(hat)|

The Attempt at a Solution



r1=i+j+k
r2=i+2j+4k

n=(i+j+k)x(i+2j+4k)=2i-3j+k
|n|=1/\sqrt{14}

d=(1/14)|k.(2i-3j+k)|=1/\sqrt{14}

The answer says that the r2=k+λ(i+2j+3k) and the final answer is 1/\sqrt{6}.

Could you care to explain why r2=k+λ(i+2j+3k) and when finding n, the answer excludes the lone k in r2=k+λ(i+2j+3k)?

Straight lines are parametrized by
\mathbf{r}(t) = \mathbf{c} + \mathbf{m}t. The direction of the line is determined by the gradient \mathbf{m}.

Here the second line is parametrized by <br /> \mathbf{r}_2(t) = (\mathbf{i} + 2\mathbf{j} + 4\mathbf{k})t + \mathbf{k}(1 - t) <br /> = \mathbf{k} + (\mathbf{i} + 2\mathbf{j} + 3 \mathbf{k})t so its gradient is \mathbf{i} + 2\mathbf{j} + 3 \mathbf{k}

The minimum distance occurs between two points lying on a line which perpendicular to both \mathbf{r}_1 and \mathbf{r}_2. Thus the gradient \mathbf{n} of this line is the cross product of the gradients of the first two, ie \mathbf{n} = (\mathbf{i} + \mathbf{j} + \mathbf{k}) \times (\mathbf{i} + 2\mathbf{j} + 3\mathbf{k}).

Also, when doing these kind of problems, does it matter if d=|(r1-r2).n(hat)| and not d=|(r2-r1).n(hat)|? I'm having difficulties trying to figure out which vector to subtract first.

Your geometric intuition should tell you that the distance from point A to point B is the same as the distance from point B to point A. Thus if you get different results for d by subtracting \mathbf{r}_1 from \mathbf{r}_2 and vice-versa then either you are doing something wrong or the formula is nonsensical.

In this case if you are getting different results then you are doing something wrong: since (\mathbf{r}_2 -\mathbf{r}_1)\cdot \mathbf{n} = -(\mathbf{r}_1 - \mathbf{r}_2) \cdot \mathbf{n} it follows that |(\mathbf{r}_2 -\mathbf{r}_1)\cdot \mathbf{n}| = |(\mathbf{r}_1 - \mathbf{r}_2) \cdot \mathbf{n}|. If that was not clear then you need to revise the basic properties of the scalar product.
 
ehild said:
r1 and r2 are the directional vectors of the lines in the formula for the distance.
That's not right. r1 is the displacement vector from the origin to some arbitrary point on line #1, and r2 is the displacement vector from the origin to some arbitrary point on line #2.

What spacetimedude got wrong was his nhat. That's what uses those directional vectors.

spacetimedude said:
The answer says that the r2=k+λ(i+2j+3k) and the final answer is 1/\sqrt{6}.

Could you care to explain why r2=k+λ(i+2j+3k) and when finding n, the answer excludes the lone k in r2=k+λ(i+2j+3k)?
It doesn't matter which point you pick. As I wrote above, r2 represents some arbitrary point on line #2. You can pick any point on the line you want and you'll get the same result. The same answer, 1/√6, results whether you use (0,0,1), (1,2,4), or (10,20,31). The obvious choice here is the point (0,0,1).

That expression r2=k+λ(i+2j+3k) represents the set of all points that lie on the second line.

Suppose you know that \vec p_1 and \vec p_2 are displacement vectors from the origin to two distinct points on some line. Then \vec p_1 + \alpha (\vec p_2 - \vec p_1) where \alpha is some real number will also describe a point on that line.

Here you know that (0,0,1) and (1,2,4) are two points on the second line. The displacement vectors that represent these points are \vec p_1 = \hat k and \vec p_2 = \hat \imath + 2 \hat \jmath + 4\hat k. Using \lambda in lieu of my \alpha (it's just a dummy variable) yields \vec r_2 = \vec p_1 + \lambda (\vec p_2 - \vec p_1) = \hat k + \lambda(\hat \imath + 2 \hat \jmath + 3\hat k).

Also, when doing these kind of problems, does it matter if d=|(r1-r2).n(hat)| and not d=|(r2-r1).n(hat)|? I'm having difficulties trying to figure out which vector to subtract first.
Order doesn't matter. You're taking the absolute value of that inner product. Switch which one you call line #1 and line #2 and you'll get the same result.
 
I think DH has explained it well. The OP's problem was in calculating n. He should have been taking a cross product of the gradient of the two lines, not the cross product of two specific points that lie on those lines. (and to do this, he needs to work out the gradient of the second line).
 
I've got it! Thanks so much everyone!
 

Similar threads

Replies
11
Views
5K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 2 ·
Replies
2
Views
13K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K