Distance between a line and a point

  • Context: MHB 
  • Thread starter Thread starter Amer
  • Start date Start date
  • Tags Tags
    Line Point
Click For Summary
SUMMARY

The discussion focuses on calculating the distance between a line represented by the equation $ay - bx - c = 0$ and a point $(s,t)$. The distance function $D(x) = \sqrt{(x - s)^2 + (y - t)^2}$ is minimized using calculus, leading to the derived coordinates for the closest point on the line. The final distance formula is expressed as $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}$. A key insight is that minimizing $D^2$ simplifies the calculations significantly.

PREREQUISITES
  • Understanding of calculus, specifically differentiation and optimization techniques.
  • Familiarity with linear equations and their geometric interpretations.
  • Knowledge of distance formulas in a Cartesian coordinate system.
  • Basic algebraic manipulation skills for simplifying expressions.
NEXT STEPS
  • Learn about minimizing functions using calculus, focusing on second derivatives.
  • Study the geometric interpretation of distance between points and lines in analytic geometry.
  • Explore optimization techniques in multivariable calculus.
  • Investigate applications of distance calculations in computer graphics and physics simulations.
USEFUL FOR

Mathematicians, students studying calculus and geometry, engineers working on optimization problems, and anyone interested in geometric distance calculations.

Amer
Messages
259
Reaction score
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
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
 
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
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K