# Derivation of the Distance Formula

Suppose you’re given two arbitrary points A and B in the Cartesian plane and you want to find the distance between them.

First, construct the vertical and horizontal line segments passing through each of the given points such that they meet at a 90-degree angle.

Next, connect points **A** and **B** to reveal a right triangle.

Find the legs of the right triangle by subtracting the x-values and the y-values accordingly.

The distance between points **A** and **B** is just the hypotenuse of the right triangle.

**Note***:* Hypotenuse is always the side opposite the 90-degree angle.

Finally, applying the concept of the Pythagorean Theorem, the Distance Formula is calculated as follows: