<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# Distance Formula

## Using the Pythagorean Theorem to determine distances

Estimated18 minsto complete
%
Progress
Practice Distance Formula

MEMORY METER
This indicates how strong in your memory this concept is
Progress
Estimated18 minsto complete
%
The Distance Formula

Triangle \begin{align*}ABC\end{align*} has vertices \begin{align*}A(-5, 7), B(-8, 6)\end{align*} and \begin{align*}C(-3, 3)\end{align*}. The triangle is reflected about the \begin{align*}y\end{align*}-axis to form triangle \begin{align*}A^\prime B^\prime C^\prime\end{align*}. Assuming that \begin{align*}\angle A= \angle A^\prime, \angle B= \angle B^\prime\end{align*},and \begin{align*}\angle C= \angle C^\prime\end{align*}, prove the two triangles are congruent.

### The Distance Formula

Two shapes are congruent if they are exactly the same shape and exactly the same size. In congruent shapes, all corresponding sides will be the same length and all corresponding angles will be the same measure. Translations, reflections, and rotations all create congruent shapes.

If you want to determine whether two segments are the same length, you could try to use a ruler. Unfortunately, it's hard to be very precise with a ruler. You could also use geometry software, but that is not always available. If the segments are on the coordinate plane and you know their endpoints, you can use the distance formula:

\begin{align*}d= \sqrt{ \left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2}\end{align*}

The distance formula helps justify congruence by proving that the sides of the preimage have the same length as the sides of the transformed image. The distance formula is derived using the Pythagorean Theorem, which you will learn more about in geometry.

#### Let's solve the following problems using the distance formula:

1. Line segment \begin{align*}AB\end{align*} is translated 5 units to the right and 6 units down to produce line \begin{align*}A^\prime B^\prime\end{align*}. The diagram below shows the endpoints of lines \begin{align*}AB\end{align*} and \begin{align*}A^\prime B^\prime\end{align*}. Prove the two line segments are congruent.

\begin{align*}d_{AB}&= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} \\ d_{AB}&= \sqrt{\left(-4-3\right)^2+ \left(2-2\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(1-8\right)^2+ \left(-4- \left(-4\right)\right)^2} \\ d_{AB}&= \sqrt{\left(-7\right)^2+ \left(0\right)^2} && d_{A^\prime B^\prime}= \sqrt{ \left(-7\right)^2+ \left(0\right)^2} \\ d_{AB}&= \sqrt{49+0} && d_{A^\prime B^\prime}= \sqrt{49+0} \\ d_{AB}&= \sqrt{49} && d_{A^\prime B^\prime}= \sqrt{49} \\ d_{AB}&=7 \ cm && d_{A^\prime B^\prime}=7 \ cm\end{align*}

1. Line segment \begin{align*}AB\end{align*} has been rotated about the origin \begin{align*}90^\circ\end{align*}CCW to produce \begin{align*}A^\prime B^\prime\end{align*}. The diagram below shows the lines \begin{align*}AB\end{align*} and \begin{align*}A^\prime B^\prime\end{align*}. Prove the two line segments are congruent.

\begin{align*}d_{AB}&= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} \\ d_{AB}&= \sqrt{\left(-4-3\right)^2+ \left(2-2\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(-2- \left(-2\right)\right)^2+ \left(-4-3\right)^2} \\ d_{AB}&= \sqrt{\left(-7\right)^2+ \left(0\right)^2} && d_{A^\prime B^\prime}= \sqrt{ \left(0\right)^2+ \left(-7\right)^2} \\ d_{AB}&= \sqrt{49+0} && d_{A^\prime B^\prime}= \sqrt{0+49} \\ d_{AB}&= \sqrt{49} && d_{A^\prime B^\prime}= \sqrt{49} \\ d_{AB}&=7 \ cm && d_{A^\prime B^\prime}=7 \ cm\end{align*}

1. The square \begin{align*}ABCD\end{align*} has been reflected about the line \begin{align*}y = x\end{align*} to produce \begin{align*}A^\prime B^\prime C^\prime D^\prime\end{align*} as shown in the diagram below. Prove the two are congruent.

Since the figures are squares, you can conclude that all angles are the same and equal to \begin{align*}90^\circ\end{align*}. You can also conclude that for each square, all the sides are the same length. Therefore, all you need to verify is that \begin{align*}m \overline{AB}=m \overline{A^\prime B^\prime}\end{align*}.

\begin{align*}d_{AB}&= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} \\ d_{AB}&= \sqrt{\left(-6.1- \left(-3\right)\right)^2+ \left(9.3-4.9\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(9.3- 4.9\right)^2+ \left(-6.1- \left(-3\right)\right)^2} \\ d_{AB}&= \sqrt{\left(-3.1\right)^2+ \left(4.4\right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(4.4\right)^2+ \left(-3.1\right)^2} \\ d_{AB}&= \sqrt{9.61+19.36} && d_{A^\prime B^\prime}= \sqrt{19.36+9.61} \\ d_{AB}&= \sqrt{28.97} && d_{A^\prime B^\prime}= \sqrt{28.97} \\ d_{AB}&=5.38 \ cm && d_{A^\prime B^\prime}=5.38 \ cm\end{align*}

Since \begin{align*}m \overline{AB}=m \overline{A^\prime B^\prime}\end{align*} and both shapes are squares, all 8 sides must be the same length. Therefore, the two squares are congruent.

### Examples

#### Example 1

Earlier, you were asked to prove that the two triangles below are congruent.

To prove congruence, prove that \begin{align*}m \overline{AB}=m \overline{A^\prime B^\prime},m \overline{AC}=m \overline{A^\prime C^\prime},\end{align*} and \begin{align*}m \overline{BC}=m \overline{B^\prime C^\prime}\end{align*}.

\begin{align*}d_{AB}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{AB}&= \sqrt{\left(-5- \left(-8 \right) \right)^2+ \left(7-6 \right)^2} && d_{A^\prime B^\prime}= \sqrt{ \left(5-8 \right)^2+ \left(7-6 \right)^2} \\ d_{AB}&= \sqrt{\left(3 \right)^2+ \left(1 \right)^2} && d_{A^\prime B^\prime}= \sqrt{ \left(-3 \right)^2+ \left(1 \right)^2} \\ d_{AB}&= \sqrt{9+1} && d_{A^\prime B^\prime}= \sqrt{9+1} \\ d_{AB}&= \sqrt{10} && d_{A^\prime B^\prime}= \sqrt{10} \\ d_{AB}&=3.16 \ cm && d_{A^\prime B^\prime}=3.16 \ cm\end{align*}

\begin{align*}d_{AC}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{A^\prime C^\prime}= \sqrt{ \left(x_2-x_1 \right)^2+ \left(y_2-y_1\right)^2} \\ d_{AC}&= \sqrt{\left(-5- \left(-3 \right) \right)^2+ \left(7-3 \right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(5-3 \right)^2+ \left(7-3 \right)^2} \\ d_{AC}&= \sqrt{\left(-2 \right)^2+ \left(4 \right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(2 \right)^2+ \left(4 \right)^2} \\ d_{AC}&= \sqrt{4+16} && d_{A^\prime C^\prime}= \sqrt{4+16} \\ d_{AC}&= \sqrt{20} && d_{A^\prime C^\prime}= \sqrt{20} \\ d_{AC}&=4.47 \ cm && d_{A^\prime C^\prime}=4.72 \ cm\end{align*}

\begin{align*}d_{BC}&= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} && d_{A^\prime C^\prime}= \sqrt{ \left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} \\ d_{BC}&= \sqrt{\left(-8- \left(-3\right)\right)^2+ \left(6-3\right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(8-3\right)^2+ \left(6-3\right)^2} \\ d_{BC}&= \sqrt{\left(-5\right)^2+ \left(3\right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(5\right)^2+ \left(3\right)^2} \\ d_{BC}&= \sqrt{25+9} && d_{A^\prime C^\prime}= \sqrt{25+9} \\ d_{BC}&= \sqrt{34} && d_{A^\prime C^\prime}= \sqrt{34} \\ d_{BC}&=5.83 \ cm && d_{A^\prime C^\prime}=5.83 \ cm\end{align*}

It is given that \begin{align*}\angle A= \angle A^\prime, \angle B= \angle B^\prime,\end{align*} and \begin{align*}\angle C= \angle C^\prime\end{align*}, and the distance formula proved that \begin{align*}m \overline{AB}=m \overline{A^\prime B^\prime},m \overline{AC}=m \overline{A^\prime C^\prime},\end{align*} and \begin{align*}m \overline{BC}=m \overline{B^\prime C^\prime}\end{align*}. Therefore the two triangles are congruent.

#### Example 2

Line segment \begin{align*}\overline{ST}\end{align*} drawn from \begin{align*}S(-3, 4)\end{align*} to \begin{align*}T(-3, 8)\end{align*} has undergone a reflection in the \begin{align*}y\end{align*}-axis to produce Line \begin{align*}S^\prime T^\prime\end{align*} drawn from \begin{align*}S^\prime (3, 4)\end{align*} to \begin{align*}T^\prime (4, 8)\end{align*}. Draw the preimage and image and prove the two lines are congruent.

\begin{align*}d_{ST}&= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} && d_{S^\prime T^\prime}= \sqrt{\left(x_2-x_1\right)^2+ \left(y_2-y_1\right)^2} \\ d_{ST}&= \sqrt{\left(-3- \left(-4\right)\right)^2+ \left(4-8\right)^2} && d_{S^\prime T^\prime}= \sqrt{\left(3-4\right)^2+ \left(4-8\right)^2} \\ d_{ST}&= \sqrt{\left(1\right)^2+ \left(-4\right)^2} && d_{S^\prime T^\prime}= \sqrt{\left(-1\right)^2+ \left(-4\right)^2} \\ d_{ST}&= \sqrt{1+16} && d_{S^\prime T^\prime}= \sqrt{1+16} \\ d_{ST}&= \sqrt{17} && d_{S^\prime T^\prime}= \sqrt{17} \\ d_{ST}&=4.12 \ cm && d_{S^\prime T^\prime}=4.12 \ cm\end{align*}

#### Example 3

The triangle below has undergone a rotation of \begin{align*}90^\circ\end{align*}CW about the origin. Given that all of the angles are equal, draw the transformed image and prove the two figures are congruent.

\begin{align*}d_{AB}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{AB}&= \sqrt{\left(2-7 \right)^2+ \left(2-3 \right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(3-2 \right)^2+ \left(-7- \left(-2 \right)\right)^2} \\ d_{AB}&= \sqrt{\left(-5\right)^2+ \left(-1 \right)^2} && d_{A^\prime B^\prime}= \sqrt{\left(1 \right)^2+ \left(-5 \right)^2} \\ d_{AB}&= \sqrt{25+1} && d_{A^\prime B^\prime}= \sqrt{1+25} \\ d_{AB}&= \sqrt{26} && d_{A^\prime B^\prime}= \sqrt{26} \\ d_{AB}&=5.10 \ cm && d_{A^\prime B^\prime}=5.10 \ cm\end{align*}

\begin{align*}d_{AC}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{AC}&= \sqrt{\left(2-4 \right)^2+ \left(2-6 \right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(2-6 \right)^2+ \left(-2- \left(-4 \right)\right)^2} \\ d_{AC}&= \sqrt{\left(-2 \right)^2+ \left(-4 \right)^2} && d_{A^\prime C^\prime}= \sqrt{\left(-4 \right)^2+ \left(2 \right)^2} \\ d_{AC}&= \sqrt{4+16} && d_{A^\prime C^\prime}= \sqrt{16+4} \\ d_{AC}&= \sqrt{20} && d_{A^\prime C^\prime}= \sqrt{20} \\ d_{AC}&=4.47 \ cm && d_{A^\prime C^\prime}=4.72 \ cm\end{align*}

\begin{align*}d_{BC}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{B^\prime C^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{BC}&= \sqrt{\left(7-4 \right)^2+ \left(3-6 \right)^2} && d_{B^\prime C^\prime}= \sqrt{\left(3-6 \right)^2+ \left(-7- \left(-4 \right)\right)^2} \\ d_{BC}&= \sqrt{\left(3 \right)^2+ \left(-3 \right)^2} && d_{B^\prime C^\prime}= \sqrt{\left(-3 \right)^2+ \left(-3 \right)^2} \\ d_{BC}&= \sqrt{9+9} && d_{B^\prime C^\prime}= \sqrt{9+9} \\ d_{BC}&= \sqrt{18} && d_{B^\prime C^\prime}= \sqrt{18} \\ d_{BC}&=4.24 \ cm && d_{B^\prime C^\prime}=4.24 \ cm\end{align*}

#### Example 4

The polygon below has undergone a translation of 7 units to the left and 1 unit up. Given that all of the angles are equal, draw the transformed image and prove the two figures are congruent.

\begin{align*}d_{DE}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{D^\prime E^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{DE}&= \sqrt{\left(3.5-6 \right)^2+ \left(1-3 \right)^2} && d_{D^\prime E^\prime}= \sqrt{\left(-3.5- \left(-1 \right) \right)^2+ \left(2-4 \right)^2} \\ d_{DE}&= \sqrt{\left(-2.5 \right)^2+ \left(-2 \right)^2} && d_{D^\prime E^\prime}= \sqrt{\left(-2.5 \right)^2+ \left(-2 \right)^2} \\ d_{DE}&= \sqrt{6.25+4} && d_{D^\prime E^\prime}= \sqrt{6.25+4} \\ d_{DE}&= \sqrt{10.25} && d_{D^\prime E^\prime}= \sqrt{10.25} \\ d_{DE}&=3.20 \ cm && d_{D^\prime E^\prime}=3.20 \ cm\end{align*}

\begin{align*}d_{EF}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{E^\prime F^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{EF}&= \sqrt{\left(6-5 \right)^2+ \left(3-6 \right)^2} && d_{E^\prime F^\prime}= \sqrt{\left(-1- \left(-2 \right) \right)^2+ \left(4-7 \right)^2} \\ d_{EF}&= \sqrt{\left(1 \right)^2+ \left(-3 \right)^2} && d_{E^\prime F^\prime}= \sqrt{\left(1 \right)^2+ \left(-3 \right)^2} \\ d_{EF}&= \sqrt{1+9} && d_{E^\prime F^\prime}= \sqrt{1+9} \\ d_{EF}&= \sqrt{10} && d_{E^\prime F^\prime}= \sqrt{10} \\ d_{EF}&=3.16 \ cm && d_{E^\prime F^\prime}=3.16 \ cm\end{align*}

\begin{align*}d_{FG}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{F^\prime G^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{FG}&= \sqrt{\left(5-2 \right)^2+ \left(6-6 \right)^2} && d_{F^\prime G^\prime}= \sqrt{\left(-2- \left(-5 \right) \right)^2+ \left(7-7 \right)^2} \\ d_{FG}&= \sqrt{\left(3 \right)^2+ \left(0 \right)^2} && d_{F^\prime G^\prime}= \sqrt{\left(3 \right)^2+ \left(0 \right)^2} \\ d_{FG}&= \sqrt{9+0} && d_{F^\prime G^\prime}= \sqrt{9+0} \\ d_{FG}&= \sqrt{9} && d_{F^\prime G^\prime}= \sqrt{9} \\ d_{FG}&=3.00 \ cm && d_{F^\prime G^\prime}=3.00 \ cm\end{align*}

\begin{align*}d_{GH}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{G^\prime H^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{GH}&= \sqrt{\left(2-1 \right)^2+ \left(6-3 \right)^2} && d_{G^\prime H^\prime}= \sqrt{\left(-5- \left(-6 \right) \right)^2+ \left(7-4 \right)^2} \\ d_{GH}&= \sqrt{\left(1 \right)^2+ \left(3 \right)^2} && d_{G^\prime H^\prime}= \sqrt{\left(1 \right)^2+ \left(3 \right)^2} \\ d_{GH}&= \sqrt{1+9} && d_{G^\prime H^\prime}= \sqrt{1+9} \\ d_{GH}&= \sqrt{10} && d_{G^\prime H^\prime}= \sqrt{10} \\ d_{GH}&=3.16 \ cm && d_{G^\prime H^\prime}=3.16 \ cm\end{align*}

\begin{align*}d_{HD}&= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} && d_{H^\prime D^\prime}= \sqrt{\left(x_2-x_1 \right)^2+ \left(y_2-y_1 \right)^2} \\ d_{HD}&= \sqrt{\left(1-3.5 \right)^2+ \left(3-1 \right)^2} && d_{H^\prime D^\prime}= \sqrt{\left(-6- \left(-3.5 \right) \right)^2+ \left(4-2 \right)^2} \\ d_{HD}&= \sqrt{\left(-2.5 \right)^2+ \left(2 \right)^2} && d_{H^\prime D^\prime}= \sqrt{\left(-2.5 \right)^2+ \left(2 \right)^2} \\ d_{HD}&= \sqrt{6.25+4} && d_{H^\prime D^\prime}= \sqrt{6.25+4} \\ d_{HD}&= \sqrt{10.25} && d_{H^\prime D^\prime}= \sqrt{10.25} \\ d_{HD}&=3.20 \ cm && d_{H^\prime D^\prime}=3.20 \ cm\end{align*}

### Review

Find the length of each line segment below given its endpoints. Leave all answers in simplest radical form.

1. Line segment \begin{align*}AB\end{align*} given \begin{align*}A(5, 7)\end{align*} and \begin{align*}B(3, 9)\end{align*}.
2. Line segment \begin{align*}BC\end{align*} given \begin{align*}B(3, 8)\end{align*} and \begin{align*}C(5, 2)\end{align*}.
3. Line segment \begin{align*}CD\end{align*} given \begin{align*}C(4, 6)\end{align*} and \begin{align*}D(3, 5)\end{align*}.
4. Line segment \begin{align*}DE\end{align*} given \begin{align*}D(9, 11)\end{align*} and \begin{align*}E(2, 2)\end{align*}.
5. Line segment \begin{align*}EF\end{align*} given \begin{align*}E(1, 1)\end{align*} and \begin{align*}F(8, 7)\end{align*}.
6. Line segment \begin{align*}FG\end{align*} given \begin{align*}F(3, 6)\end{align*} and \begin{align*}G(2, 4)\end{align*}.
7. Line segment \begin{align*}GH\end{align*} given \begin{align*}G(-2, 4)\end{align*} and \begin{align*}H(6, -1)\end{align*}.
8. Line segment \begin{align*}HI\end{align*} given \begin{align*}H(1, -5)\end{align*} and \begin{align*}I(3, 3)\end{align*}.
9. Line segment \begin{align*}IJ\end{align*} given \begin{align*}I(3.4, 7)\end{align*} and \begin{align*}J(1, 6)\end{align*}.
10. Line segment \begin{align*}JK\end{align*} given \begin{align*}J(6, -3)\end{align*} and \begin{align*}K(-2, 4)\end{align*}.
11. Line segment \begin{align*}KL\end{align*} given \begin{align*}K(-3, -3)\end{align*} and \begin{align*}L(2, -1)\end{align*}.

For each of the diagrams below, assume the corresponding angles are congruent. Find the lengths of the line segments to prove congruence.

To see the Review answers, open this PDF file and look for section 10.17.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes

### Vocabulary Language: English

TermDefinition
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}$.
Midpoint Formula The midpoint formula says that for endpoints $(x_1, y_1)$ and $(x_2, y_2)$, the midpoint is $@\left( \frac{x_1+x_2}{2}, \frac{y_1+y_2}{2} \right)@$.