# 1.6: Distance Formula and the Pythagorean Theorem

• • Contributed by CK12
• CK12

Discover lengths of triangle sides using the Pythagorean Theorem. Identify distance as the hypotenuse of a right triangle. Determine distance between ordered pairs.

### Pythagorean Theorem to Determine Distance

While walking to school one day, you decide to use your knowledge of the Pythagorean Theorem to determine how far it is between your home and school. You know that you walk 3 blocks east, and then turn and walk 7 blocks north to get to school. Is it possible to use the Pythagorean Theorem to help you determine the "straight line" distance between your home and school?

### Determining the Distance Using the Pythagorean Theorem

You can use the Pythagorean Theorem is to find the distance between two points.

Consider the points (-1, 6) and (5, -3). If we plot these points on a grid and connect them, they make a diagonal line. Draw a vertical line down from (-1, 6) and a horizontal line to the left of (5, -3) to make a right triangle. Figure $$\PageIndex{1}$$

Now we can find the distance between these two points by using the vertical and horizontal distances that we determined from the graph.

\begin{aligned} 9^2+(−6)^2 &=d^2 \\ 81+36 &=d^2 \\ 117 &=d^2\\ \sqrt{117}&=d \\ 3\sqrt{13}&=d\end{aligned}

Notice, that the x−values were subtracted from each other to find the horizontal distance and the y−values were subtracted from each other to find the vertical distance. If this process is generalized for two points (x_1, y_1) and (x_2, y_2), the  Distance Formula is derived.

$$(x_1−x_2)^2+(y_1−y_2)^2=d^2$$ Figure $$\PageIndex{2}$$

This is the Pythagorean Theorem with the vertical and horizontal differences between (x_1, y_1) and (x_2, y_2). Taking the square root of both sides will solve the right hand side for d, the distance.

$$\sqrt{(x_1−x_2)^2+(y_1−y_2)^2}=d$$

This is the  Distance Formula. The following problems show how to apply the distance formula.

#### Applying the Distance Formula

1. Find the distance between the two points.

(4, 2) and (-9, 5)

Plug each pair of points into the Distance Formula.

\begin{aligned} d&=\sqrt{(4−(−9))^2+(2−5)^2} \\ &=\sqrt{13^2+(−3)^2} \\ &=\sqrt{169+9} \\ &=\sqrt{178}\end{aligned}

2. Find the distance between the two points.

(-10, 3) and (0, -15)

Plug each pair of points into the distance formula.

\begin{aligned} d&=\sqrt{(−10−0)^2+(3−(−15))^2}\\ &=\sqrt{(−10)^2+(18)^2}\\ &=\sqrt{100+324} \\ &=\sqrt{424} \\ &=2\sqrt{106}\end{aligned}

3. Find the distance between the two points.

(3, 1) and (2, -7)

Plug each pair of points into the distance formula.

\begin{aligned} d&=\sqrt{(3−2)^2+(1−(−7))^2}\\ &=\sqrt{(1)^2+(8)^2}\\ &=\sqrt{1+64}\\ &=\sqrt{65}\end{aligned}

Example $$\PageIndex{1}$$

Earlier, you were asked to use your knowledge of the Pythagorean Theorem to determine how far it is between your home and school.

Solution

Since you know that the trip to school involves walking 3 blocks east followed by 7 blocks north, you can construct a triangle on a coordinate system out of these lengths, like this: Figure $$\PageIndex{3}$$

Since you went three blocks to the east, the school has an "x" coordinate of 3. Likewise, since you went 7 blocks north, the school has a "y" coordinate of 7. To find the straight-line distance to school, you can use the Distance Formula:

\begin{aligned} d&=(3−0)^2+(7−0)^2\\ &=\sqrt{(3)^2+(7)^2} \\ &=\sqrt{58}\end{aligned}

This is a straight line distance of approximately 7.6 blocks.

Example $$\PageIndex{2}$$

Find the distance between the two points.

(3, 1) and (2, -7)

Solution

Plug each pair of points into the distance formula.

\begin{aligned} d&=\sqrt{(3−2)^2+(1−(−7))^2}\\ &=\sqrt{(1)^2+(8)^2} \\ &=\sqrt{1+64}\\ &=\sqrt{65}\end{aligned}

Example $$\PageIndex{3}$$

Find the distance between the two points.

(5, -8) and (0, 3)

Solution

Plug each pair of points into the distance formula.

\begin{aligned} d&=\sqrt{(5−0)^2+(−8−(3))^2} \\ &=(5)^2+(−11)^2 \\ &=\sqrt{25+121}\\ &=\sqrt{146}\end{aligned}

Example $$\PageIndex{4}$$

Find the distance between the two points.

(2, 6) and (2, 9)

Solution

Plug each pair of points into the distance formula.

\begin{aligned} d&=\sqrt{(2−2)^2+(6−9)^2} \\ &=\sqrt{(0)^2+(−3)^2} \\ &=\sqrt{9}=3\end{aligned}

## Review

Find the distance between each pair of points. Round each answer to the nearest tenth.

1. (2, 4) and (5, 10)
2. (1, 5) and (8, 9)
3. (-2, 3) and (6, 4)
4. (5, 7) and (5, 10)
5. (8, 12) and (15, 12)
6. (1, -4) and (25, -2)
7. (5, -6) and (3, 7)
8. (12, -9) and (-1, 5)
9. (-3, 14) and (8, 10)
10. (-11, 3) and (-5, 1)
11. (5, 2) and (11, 13)
12. (8, 10) and (9, -6)

Find the perimeter of each triangle. Round each answer to the nearest tenth.

1. $$A(3,−5),B(−5,−8),C(−2,7)$$
2. $$A(5,3),B(2,−7),C(−1,5)$$
3. $$A(1,2),B(1,5),C(4,5)$$

## Vocabulary

Term Definition
Distance Formula The distance between two points $$(x_1,y_1)$$ and $$(x_2,y_2)$$ can be defined as $$d=\sqrt{(x_2−x_1)^2+(y_2−y_1)^2}$$.