This example derives the distance between two points formula using the geometry of a right triangle and the pythagorean theorem.

Observe that the geometry of the two points and forms the shape of a right triangle in the cartesian coordinate system. The hypotenuse labeled with the variable is equal to the distance between the two points. This is illustrated below.

Setup the equation for the pythagorean theorem.

Rearrange the equation and take the square root of both sides.

Find the lengths of adjacent and opposite of the right triangle by applying the one dimensional distance formula.

Substitute these expressions into the expression from step three.

Finally, change the variable to to represent distance and we have derived the formula.