Skip to main content
K12 LibreTexts

1.6: Distance Formula and the Pythagorean Theorem

  • Page ID
    4144
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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.

    f-d_27b75d2e6320bca086a01574f63804d58838ab58356ea000736c4967+IMAGE_TINY+IMAGE_TINY.jpg
    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\)

    f-d_f2d78b8530b63688b30a4a57783734a937f9872d4473debe8bdd9557+IMAGE_TINY+IMAGE_TINY.jpg
    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:

    f-d_773d515bb8a2c0b4a7211dd5fd4d678dd5e62b207e307640712e3263+IMAGE_TINY+IMAGE_TINY.jpg
    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)\)

    Review (Answers)

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

    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}\).

    Additional Resources

    Interactive Element

    Video: The Distance Formula

    Practice: Distance Formula and the Pythagorean Theorem

    Real World: It All Depends on Distance


    This page titled 1.6: Distance Formula and the Pythagorean Theorem is shared under a CK-12 license and was authored, remixed, and/or curated by CK-12 Foundation via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    CK-12 Foundation
    LICENSED UNDER
    CK-12 Foundation is licensed under CK-12 Curriculum Materials License