Welcome to our community

Be a part of something great, join today!

Distance between a line and a point

Amer

Active member
Mar 1, 2012
275
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 ?
 

CaptainBlack

Well-known member
Jan 26, 2012
890
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
 

Amer

Active member
Mar 1, 2012
275