The Distance Formula is a variant of the Pythagorean Theorem that you used in geometry. Let us see how to derive them.

Suppose we have the two points (–2, 1) and (1, 5), and they want you to find out how far apart they are.

You can draw in the lines that form a right-angled triangle, using these points as two of the corners:

It's easy to find the lengths of the horizontal and vertical sides of the right triangle: just subtract the x-values and the y-values:

Then use the Pythagorean Theorem to find the length of the third side that is the hypotenuse of the right triangle.

c^{2} = a^{2} + b^{2}

...so:

c^{2} = √[(5 - 1) ^{2 }+ (1 - (-2)^{2}]

c = √[(5−1)^{2}+(1−(−2))^{2}]

c = √{(4)^{2} + (3)^{2}}

c = √(4)^{2}+(3)^{2}

c = √{16 + 9}

c = √25

c = 5

When two points are given, you can always plot them, draw the right triangle, and then find the length of the hypotenuse. The length of the hypotenuse is the distance between the two points. This can be given as a formula.

**Distance Formula:** Given the two points (x_{1}, y_{1}) and (x_{2}, y_{2}), the distance d between these points is given by the formula:

d = √ {(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}

d= √ [(x_{2}−x_{1})^{2}+(y_{2}−y_{1})^{2}]