Skip to main content
K12 LibreTexts

4.37: Distance Formula and the Pythagorean Theorem

  • Page ID
    4972
  • \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

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

    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{align*} 9^2+(−6)^2&=d^2 \\ 81+36&=d^2 \\ 117&=d^2 \\ \sqrt{117}&=d \\ 3\sqrt{13}&=d\end{align*}\)

    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{align*}d & =\sqrt{(4−(−9))^2+(2−5)^2} \\ &=\sqrt{13^2+(−3)^2} \\ &=\sqrt{169+9} \\ &=\sqrt{178}\end{align*}\)

    2. Find the distance between the two points.

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

    Plug each pair of points into the distance formula.

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

    3. Find the distance between the two points.

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

    Plug each pair of points into the distance formula.

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

    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{align*}d&=\sqrt{(3−0)^2+(7−0)^2} \\ &=\sqrt{(3)^2+(7)^2} \\ &=\sqrt{58}\end{align*}\)

    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{align*}d&=\sqrt{(3−2)^2+(1−(−7))^2 \\ &=\sqrt{(1)^2+(8)^2} \\ &=\sqrt{1+64} \\ &=\sqrt{65}\end{align*}\)

    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{align*}d&=\sqrt{(5−0)^2+(−8−(3))^2} \\ &=\sqrt{(5)^2+(−11)^2} \\ &=\sqrt{25+121} \\ =\sqrt{146}\end{align*}\)

    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{align*}d &=\sqrt{(2−2)^2+(6−9)^2} \\ &=\sqrt{(0)^2+(−3)^2 \\ &=\sqrt{9} \\ =3\end{align*}\)

    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 4.37: 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.

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