Proof of Formula For Least Distance of Two Dimensional Line From Origin

Find the least distance of the line
$ax+by=c$
from the origin.
Rearrange the line as
$y=- \frac{a}{b}x+ \frac{c}{b}$
.
The gradient of this line is
$- \frac{a}{b}$
.
The gradient of the perpendicular line is
$\frac{b}{a}$
.
The
$y$
intercept of this line is
$0$
so the equation of the line is
$y=\frac{b}{a} x$
.
Now find the point of intersection of these two lines by solving the simultaneous equations
$ax+by=c, \; y=\frac{b}{a}x$
, equivalent to
$ax+by=c$
(1)
$bx-ay=0$
(2)
$a$
times (1) to
$b$
times (2) to give
$a^2x+b^2x=ac \rightarrow x= \frac{ac}{a^2+b^2}$
.
Then from (2),
$y=\frac{b}{a}x= \frac{b}{a} \times \frac{ac}{a^2+b^2} = \frac{bc}{a^2+b^2}$
.
The distance
$d$
is then the distance between the points
$(0,0)$
and
$(\frac{ac}{a^2+b^2}, \frac{ab}{a^2+b^2})$

$d=\sqrt{(\frac{ac}{a^2+b^2}-0)^2+(\frac{bc}{a^2+b^2}-0)^2}=\frac{c}{\sqrt{a^2+b^2}}$
.