# Math Help - Distances (in general)

1. ## Distances (in general)

Given point A(x1,y1) and the line ax+by+c=0, show the distance from Point A to the line is d=[|ax1+by1+c|/root(a^2 + b^2)]. Note that ax+by+c=0 corresponds to a vertical line if b=0 and to a horizontal line if a=0.

Any help would be appreciated. Thank you

2. Hello,

It depends on what you can use as tools. (For example, what is the definition of a "distance"? Can we use vectors or the complex plane? etc.)

The easiest way would be to use the Cauchy-Schwarz inequality: $\sqrt{a^2+b^2}\sqrt{p^2+q^2}\geq |ap+bq|$.
We have to minimize (x-x_1)^2+(y-y_1)^2 where ax+by+c=0.
By the above inequality, $\sqrt{a^2+b^2}\sqrt{(x-x_1)^2+(y-y_1)^2}\geq |a(x-x_1)+b(y-y_1)|$. Substitute ax+by=-c into this and you get the formula.

Let B(x_0, y_0) be the point on the line realizing the distance: d=AB. If you know that AB is perpendicular to the line, there are many more proofs.For example, the line AB is -b(x-x_1)+a(y-y_1)=0, so you can determine B with the condition ax_0+by_0+c=0. (You can rephrase this by using vectors and saying that (x-x_1, y-y_1) is parallel to (a, b).)

If you know trigonometrics, represent any point on the line by $(x_1+r\cos t, y_1+r\sin t).$ As it is on the line, $a(x_1+r\cos t)+b(y_1+r\sin t)+c=0$ which is $ax_1+by_1+c+r\sqrt{a^2+b^2}\sin (t+\theta)=0$ for some $\theta$. The minimum of r is attained when $\sin(t+\theta)$ is either 1 or -1.

Bye.