Deriving the Distance Formula

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

an illustration showing two arbitrary points on an xy plane. The first arbitrary point is A with x-coordinate xsub1 and y-coordinate ysub1. The second arbitrary point is B with x-coordinate xsub2 and y-coordinate ysub2. We can simply write this two arbitrary points as A(xsub1, ysub1) and B(xsub2, ysub2).

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

we know that the line segment connecting points A and B is the hypotenuse of a right triangle. therefore, we will need to construct the legs of the right triangle generated by points A and B. To do so, we draw a line segment from point A parallel to the x-axis such that it meets at 90 degrees the line segment that we draw for point B parallel to the y-axis.

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

Points A and B are vertices of the right triangle that is not the vertex formed by the legs of the triangle with a 90-degree measure. Line segment AB is also the hypotenuse of the right triangle which translates to the distance between points A(x1,y1) and B(x2,y2).

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

furthermore, since we considered that the distance between points A and B is equivalent to the hypotenuse of the right triangle, it follows that we need to find the measures of the two legs of the right triangle. One leg of the right triangle, also known as the "vertical leg" can be found by finding the difference of the y-coordinates of points A and B. Similarly, the other leg also known as "horizontal leg", can be obtained by finding the difference of the x-coordinates of points A and B. In any case, if the difference of coordinates turns out to be negative, make sure to find its absolute value because we are after the distance of two points and the distance is always positive.

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.

in this illustration, we started with two arbitrary points and from those points, constructed two legs of a right triangle. now, connecting points A and B with a line segment clearly shows that line segment AB is the hypotenuse of the right triangle and therefore, the distance between the two given points.

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

this is the distance formula derived from finding the hypotenuse of a right triangle using two arbitrary points A and B. We have hypotenuse = distance = sqrt .

You may also be interested in these related math lessons or tutorials:

Distance Formula

Distance Formula Exercises

Distance between Point and Line