Faster ways to calculate distance between a point and a line in 3D

• Krushnaraj Pandya
In summary, the author suggests a faster and shorter way to solve a homework problem involving finding a vector projection of a point not on a given line. This can be done by knowing the hypotenuse of a right triangle and using that information to find the other leg.
Krushnaraj Pandya
Gold Member

Homework Statement

Suppose a line is given, say (x-3)=(y-2)=z in Cartesian form and we are supposed to find a point on it which is at a distance say, 6 units from a given arbitrary point (1,2,3).

2. Relevant tedious methods
1) write line in vector form then equate modulus of vector between point on line and given point to 6
2)use given equation and distance formula to get the point.

The Attempt at a Solution

Using vector form of line as well using distance formula is very tedious and has high chances of calculation mistakes and its a really off-putting thing especially in exam pressure when you put a lot of time into it and still get a wrong answer, I would be glad if the people on PF could brainstorm a shorter, faster way to arrive at this-perhaps calculus could help in some way. Thank you for your help.

Krushnaraj Pandya said:
Using vector form of line as well using distance formula is very tedious and has high chances of calculation mistakes and its a really off-putting thing especially in exam pressure when you put a lot of time into it and still get a wrong answer
Any technique you choose will entail a number of calculations, so if you make a mistake on one of them, it will affect your answer.

There is another method that you didn't mention. Let's say that you are given a line L and a point P not on the line, and that ##\vec v## is a vector in the same direction as the line.
Pick any arbitrary point Q on the line.
Find the vector projection of ##\overrightarrow{QP}## in the direction of ##\vec v##. Some textbooks denote this as ##\overrightarrow{Proj_v} \vec{QP}##. This is equal to ##\frac{\vec v \cdot \overrightarrow{QP}}{|\vec v|} \frac{\vec v}{|\vec v|} = \left( \frac {\vec v \cdot \overrightarrow{QP}} {|\vec v|^2} \right)\vec v##.
The vector projection of ##\overrightarrow{QP}## in the direction of ##\vec v## can be thought of as the leg of a right triangle that lies on the line, that extends from the point Q to the point R that is closest to the given point P. The hypotentuse of the right triangle is of length ##|\overrightarrow{QP}|##. The other leg of the right triangle is the vector from R to the given point P.
If you know one leg of a right triangle and the hypotenuse, you can get the other leg (the distance you need to find) in a straightforward fashion.

Krushnaraj Pandya and SammyS
Mark44 said:
Any technique you choose will entail a number of calculations, so if you make a mistake on one of them, it will affect your answer.

There is another method that you didn't mention. Let's say that you are given a line L and a point P not on the line, and that ##\vec v## is a vector in the same direction as the line.
Pick any arbitrary point Q on the line.
Find the vector projection of ##\overrightarrow{QP}## in the direction of ##\vec v##. Some textbooks denote this as ##\overrightarrow{Proj_v} \vec{QP}##. This is equal to ##\frac{\vec v \cdot \overrightarrow{QP}}{|\vec v|} \frac{\vec v}{|\vec v|} = \left( \frac {\vec v \cdot \overrightarrow{QP}} {|\vec v|^2} \right)\vec v##.
The vector projection of ##\overrightarrow{QP}## in the direction of ##\vec v## can be thought of as the leg of a right triangle that lies on the line, that extends from the point Q to the point R that is closest to the given point P. The hypotentuse of the right triangle is of length ##|\overrightarrow{QP}|##. The other leg of the right triangle is the vector from R to the given point P.
If you know one leg of a right triangle and the hypotenuse, you can get the other leg (the distance you need to find) in a straightforward fashion.
That seems like a much better alternative to the methods I mentioned. Thank you very much.

What is the formula for calculating the distance between a point and a line in 3D?

The formula for calculating the distance between a point and a line in 3D is the perpendicular distance formula. This formula is derived from the Pythagorean theorem and involves finding the shortest distance between the point and the line, which is the perpendicular distance.

How do you find the coordinates of the closest point on a line to a given point in 3D space?

To find the coordinates of the closest point on a line to a given point in 3D space, you can use the cross product and dot product of vectors. First, find the vector from the given point to any point on the line. Then, find the vector perpendicular to the line. Finally, use the dot product and cross product to find the coordinates of the closest point on the line to the given point.

What is the fastest algorithm for calculating the distance between a point and a line in 3D?

The fastest algorithm for calculating the distance between a point and a line in 3D is the vector projection method. This method involves projecting the vector from the point to the line onto the line's direction vector and then using the length of this projection to calculate the distance.

Are there any special cases to consider when calculating the distance between a point and a line in 3D space?

Yes, there are two special cases to consider when calculating the distance between a point and a line in 3D space. The first case is when the point lies on the line, in which case the distance is 0. The second case is when the point is perpendicular to the line, in which case the distance is the length of the vector from the point to the line.

Can the distance between a point and a line in 3D be negative?

No, the distance between a point and a line in 3D cannot be negative. The distance is always a positive value, as it represents the shortest distance between the point and the line. If the point lies on the line, the distance is 0, and if the point is perpendicular to the line, the distance is the length of the vector from the point to the line.

• Precalculus Mathematics Homework Help
Replies
20
Views
2K
• Precalculus Mathematics Homework Help
Replies
6
Views
2K
• Precalculus Mathematics Homework Help
Replies
20
Views
2K
• Precalculus Mathematics Homework Help
Replies
1
Views
901
• Precalculus Mathematics Homework Help
Replies
11
Views
3K
• Precalculus Mathematics Homework Help
Replies
18
Views
717
• Set Theory, Logic, Probability, Statistics
Replies
7
Views
2K
• General Math
Replies
1
Views
391
• Classical Physics
Replies
6
Views
908
• General Math
Replies
3
Views
2K