Distance Formula

Theorem
The distance $d$ between two points $A = \left({x_1, y_1}\right)$ and $B = \left({x_2, y_2}\right)$ on a Cartesian plane is:
 * $d = \sqrt{\left({x_1 - x_2}\right)^2 + \left({y_1 - y_2}\right)^2}$

Proof
The distance in the horizontal direction between $A$ and $B$ is given by $\left\vert{x_1 - x_2}\right\vert$.

The distance in the vertical direction between $A$ and $B$ is given by $\left\vert{y_1 - y_2}\right\vert$.

By definition, the angle between a horizontal and a vertical line is a right angle.

So when we place a point $C = \left({x_1, y_2}\right)$, $\triangle ABC$ is a right triangle.

Thus, by Pythagoras's Theorem:


 * $d^2 = \left\vert{x_1 - x_2}\right\vert^2 + \left\vert{y_1 - y_2}\right\vert^2$

and the result follows.