Distance between a line and a point

  • MHB
  • Thread starter Amer
  • Start date
  • Tags
    Line Point
In summary, to find the distance between a line and a point, you can minimize \(D^2\) by using the formula \(D ' (x) = \dfrac{x -s +y' (y - t)}{\sqrt{(x - s)^2 + (y - t)^2 }} \) and solving for the extreme values. This will simplify the process and make it easier.
  • #1
Amer
259
0
Find the distance between a line and a point using the extreme values
My work

Let the line
$ay - bx - c = 0 $
$y = \frac{bx+c}{a} $
and the point $(s,t)$

$D(x)= \sqrt{(x - s)^2 + (y - t)^2 } $
minimize
$D ' (x) = \dfrac{x -s +y' (y - t)}{\sqrt{(x - s)^2 + (y - t)^2 }} $

$x -s +y' (y - t) = 0\\ $
$x - s + \frac{b}{a}\left(\frac{bx+c}{a} - t \right)=0 $
$ax - as + b\left(\frac{bx+c}{a} - t \right) = 0 $
$$a^2x - a^2s + b^2x + bc - abt = 0 $$
$$ x (a^2+b^2) = a^2s - bc + abt $$
$$ x = \dfrac{a^2s - bc +abt }{a^2+b^2}$$
and
$$ y = \dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)}$$
The minmum D

$$D = \sqrt{\left(\dfrac{a^2s - bc +abt }{a^2+b^2} - s\right)^2 + \left(\dfrac{b(a^2s - bc + abt) + c(a^2+b^2)}{a(a^2+b^2)} - t\right)^2 } $$

Now i have to simplify just did i miss something ?
 
Physics news on Phys.org
  • #2
Amer said:
Find the distance between a line and a point using the extreme values
My work

Let the line
$ay - bx - c = 0 $
$y = \frac{bx+c}{a} $
and the point $(s,t)$

$D(x)= \sqrt{(x - s)^2 + (y - t)^2 } $
minimize
$D ' (x) = \dfrac{x -s +y' (y - t)}{\sqrt{(x - s)^2 + (y - t)^2 }} $

You will make things easier for yourself if you minimise \(D^2\) rather than \(D\).

CB
 
  • #3
CaptainBlack said:
You will make things easier for yourself if you minimise \(D^2\) rather than \(D\).

CB

Thanks very much I did not notice that
 

FAQ: Distance between a line and a point

What is the formula for finding the distance between a line and a point?

The formula for finding the distance between a line and a point is: d = |ax + by + c| / √(a² + b²), where a and b are the coefficients of the line's equation (ax + by + c = 0) and x and y are the coordinates of the point.

How is the distance between a line and a point calculated?

The distance between a line and a point is calculated by finding the perpendicular distance between the point and the line. This is done by drawing a line from the point to the line, forming a right triangle, and using the Pythagorean theorem to find the length of the hypotenuse.

What is the significance of finding the distance between a line and a point?

Finding the distance between a line and a point is important in many real-life applications, such as determining the shortest distance between two objects, calculating the distance to a target in navigation, and measuring the precision of a line in a technical drawing.

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

No, the distance between a line and a point cannot be negative. It is always a positive value, as it represents the shortest distance between the point and the line.

Is there a simpler way to find the distance between a line and a point?

Yes, there are a few other methods for finding the distance between a line and a point, such as using the slope of the line and the coordinates of the point, or using vector projection. However, these methods may not be as straightforward as the formula using the line's equation.

Similar threads

Replies
3
Views
2K
Replies
6
Views
550
Replies
3
Views
918
Replies
1
Views
2K
Replies
2
Views
696
Back
Top