The Distance Formula
Introduction
An elementary way to measure distance is to simply count the number of units between two points. A simple example can be shown on a number line. The number line below shows the distance between 3 and 15.

Distance on a number line is easy to measure using subtraction. On the number line above, 15 - 3 = 12. On a coordinate plane, finding distance is sometimes as simple as subtracting the numbers.

Consider the distance from A to B:
This distance can be found by measuring units horizontally. The distance from -3 to 8 is 11.
Consider the distance from X to Y:
The distance between X and Y can be found by measuring units vertically. The distance from 2 to 7 is 5.
Horizontal and vertical distances are easy to calculate. They only involve a change in one of the variables. Distances like those above can be found in much the same way that distance is found on a number line.
You are smart enough to figure out the above problems in your head… after all, the answers can be found using basic subtraction.

A more difficult problem is shown to the right. The distance from E to F is a diagonal distance that cannot be found using subtraction.
A diagonal distance can be found using the distance formula. Learn how to use this formula to find the distance between any two points on the coordinate plane.
Lesson
The shortest distance between two points is a straight line, and when finding distance on a coordinate plane you should assume that the distance is measured in a straigt line between the two points.

Consider points E and F in the diagram to the right. The distance from E to F can be measured by drawing a straight line (or more specifically a line segment) from E to F and then measuring its length.
Since the line is diagonal, one cannot simply count blocks to find the distance. Instead, the distance formula can be used.

The distance formula can be used to find the distance between any two coordinates.

The distance uses the logic of the Pythagorean Theorem to evaluate diagonal distances. In fact, it works in exactly the same way as the Pythagorean Theorem.
Example 1: Find the distance between the points (1, 1) and (4, 5).
Solution:

The distance formula uses the logic of the Pythagorean Theorem to evaluate diagonal distances. In example 1, the diagonal distance represents the hypotenuse of the triangle. The other two sides (or legs) of the triangle are the horizontal distance and the vertical distance.

Note the similarities in the solutions above. The distance formula is simply an equation that projects the Pythagorean theorem onto the coordinate plane.
Example 2: Find the distance between the points (-2, 2) and (10, 7).
Solution:

Find distance using a diagram
When you are finding the distance between points on a coordinate plane, first find their exact coordinates, then use the distance formula to find the distance.
Example 3: Find the distance from A to B.
Solution:
First, identify the coordinates.
- A: (2, 11)
- B: (11, 2)
Second, apply the distance formula:

A closer look at this problem demonstrates how the distance formula works. The difference in y’s is represented by the vertical leg to the left and the difference in x’s by the horizontal leg at the bottom of the triangle.

What is the benefit of the distance formula?
By now you have probably wondered whether the distance formula is useful. Each of the previous examples can be found using the Pythagorean theorem. In fact, the Pythagorean theorem seems a simpler and more straightforward way to solve these problems.
The best argument for the distance formula is that no picture is necessary. The distance formula can be used to find the distance between any two coordinates, and most students find that using the distance formula is faster and easier than sketching a graph of the points.

To sum up the above chart, either method can be used to find most distances on a coordinate plane. It is advised to understand how both methods work and be able to use either when appropriate. When deciding which method to use, keep in mind that
- Computational problems (with no diagram) are solved most efficiently using the distance formula
- Visual problems (with no coordinates) are solved most efficiently using the Pythagorean theorem
- Problems with a given diagram and numbered coordinates can be solved using either method
Example #4: Find the distance between the coordinates (3, 8) and (15, 24).
Solution:
There is no diagram given, so the best method for this problem would be the distance formula.
Give yourself the best chance to get the right answer: first label the points and then insert them into the distance formula.

Example #5: Find the distance between the coordinates (-21, 11) and (42, -17).
Solution:
There is no diagram given, so the best method for this problem would be the distance formula.
Give yourself the best chance to get the right answer: first label the points and then insert them into the distance formula.

Now that you have seen how to use the distance formula, go to the “try it” section to see if you can use it successfully.
Try It
Find the distance between the coordinates:
1) 
2) 
3) 
4) 
5) 
Use the distance formula to find the distance without a diagram.
6) Find the distance between (10, 5) and (34, -2)
7) Find the distance between (30, 0) and (0, 40)
8) Find the distance between (3, 6) and (10, 6)
9) Find the distance between (15, 12) and (20, 24)
10) Find the distance between (145, 211) and (462, -84)
Scroll down for solutions:
Solutions:
Find the distance between the coordinates:
1) The distance is horizontal, so subtract 9 - 2.

The distance is 7 units.
2) 
3) 
4) 
5) 
Use the distance formula to find the distance without a diagram.
6) Find the distance between (10, 5) and (34, -2)

The distance is 25 units.
7) Find the distance between (30, 0) and (0, 40)

The distance is 50 units.
8) Find the distance between (3, 6) and (10, 6)
Since the y-values are each 6, the distance is simply the horizontal distance between (3, 6) to (10, 6). 10 – 3 = 7, so the distance is 7 units.
9) Find the distance between (15, 12) and (20, 24)

The distance is 13 units.
10) Find the distance between (145, 211) and (462, -84)

The distance is 433.03 units.