# The Distance Formula

The Distance Formula is a useful tool for calculating the distance between two points that can be arbitrarily represented as points $A$ $\left( {{x_1},{y_1}} \right)$ and $B$ $\left( {{x_2},{y_2}} \right)$ on the coordinate plane.

By the way, if you already know the skill, you can test your knowledge by working on the practice problems provided.

The Distance Formula itself is actually derived from the Pythagorean Theorem which is ${a^2} + {b^2} = {c^2}$ where $c$ is the longest side of a right triangle (also known as the hypotenuse) and $a$ and $b$ are the other shorter sides (known as the legs of a right triangle).

The very essence of the Distance Formula is to calculate the length of the hypotenuse of the right triangle which is represented by the letter $c$.

That’s why we can claim that the idea of the Distance Formula is borrowed and derived from the Pythagorean Theorem. If you want to see how the Distance Formula is derived from the Pythagorean Theorem, please check out my lesson on How to Derive the Distance Formula.

## Distance Formula as the Derivative of the Pythagorean Theorem

The distance $d$ between two points

and

is calculated or computed using the following formula:

Below is an illustration showing that the Distance Formula is based on the Pythagorean Theorem where the distance $d$ is the hypotenuse of a right triangle.

Observations:

a) The expression ${x_2} – {x_1}$ is read as the “change in $x$”.

b) The expression ${y_2} – {y_1}$ is read as the “change in $y$”.

On top of the examples below, I have also created additional practice problems for the distance formula which can be found on the link below.

Distance Formula Practice Problems with Answers

### Examples of Using the Distance Formula

Below is a list of all the problems in this lesson.

1. How far is the point $(6,8)$ from the origin?
2. Find the distance between the two points $(â€“3, 2)$ and $(3, 5)$.
3. What is the distance between the two points $(â€“1, â€“1)$ and $(4, â€“5)$?
4. How many units apart are the points $(â€“4, â€“3)$ and $(4, 3)$? Solve in two different ways and show that the final answer is the same.
5. Find the radius of a circle with a diameter whose endpoints are $(â€“7, 1)$ and $(1, 3)$.
6. Find the two points of the form $\left( {{\color{red}{x}},-4} \right)$ that have the same distance of $10$ units from the point $\left( {3,2} \right)$.

Example 1: How far is the point (6,8) from the origin?

The origin is the red dot with x-coordinate of $0$ and y-coordinate of $0$. We can write it in ordered pair as $\color{red}\left( {0,0} \right)$.

While the other point is the blue dot having an x-coordinate of $6$ and y-coordinate of $8$. Similarly, this can be written as the ordered pair $\color{blue}\left( {6,8} \right)$.

If we plot the points $\color{red}\left( {0,0} \right)$ and $\color{blue}\left( {6,8} \right)$ on a Cartesian Plane, we will get something similar to the one below.

If we let the origin be the first point, then we have $\left( {{x_1},{y_1}} \right) = \left( {0,0} \right)$ which implies ${x_1} = 0$ and ${y_1} = 0$.

Consequently, the second point would be $\left( {6,8} \right)$. Therefore, $\left( {{x_2},{y_2}} \right) = \left( {6,8} \right)$ which means ${x_2} = 6$ and ${y_2} = 8$.

Now, we substitute the values into the Distance Formula then simplify to get the distance between the two points in question.

Example 2: Find the distance between the two points (â€“3, 2) and (3, 5).

Label the parts of each point properly and substitute it into the distance formula.

If we let $\left( { – 3,2} \right)$ be the first point then it will take the subscript of 1, thus, ${x_1} = – 3$ and ${y_1} = 2$.

Similarly, if $\left( {3,5} \right)$ be the second point it will have the subscript of 2, thus, ${x_2} = 3$ and ${y_2} = 5$.

Here is the calculation,

Therefore, the distance between two points (â€“3, 2) and (3, 5) is $3\sqrt 5$ . This is how it looks on a graph.

Example 3: What is the distance between the points (â€“1, â€“1) and (4, â€“5)?

If we assign $\left( { – 1, – 1} \right)$ as our first point then

In the same manner, assigning $\left( {4, – 5} \right)$ as our second point, we have

Plugging in the values of $x$ and $y$, we get:

The two points and the distance between them which is $\sqrt {41}$ can be shown on a graph just like the one below.

Example 4: How far apart are two points (â€“4, â€“3) and (4, 3) from each other? Solve in two different ways and show that the distance is the same.

Sometimes you may wonder if switching the points in calculating the distance can affect the final outcome.

Well, if you think about it, the formula is squaring the difference of the corresponding $x$ and $y$ values. That means it doesn’t matter if the change in $x$, also known as delta $x$, or the change in $y$, also known as delta $y$, is negative because when we eventually square it (raise to the 2nd power), the result always comes out to be positive.

Let’s “prove” that the answer is always the same by solving this problem in two ways!

The first solution shows the usual way because we assign which point is the first and second based on the order in which they are given to us in the problem. In the second solution, we switch the points.

• Solution 1:

$10$ units

• Solution 2:

$10$ units

As you can see, both solutions arrived at the same answer or result which is the distance of $10$, $d = 10$. Below is the visual solution to the problem.

Example 5: Find the radius of a circle with a diameter whose endpoints are (â€“7, 1) and (1, 3).

Remember that the diameter of a circle is twice the length of its radius. If that’s the case, then the radius is half the length of the diameter.

Here’s the plan! Since we are given the endpoints of the diameter, we can use the distance formula to find its length. Finally, we divide it by 2 to get the length of the radius, as required by the problem.

• Find the length of the diameter with endpoints $\left( { – 7,1} \right)$ and $\left( {1,3} \right)$.
• Solve for the radius by dividing the diameter by $2$.
• The blue dots are the endpoints of diameter and the green dot is the center of the circle (calculated using the midpoint formula) located at $\left( { – 3,2} \right)$.

Example 6: Find the two points of the form $\left( {{\color{red}{x}},-4} \right)$ that have the same distance of $10$ units from the point $\left( {3,2} \right)$.

This problem is slightly different. Notice that one point, namely $\left( {x, – \,4} \right)$, contains the variable $\large\color{red}x$ instead of a specific number.

I suggest that you approach this just the same as the previous problems. Now, assign which of the points will be the first and second, that is, $\left( {{x_1},{y_1}} \right)$ and $\left( {{x_2},{y_2}} \right)$, respectively. Then substitute the values into the formula and solve.

In this case, you will see immediately that you won’t get a value as the distance. Instead, you will have to solve a quadratic equation to obtain two numbers. Be careful here. Either of the two numbers doesn’t represent a distance. The two numbers will be the x-coordinates of two points. Remember that x-coordinate is always the first value of the ordered pair $\left( {{\color{red}{x}},y} \right)$

It’s up to you to designate which one is going to be the first point, therefore forcing the other point to be the second.

It’s doesn’t matter which of the two points you select as the first or second point because the outcome will always be the same as shown in Example #4.

Remember, the Distance Formula is constructed as follows:

• the second x-coordinate subtracted by the first x-coordinate
• the second y-coordinate subtracted by the first y-coordinate

It makes sense for us to let the point $\left( {{\color{red}{x}},-4} \right)$ be the second point while $\left( {3,2} \right)$ be the first point.

By doing so, we will have a situation where the variable $\color{red}x$ is being subtracted by the number $3$. Thus, $x-3$. This is great because the coefficient of the variable $\color{red}{x}$ is positive.

Don’t forget that the two points have the same distance of $10$ units from $(3,2)$.

We substitute the values above into the Distance Formula below then simplify.

Now, square both sides of the equation to get rid of the square root symbol on the right side. Next, subtract both sides by $100$ to make the left side equal to $0$. Finally, factor out the trinomial on the right side then set each factor equal to $0$ to solve for $x$.

Therefore, the two points $\left( {{\color{red}{11}},-4} \right)$ and $\left( {{\color{red}{-5}},-4} \right)$ both have the same distance of $\color{blue}10$ units from the point $\left( {3,2} \right)$.

I will leave it to you to verify that the distance between ${\left( {11, – \,4} \right)}$ and ${\left( {3,2} \right)}$, and between ${\left( { – 5, – \,4} \right)}$ and ${\left( {3,2} \right)}$ are both $10$ units.

You may also be interested in these related math lessons or tutorials:

Distance Formula Practice Problems with Answers

Derivation of the Distance Formula

Distance between Point and Line Formula

Midpoint Formula