Linear Algebra: Distance between a point and a line

dcramps
Messages
43
Reaction score
0

Homework Statement


Find the distance from the point Q to the line passing through the points P and R.

Homework Equations


r=r0+tv
D=|ax0 + by0 + cz0 + d| / sqrt(a2 + b2 + c2)

The Attempt at a Solution


To find the line:
(x,y,z) = (2,3,1) + t(3-2,1-3,1-1)
(x,y,z) = (2,3,1) + t(1,-2,0)
(x,y,z) = (2,3,1) + (t,-2t,0)
(x,y,z) = (t+2,3-2t,1)

My problem is I don't know how to format that answer so it fits in with my distance formula.
 
Physics news on Phys.org
the (unique) shortest distance vector between a point and a line will always be perpindicular to the line, so try writing a dot product that describes above
 
Er, I forgot to mention that P = (2,3,1) Q = (3,5,3) R = (3,1,1)

With that in mind, I don't think a dot product would work.
 
let T be the point on the line closest to Q

Then try setting up the dot product QT dot PR, then solving for T

Otherwise an even quicker way to do it would be to minimise the distance function
 
Last edited:
Let me see if I understand your method... I am doing a dot product of QT and PR to get a vector T, the normal to the line, which I can use with a length formula to get what I need to know? What about the t parameter in PR?
 
Actually an even quicker way is to note, minimizing the distance is the same as minimizing the square of the distance, so write down th square of the distance between Q and any point on the line, then minimize wrt t
 
this would be (in this case) mine solution too

lanedance said:
Actually an even quicker way is to note, minimizing the distance is the same as minimizing the square of the distance, so write down th square of the distance between Q and any point on the line, then minimize wrt t
 
Back
Top