Calculating the Distance of a Line to the Origin in 3D Space

In summary, the conversation discusses finding the distance from a line to the origin in 3D space. The approach involves using the minimum distance between the line and a point on the line, which can be found using the cross product and triangle trigonometry. The conversation also includes examples and diagrams to help clarify the concept.
  • #1
Jbreezy
582
0

Homework Statement





Say you have an equation of a line in 3 space and you want to find the distance from the line to the origin how do you go about it?
I guess by definition the distance of a line to a point ( say the origin in this case) is the minimum distance such that the line and some vector are perpendicular. That kind of sucks how I said it.

So x is a unique point on the line so you want the distance xo ( where o is the origin) such that xo is perpendicular to the line L . Not really sure how to do this. It is in the cross product section so maybe that would work. I tried to use dot product but I don't know how to get the shortest point. If I did I should dot xo with L and it would be 0. Well that was my thinking. I don't really know how to go about this.
Thanks
 
Physics news on Phys.org
  • #2
Jbreezy said:

Homework Statement





Say you have an equation of a line in 3 space and you want to find the distance from the line to the origin how do you go about it?
I guess by definition the distance of a line to a point ( say the origin in this case) is the minimum distance such that the line and some vector are perpendicular. That kind of sucks how I said it.

So x is a unique point on the line so you want the distance xo ( where o is the origin) such that xo is perpendicular to the line L . Not really sure how to do this. It is in the cross product section so maybe that would work. I tried to use dot product but I don't know how to get the shortest point. If I did I should dot xo with L and it would be 0. Well that was my thinking. I don't really know how to go about this.
Thanks

In general: Draw a line L and label a point P on the line. Draw a direction vector D for the line with its tail at P. Take a point Q off the line and draw a vector V=PQ. Drop a perpendicular from Q to the line and label its length h. Label the angle between V and D as ##\theta##. What is the length of h using that little triangle you see. The formula you get should remind you of something about the cross product. See if that helps when you apply it to your problem.
 
  • #3
I don't understand. How does it guarantee it is the shortest distance that is perpendicular and goes through the origin?
I don''t understand this
Take a point Q off the line and draw a vector V=PQ. Drop a perpendicular from Q to the line and label its length h.
Thanks
 
  • #4
Edited to include the quote from LCKurtz. Click the Quote button to see how I did it.
Jbreezy said:
I don't understand. How does it guarantee it is the shortest distance that is perpendicular and goes through the origin?
I don''t understand this
LCKurtz said:
Take a point Q off the line and draw a vector V=PQ. Drop a perpendicular from Q to the line and label its length h.
Thanks
 
  • #5
Jbreezy said:
I don't understand. How does it guarantee it is the shortest distance that is perpendicular and goes through the origin?
I don''t understand this
Take a point Q off the line and draw a vector V=PQ. Drop a perpendicular from Q to the line and label its length h.
Thanks

If you draw any other line K from the point Q to your given line L, then K, L, and the line labeled h make a right triangle with K as the hypotenuse and h a leg. h will always be less than the length of K. Draw a picture.
 
  • #6
I apologize I can't follow you. I grew a picture but I can't connect it to my problem I don't see how an equation for h is related to the cross product.I would think it is Pythagoras to find h. But once again to me it seems to far away from my problem I can't draw this together.
 
  • #7
Can't you use a triangle trigonometry formula to write h in terms the length of V and the variable ##\theta##?
 
  • #8
Vsinθ = h
PQsinθ = h

OK but at the same time this line is not so pretty as the one you have described.
My position vectors are a = <2 , 1, 7> : b = <1 , 4, -1>
Just connect points A and B this is the line. Thanks
 
  • #9
Jbreezy said:
Vsinθ = h
PQsinθ = h

OK but at the same time this line is not so pretty as the one you have described.
My position vectors are a = <2 , 1, 7> : b = <1 , 4, -1>
Just connect points A and B this is the line. Thanks

I'm not worried about your particular values at the moment. I'm trying to show you what your problem has to do with a cross product. You have ##|V|\sin\theta = h##. Notice that is the length of ##V##, not ##V## itself in the formula. Now in your picture, imagine D being divided by its length giving a unit vector ##\hat D##. Draw a little short vector on top of ##D## representing ##\hat D##. What is the formula for ##|V \times \hat D|##, the magnitude of the cross product of those two vectors?
 
  • #10
How do you write out your answers really good like that ? Like how the symbols are in your last post?
VDsin(theta) is the magnitude of the cross product of the v cross d.
So what does Vsin(theta) have to do with it?
OK I drew it. Still not landing this concept. I don't get this problem. Thanks
 
  • #11
Jbreezy said:
How do you write out your answers really good like that ? Like how the symbols are in your last post?
VDsin(theta) is the magnitude of the cross product of the v cross d.
So what does Vsin(theta) have to do with it?
OK I drew it. Still not landing this concept. I don't get this problem. Thanks

Remember ##\hat D## is a unit vector so you have$$
|\vec V \times \hat D|=|\vec V||\hat D|\sin \theta|$$Now since ##\hat D## is a unit vector, its length is ##1##. So you have$$
|\vec V \times \hat D|=|\vec V||\hat D|\sin \theta=|\vec V| \sin\theta = h$$Now how does this help you with your problem? Using your given position vectors, you can make a direction vector ##\vec D## and make a unit vector ##\hat D## out of it. What can you use for P and Q in your problem so you can calculate ##\vec V = \overline{PQ}##? Once you have ##\hat D## and ##\vec V##, just calculate ##\vec V \times \hat D## and take its length to get h.

To read about typing equations, read the pinned FAQ at the top of this forum.
 
  • #12
Can I just use position vector a as PQ?
 
  • #13
Jbreezy said:
Can I just use position vector a as PQ?

Yes, because the point that you are interested in that is not on the line is the origin. That is your Q. It doesn't matter if you use PQ or QP because only the length of the vector matters in the formulas.
 
  • #14
I feel like this problem isn't correct. The approach I mean.
 
  • #15
Jbreezy said:
I feel like this problem isn't correct. The approach I mean.

In post #8 you seemed to understand from the triangle ##|\vec V|\sin\theta = h##

And we have$$
|\vec V \times \hat D|=|\vec V||\hat D|\sin \theta=|\vec V|\cdot1\cdot \sin\theta $$so it gives ##h##. It doesn't matter what you "feel like".
 
  • #16
Yeah I understand that. Is there a way to draw on here? How can you show the diagram.
I think if you cross the position vectors it give you a vector orthogonal to the plane. Then you can cross that with the vector that is give by subtraction the position vectors ( what you call D). That will form a new vector in the plane of a and b. You turn it into a unit vector and dot it with the position vector b.
 
  • #17
Jbreezy said:
Yeah I understand that. Is there a way to draw on here? How can you show the diagram.
I think if you cross the position vectors it give you a vector orthogonal to the plane. Then you can cross that with the vector that is give by subtraction the position vectors ( what you call D). That will form a new vector in the plane of a and b. You turn it into a unit vector and dot it with the position vector b.

And what does dotting it with the position vector b get you? Nothing relevant that I can see.

You are making it much harder than it is. You have two points ##a## and ##b## determining the line and a point ##p## not on the line. You can think of all three as position vectors to the points or coordinates of the points.$$
\vec D = b-a$$ $$
\vec V = p-a$$Both of those are trivial to calculate. Make a unit vector ##\hat D## out of ##\vec D## by dividing it by its length. Now calculate ##\vec V \times \hat D## and calculate its length and you are done.
 
  • #18
Dotting with b will get you the length. You say that a is perpendicular to the line?
 
  • #19
Jbreezy said:
Dotting with b will get you the length. You say that a is perpendicular to the line?

No it won't and no I didn't say that and no it isn't.
 
  • #20
I think you are finding a different length.

Forgive my word drawing but it works. I was looking for the blue length. I think it will show up blue.

So,

a x b = V , this is a vector orthogonal to the plane.
AB x V = U
This vector is in orthogonal to AB.
So we make a unit vector out of it. Call it u.
Then we take the dot product of u with b which will give us the length.
Could you open the drawing?
 

Attachments

  • Drawing.docx
    12.3 KB · Views: 245
  • #21
OK. Since the point that is not on the line is the origin in your problem, if you take the absolute value of u dot b, that will give you the distance from the origin. That method will not work if you want the distance from the line to any point that isn't the origin. That is what I meant about saying your method won't work.

The method I have outlined for you will work your problem and it will work any distance from point to line problem. And it is easier than what you have done, requiring only one cross product. Have you tried it? It is worth learning.
 
  • #22
That method will not work if you want the distance from the line to any point that isn't the origin.

I have done both methods. Why won't mine work as you say in your quote?
Thanks
 
  • #23
Jbreezy said:
I have done both methods. Why won't mine work as you say in your quote?
Thanks

Because your method takes the projection of a position vector to a point on the line along the normal to the line. Normally the vector from the external point to the line will not be a position vector. Just try both methods using a point other than the origin for your external point and you will see they don't give the same answers.
 
  • #24
Normally the vector from the external point to the line will not be a position vector

What will it be then ?
 
  • #25
Look, I have explained everything I know how to about this problem. Post #17 summarizes and shows you exactly what you need to do for the general problem of distance from a point to a line. You can learn from it or not, but I don't have anything more to add to this thread.
 
  • #26
Jbreezy said:

Homework Statement


Say you have an equation of a line in 3 space and you want to find the distance from the line to the origin how do you go about it?
I guess by definition the distance of a line to a point ( say the origin in this case) is the minimum distance such that the line and some vector are perpendicular. That kind of sucks how I said it.

So x is a unique point on the line so you want the distance xo ( where o is the origin) such that xo is perpendicular to the line L . Not really sure how to do this. It is in the cross product section so maybe that would work. I tried to use dot product but I don't know how to get the shortest point. If I did I should dot xo with L and it would be 0. Well that was my thinking. I don't really know how to go about this.
Thanks

You have the line given with a point (position vector r0) and direction vector u:

r=r0 +tu (t a parameter).

You want the distance of the line from the origin. It is the length of the segment of a line which goes through the origin and crosses the original line perpendicularly. You need to find the point P on the line, so as vector d and vector u are perpendicular.

Make a plane normal to the line and going through the origin. You get the equation of that plane from the condition that all vectors r lying in it are normal to u : ru=0

Find the vector d that is in the plane and also on the line:

d=r0 +tu,*
du=0**

Multiply * with u and make it equal to zero. Isolate t, the parameter corresponding to point P. Substitute t back into *: you get the vector d. Determine the magnitude: it is the distance of the line from the origin.
 

Attachments

  • planepoint.JPG
    planepoint.JPG
    9.2 KB · Views: 375
  • #27
Just to add to what has been said: think of the orthogonal projection of the line onto the zero subspace. This is what I think others are suggesting.
 
  • #28
thanks
 

1. What is the distance of a line to the origin?

The distance of a line to the origin is the length of the shortest path between the origin (0,0) and any point on the line. It is the perpendicular distance from the origin to the line.

2. How do you calculate the distance of a line to the origin?

To calculate the distance of a line to the origin, you can use the formula d = |ax0 + by0 + c| / √(a^2 + b^2), where (x0, y0) is any point on the line and a, b, and c are the coefficients of the line's equation in standard form (ax + by + c = 0). This formula is derived from the Pythagorean Theorem and the equation of a line.

3. Can the distance of a line to the origin be negative?

No, the distance of a line to the origin cannot be negative. It is always a positive value, representing the magnitude of the shortest distance between the origin and the line. This ensures that the distance is a scalar quantity and can be directly compared to other distances.

4. What does the distance of a line to the origin represent?

The distance of a line to the origin represents the line's position in relation to the origin. It can also be interpreted as the line's "offset" from the origin, or how far the line is from the origin in terms of length. This distance is useful in various geometric and algebraic applications.

5. Can the distance of a line to the origin be greater than the line's length?

Yes, the distance of a line to the origin can be greater than the line's length. This can happen when the line is not perpendicular to the x-axis or y-axis, and therefore the shortest distance between the origin and the line is not equal to the length of the line. This concept is important in understanding the concept of slope and the shortest distance between a point and a line.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
17
Views
908
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Precalculus Mathematics Homework Help
2
Replies
40
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
2K
  • Precalculus Mathematics Homework Help
Replies
20
Views
2K
  • Precalculus Mathematics Homework Help
Replies
6
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
13
Views
382
Back
Top