Skip to main content
Mathematics LibreTexts

2.3: The Distance Formula

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

    The previous section taught how to plot points in the rectangular coordinate plane. This section teaches how to find the distance between any two points in the plane. For example, to find the distance of points \((x_1, y_1)\) and \((x_2, y_2)\) consider the following formula:

    Definition: Distance Formula

    The distance d between two points, \(P_1(x_1, y_1)\) and \(P_2(x_2, y_2)\) in the plane is given by:

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

    Example 2.3.1

    Find the distance between the points \((−5, 2)\) and \((3, 4)\)

    Solution

    Let \(P_1(−5, 2)\) and \(P_2(3, 4)\) be two points in the plane and let \(x_1 = −5\), \(y_1 = 2\), \(x_2 = 3\), and \(y_2 = 4\).

    Using the distance formula with the given values:

    \(\begin{aligned} d &= \sqrt{(x_2 − x_1) ^2 + (y_2 − y_1) ^2 } \\&= \sqrt{ (3 − (−5))^2 + (4 − 2)^2}\\& = \sqrt{ (3 + 5)^2 + (2)^2 } \\ &= \sqrt{ 8 ^2 + 2^2} \\ &= \sqrt{64 + 4 }\\ &= \sqrt{ 68 } \\&= 2\sqrt{17}\end{aligned}\)

    Therefore, the distance between the two given points is \(2\sqrt{17}\).

    Example 2.3.2

    Find the distance between the points \((−2.5, −1)\) and \((−3, −1.5)\).

    Solution

    Let \(P_1(−2.5, −1)\) and \(P_2(−3, −1.5)\) be points in the plane and let \(x_1 = −2.5\), \(y_1 = −1\), \(x_2 = −3\) and \(y_2 = −1.5\).

    Then using the distance formula with the given values yields,

    \(\begin{aligned} d &= \sqrt{(x_2 − x_1) ^2 + (y_2 − y_1) ^2}\\& = \sqrt{[−3 − (−2.5)]^2 + [−1.5 − (−1)]^2 } \\&= \sqrt{ (−3 + 2.5)^2 + (−1.5 + 1)^2} \\&= \sqrt{ (−0.5)^2 + (−0.5)^2 } \\&= \sqrt{ 0.25 + 0.25 }\\ &= \sqrt{0.5 } \\&\approx 0.71 \end{aligned}\)

    Therefore, the distance between the two given points is approximately 0.71.

    Exercise 2.3.1
    1. Find the distance between \(P_1(−3, −1.5)\) and \(P_2(−2.5, − 1)\). Compare the answer to the answer in example 2. What can be concluded?
    2. Find the distance between \((−3, 6)\) and \((2, 4)\)
    3. Find the distance between the points \(\left( \dfrac{1 }{2} , − \dfrac{10 }{4}\right)\) and \(\left(− \dfrac{14 }{4} , − \dfrac{5 }{2}\right )\)
    4. Why is the distance formula used?

    This page titled 2.3: The Distance Formula is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Victoria Dominguez, Cristian Martinez, & Sanaa Saykali (ASCCC Open Educational Resources Initiative) .