Proof of the formula for distance of a point from a line.

222 Views Asked by At

Let $L = ax + by + c$ be a line, and $R = (x, y)$ a point. There is a unique point $Q$ on $L$ for which the distance between $Q$, $R$ is a minimum $d$, given by $$d = \dfrac{L^2(x,y)}{a^2 + b^2}$$.

Proof:-

The vector $N = (a, b)$ is perpendicular to $L$, and $T = (−b, a)$ is a direction vector for $L$. Choose any point $P$ on $L$. Then $L$ is defined by the formula $L(Z ) = N • (Z − P)$, and parametrized as $Q(t) = P + t T$.

The square of the distance from $R$ to $Q(t)$ is given by the function $$f(t) = (R − Q(t)) • (R − Q(t))$$.

This function has a stationary point when its derivative with respect to the variable $t$ vanishes. Differentiating, we obtain $f^\prime(t) = −2Q ^\prime (t) • (R − Q(t))$.

This expression vanishes if and only if $Q^\prime (t) = T$ is perpendicular to $R− Q(t)$, i.e. when the following relation holds, determining a unique value of $t$, hence a unique point $Q$ $$0 = T • (R − P − t T ) = T • (R − P) − t (T • T ) \tag 1$$

Moreover, it is a strict minimum of the function, since the second derivative $f ^{\prime\prime} (t) = 2(T • T )$ is positive. For that value $Q = P + t T = R + s N$ for some constant $s$, so $R − P$ = $−s N + t T$ . Taking the scalar product of both sides with N , we obtain

$$-s = \dfrac{N• (R -P)}{N • N} = \dfrac{L(x,y)}{a^2 + b^2} \tag 2$$

...


I have two problems with this proof,

One, how do I obtain the value $t$ for which $f(t)$ is minimum directly from $(1)$ ? Not by susbtituting $R- sN$ or anything else in $(1)$ and checking if it works or not.

Second, How is $N•(R- P) = L(x,y)$ ? Since $L(Z) = N • (Z - P)$ where $Z$ lies on line $L$ and $R$ don't even lie on line $L$.

1

There are 1 best solutions below

1
On

This is a long comment.

The significance of setting up a quadratic in $t$ and finding its minimum is seen in a generalization involving inner-product spaces of any (finite or infinite) dimension.

In $\mathbb R^2$ take the unit vector $V=(a,b)/\sqrt {a^2+b^2}\;$ and let $S$ be the intersection of the line $L^*=\{R+rV:r\in \mathbb R\}$ with $L,$ which exists because $V$ is perpendicular to the direction-vector $(a,-b)$ of $L.$ Now $L^*\perp L,$ so if $S\ne P\in L$ then $\|R-P\|^2=\|R-S\|^2+\|S-P\|^2$ (Pythagoras) which implies $\|R-P\|>\|R-S\|.$ So $S$ is the unique point on $L$ that is closest to $R.$

We have $R-S=zV$ with $|z|=\|R-S\|=d.$

For any points $A,B$ we have $L(A+B)=L(A)+L(B)-c.$

So $$L(R)=L((R-S)+S)=L(R-S)+L(S)-c=L(R-S)-c=L(zV)-c=$$ $$=z\sqrt {a^2+b^2}\;.$$ Therefore $d=|z|=|L(R)|/\sqrt {a^2+b^2}\;.$