The Distance Between Two Points

The Distance Between Two Points

Suppose that we have a point $A$ with coordinates $(x_1, y_1)$ and a point $B$ with coordinates $(x_2, y_2)$. We say that the distance between point $A$ and point $B$ is the length of the line segment that passes through $A$ and $B$. Formally, we will use the following formula to calculate the distance between two points:

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

Before we look at some examples, let's first derive this formula. Let $A$ have coordinates $(x_1, y_1)$ and let $B$ has coordinates $(x_2, y_2)$ as illustrated:


Now construct a triangle in the following manner:


If we can calculate the lengths of the smaller sides, then we can use Pythagoras' theorem ($a^2 + b^2 = c^2$). First, note that the length of the horizontal side (orange) can be calculated by $x_2 - x_1$ as follows:


Furthermore, the length of the vertical side (pink) can be calculated by $y_2 - y_1$:


Substituting this into Pythagoras' theorem we get that $d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2$. Isolating for our distance $d$ we get:

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

Now that we've derived the distance formula, let's look at an example. Suppose that we want to find the distance between the points $(1, 4)$ and $(-3, 5)$. Applying the distance formula, we get that:

\begin{align} d = \sqrt{(-3 - 1)^2 + (5 - 4)^2} \\ d = \sqrt{(-4)^2 + (1)^2} \\ d = \sqrt{16 + 1} \\ d = \sqrt{17} \end{align}

Example Questions

  • 1. Calculate the distance between points $(3, 5)$ and $(1, 4)$.
  • 2. Calculate the distance between point $(1, 3)$ and $(-2, -3)$.


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License