Linear Algebra: Distance between a point and a line

In summary, the problem is to find the distance from a point Q to a line passing through points P and R. The solution involves finding the line equation using the given points, setting up a dot product to find the shortest distance vector between Q and the line, and then minimizing the distance function to get the final answer. Alternatively, the square of the distance can be minimized to find the shortest distance.
  • #1
dcramps
43
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
  • #2
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
 
  • #3
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.
 
  • #4
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:
  • #5
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?
 
  • #6
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
 
  • #7
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
 

1. What is the formula for calculating the distance between a point and a line in linear algebra?

The formula for calculating the distance between a point and a line in linear algebra is the perpendicular distance formula, which is given by d = |ax0 + by0 + c| / √(a^2 + b^2), where (x0, y0) is the coordinates of the point, and ax + by + c = 0 is the equation of the line.

2. How is the distance between a point and a line related to the concepts of vectors and matrices in linear algebra?

The distance between a point and a line can be calculated using vector and matrix operations in linear algebra. The vector from the point to any point on the line is perpendicular to the line, and this vector can be expressed as a linear combination of the direction vector of the line and a constant. This constant can be found by solving a system of equations using matrix operations.

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

No, the distance between a point and a line cannot be negative. The distance is always measured as a positive value, and a negative value would indicate that the point is on the opposite side of the line from where it is actually located.

4. Is the distance between a point and a line affected by the position of the point in relation to the line?

Yes, the distance between a point and a line is affected by the position of the point in relation to the line. If the point is located on the line, the distance would be zero, and as the point moves further away from the line, the distance increases.

5. Can the distance between a point and a line be calculated for a line in higher dimensions?

Yes, the distance between a point and a line can be calculated for a line in higher dimensions. In three-dimensional space, the equation for the distance between a point and a line would include an additional term for the z-coordinate, and in higher dimensions, the equation would include additional terms for each dimension.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
376
  • Calculus and Beyond Homework Help
Replies
3
Views
917
  • Calculus and Beyond Homework Help
Replies
10
Views
997
  • Calculus and Beyond Homework Help
Replies
2
Views
509
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
872
  • Calculus and Beyond Homework Help
Replies
1
Views
907
  • Calculus and Beyond Homework Help
Replies
24
Views
789
  • Calculus and Beyond Homework Help
Replies
12
Views
981
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Back
Top