Shortest distance between line and point

Click For Summary

Discussion Overview

The discussion revolves around finding the shortest distance from a point to a straight line, specifically the mathematical proof of the distance formula. Participants explore various methods including calculus, optimization, and trigonometry, while addressing the complexities involved in deriving the formula.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests that the shortest distance is perpendicular to the line, but acknowledges the difficulty in proving this without numerical values.
  • Another participant proposes defining a distance function and optimizing it rather than assuming perpendicularity, suggesting the use of the square of the distance function for minimization.
  • A different approach is mentioned that relies on the properties of the dot product instead of calculus.
  • One participant introduces the method of Lagrange multipliers to minimize the square of the distance under a constraint, leading to the distance formula derivation.
  • Another participant expresses confusion regarding the differentiation process of the distance function.
  • Further clarification is provided on the differentiation steps, leading to a critical value for the distance function.
  • Lastly, a simpler trigonometric approach is suggested, involving minimizing a function related to the perpendicular distance.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method to prove the distance formula, with multiple competing approaches and some expressing confusion about the calculus involved.

Contextual Notes

Some participants note the challenges in differentiating the distance function and the assumptions made regarding the shortest distance being perpendicular. The discussion reflects various mathematical techniques and their applicability to the problem.

karush
Gold Member
MHB
Messages
3,240
Reaction score
5
Show that the shortest distance from the point $\left(x_1,y_1\right)$ to a straight line
$$Ax_1+By_1+C=0$$ is
$$\frac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}$$

ok, well a line from a point to a line is shortest if it is perpendicular to that line

obviously we are trying to find out a min value to this but taking a derivative of this without numbers is rather daunting and the question is asking for a proof

anyway not much of a start, but caught in the bushes already...

I did read the commentary on
"Finding the distance between a point and a line"

but this problem is under applications of differentiation which seem hard to set up

the book didn't give an answer to this...:cool:
 
Last edited:
Physics news on Phys.org
Re: shortest distance between line and point

Given that this is a calculus exercise, I would say you should not assume the shortest distance is perpendicular, but rather you should define the distance function $D(x)$ and then optimize it.

I would let $$(x,y)=\left(x,-\frac{Ax+C}{B} \right)$$ be an arbitrary point on the line and then let$f$ represent the square of the distance function, since minimizing it will also minimize the distance function itself.

$$f(x)=D^2(x)=\left(x-x_1 \right)^2+\left(\frac{Ax+C}{B}+y_1 \right)^2$$

Now, differentiate with respect to $x$, and equate to zero to find the critical value.
 
Re: shortest distance between line and point

I added https://driven2services.com/staging/mh/index.php?posts/36541/ to the commentary thread, but it relies on the properties of dot product rather than calculus.
 
Another way to prove the distance formula by calculus is to use Lagrange multipliers. We want to minimise the square of the distance, $d^2 = (x-x_1)^2 + (y-y_1)^2$ subject to the constraint $Ax+By+C = 0.$ So we take the partial derivatives of $(x-x_1)^2 + (y-y_1)^2 - \lambda(Ax+By+C)$ with respect to $x$ and $y$, and put them equal to $0$: $$2(x-x_1) - \lambda A = 0,\qquad 2(y-y_1) - \lambda B = 0.$$ Thus $x = x_1 + \frac12\lambda A,\ y = y_1 + \frac12\lambda B$. Substitute those into the constraint equation to get $A\bigl(x_1 + \frac12\lambda A\bigr) + B\bigl(y_1 + \frac12\lambda B\bigr) + C = 0$, from which $\lambda = - \dfrac{2(Ax_1+By_1+C)}{A^2+B^2}.$ Then $$d^2 = (x-x_1)^2 + (y-y_1)^2 = \bigl(\tfrac12\lambda A\bigr)^2 + \bigl(\tfrac12\lambda B\bigr)^2 = \bigl(\tfrac12\lambda\bigr)^2(A^2+B^2) = \frac{(Ax_1+By_1+C)^2}{A^2 + B^2}.$$ Now take the square root to get $d = \dfrac{|Ax_1+By_1+C|}{\sqrt{A^2+B^2}}.$
 
Re: shortest distance between line and point

MarkFL said:
$$f(x)=D^2(x)=\left(x-x_1 \right)^2+\left(\frac{Ax+C}{B}+y_1 \right)^2$$

Now, differentiate with respect to $x$, and equate to zero to find the critical value.

I got lost trying $d/dx$ this
 
Re: shortest distance between line and point

karush said:
I got lost trying $d/dx$ this

Okay, let's have a look see...

Using the power and chain rules, we obtain:

$$\frac{df}{dx}=2\left(x-x_1 \right)(1)+2\left(\frac{Ax+C}{B}+y_1 \right)\left(\frac{A}{B} \right)=0$$

Multiplying through by $$\frac{B^2}{2}$$, we may write:

$$B^2\left(x-x_1 \right)+A\left(Ax+C+By_1 \right)=0$$

Solving for $x$, there results:

$$x=\frac{B^2x_1-ABy_1-AC}{A^2+B^2}$$

Because $f$ is the sum of two squares, we know this critical value must be at the global minimum, but we could also use the argument that:

$$\frac{d^2f}{dx^2}=2+2\frac{A^2}{B^2}>0\,\forall (A,B)\in\mathbb{R}$$
 
A much simpler approach involves trigonometry.

Let $p$ be the perpendicular distance between the point and the line. we may then state:

$$d(\theta)=p\csc(\theta)$$

Now, minimize this function. :D
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
8
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 4 ·
Replies
4
Views
10K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
4
Views
2K