Min. distance from a line to a line

  • Thread starter spacetimedude
  • Start date
  • Tags
    Line
In summary, the minimum distance between two lines can be found by taking the cross product of the gradients of both lines and dividing by the magnitude of the cross product. The formula for distance is d = |(r2-r1).n̂| or d = |(r1-r2).n̂|, as the order of the vectors does not matter when taking the absolute value.
  • #1
spacetimedude
88
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/[itex]\sqrt{14}[/itex]

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

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

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
  • #2
r1 and r2 are the directional vectors of the lines in the formula for the distance.

ehild
 
  • #3
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/[itex]\sqrt{14}[/itex]

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

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

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
[tex]\mathbf{r}(t) = \mathbf{c} + \mathbf{m}t.[/tex] The direction of the line is determined by the gradient [itex]\mathbf{m}[/itex].

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

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

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 [itex]d[/itex] by subtracting [itex]\mathbf{r}_1[/itex] from [itex]\mathbf{r}_2[/itex] 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 [itex](\mathbf{r}_2 -\mathbf{r}_1)\cdot \mathbf{n} = -(\mathbf{r}_1 - \mathbf{r}_2) \cdot \mathbf{n}[/itex] it follows that [itex]|(\mathbf{r}_2 -\mathbf{r}_1)\cdot \mathbf{n}| = |(\mathbf{r}_1 - \mathbf{r}_2) \cdot \mathbf{n}|[/itex]. If that was not clear then you need to revise the basic properties of the scalar product.
 
  • #4
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/[itex]\sqrt{6}[/itex].

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 [itex]\vec p_1[/itex] and [itex]\vec p_2[/itex] are displacement vectors from the origin to two distinct points on some line. Then [itex]\vec p_1 + \alpha (\vec p_2 - \vec p_1)[/itex] where [itex]\alpha[/itex] 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 [itex]\vec p_1 = \hat k[/itex] and [itex]\vec p_2 = \hat \imath + 2 \hat \jmath + 4\hat k[/itex]. Using [itex]\lambda[/itex] in lieu of my [itex]\alpha[/itex] (it's just a dummy variable) yields [itex]\vec r_2 = \vec p_1 + \lambda (\vec p_2 - \vec p_1) = \hat k + \lambda(\hat \imath + 2 \hat \jmath + 3\hat k)[/itex].

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.
 
  • #5
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).
 
  • #6
I've got it! Thanks so much everyone!
 

1. What is the minimum distance between two parallel lines?

The minimum distance between two parallel lines is the length of the shortest line segment connecting the two lines. This segment is perpendicular to both lines, and it is also the shortest distance between any two points on the two lines.

2. How is the minimum distance between two lines calculated?

The minimum distance between two lines can be calculated using the formula d = |(ax + by + c)| / √(a² + b²), where a and b are the coefficients of the x and y terms in the equations of the lines, and c is the constant term. This formula is derived from the distance formula in coordinate geometry.

3. Can there be more than one minimum distance between two lines?

No, there can only be one minimum distance between two lines. This distance is unique and is the same for all points on the two lines. It is the shortest distance between any two points on the two lines.

4. What is the significance of the minimum distance between two lines?

The minimum distance between two lines is an important concept in geometry and is used in various real-world applications such as engineering, architecture, and computer graphics. It helps determine the shortest distance between two parallel or intersecting lines, which is useful in designing structures and creating accurate visual representations.

5. Can the minimum distance between two lines be negative?

No, the minimum distance between two lines cannot be negative. It is always a positive value since it represents the shortest distance between two points, and distance cannot be negative. If the two lines are parallel, the minimum distance will be 0 since the lines are always equidistant from each other.

Similar threads

  • Calculus and Beyond Homework Help
Replies
11
Views
3K
  • Calculus and Beyond Homework Help
Replies
16
Views
1K
  • Introductory Physics Homework Help
Replies
6
Views
798
  • Calculus and Beyond Homework Help
Replies
2
Views
237
  • Calculus and Beyond Homework Help
Replies
8
Views
865
  • Atomic and Condensed Matter
Replies
3
Views
844
  • Calculus and Beyond Homework Help
Replies
19
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
685
  • Calculus and Beyond Homework Help
Replies
2
Views
12K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
Back
Top