THE DISTANCE FORMULA

the Distance Formula
The distance between points $\,(x_1,y_1)\,$ and $\,(x_2,y_2)\,$ is given by the Distance Formula: $$\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$$

Here, $\,x_1\,$ (read as ‘$\,x\,$ sub $\,1\,$’) denotes the $\,x$-value of the first point,
and $\,y_1\,$ (read as ‘$\,y\,$ sub $\,1\,$’) denotes the $\,y$-value of the first point.
Similarly, $\,x_2\,$ and $\,y_2\,$ denote the $\,x$-value and $\,y$-value of the second point.

This formula involves differences (subtraction problems) that are squared.
Notice that $\,(a-b)^2\,$ is equal to $\,(b-a)^2\,$.
Why?
Firstly, $\,a-b\,$ and $\,b-a\,$ are opposites, since $\,a - b = (-1)(b - a)\,$.
Secondly, when you square a number and its opposite, you get the same result.

Alternately, you could FOIL both out and observe that they're the same:

$(a-b)^2 = (a-b)(a-b) = a^2 - ab - ab + b^2 = a^2 - 2ab + b^2$
$(b-a)^2 = (b-a)(b-a) = b^2 - ab - ab + a^2 = a^2 - 2ab + b^2$

Thus, in the Distance Formula, you can do the subtractions in any order you want, and it won't affect your result.
Also, because of the Commutative Property of Addition, you can work with the $\,x\,$ or $\,y\,$ values first—your choice.
That is, $$\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2} = \sqrt{(y_2-y_1)^2 + (x_2-x_1)^2}$$

In words, to find the distance between two points, do the following:

• Subtract the $\,x$-values of the two points (in any order), and square this result.
• Subtract the $\,y$-values of the two points (in any order), and square this result.
• Add together the previous two quantities.
• Take the square root of the result.

The Distance Formula follows easily from the Pythagorean Theorem, as suggested by the picture below:

By the Pythagorean Theorem, $${\text{hypotenuse}}^2 = (x_2-x_1)^2 + (y_2-y_1)^2$$ Solve for the hypotenuse!

EXAMPLES:
Question: Find the distance between $\,(1,-3)\,$ and $\,(-2,5)\,$.
Solution:
$\sqrt{(-2-1)^2 + (5-(-3))^2}$
$= \sqrt{(-3)^2 + 8^2}$
$= \sqrt{9 + 64}$
$= \sqrt{73}$
Question: Does the following formula represent the distance between points $\,(a,b)\,$ and $\,(c,d)\,$?
Answer YES or NO.
$\sqrt{(a-c)^2 + (d-b)^2}$
Solution: YES.
The order that you subtract the numbers does not affect the result.
Question: Does the following formula represent the distance between points $\,(a,b)\,$ and $\,(c,d)\,$?
Answer YES or NO.
$\sqrt{(a-b)^2 + (c-d)^2}$
Solution: NO.
You must subtract the $\,x$-values and $\,y$-values of the two points.

NOTE:
When the number inside a square root has a factor that is a perfect square, then it can be renamed.
For example, $\,4\,$ goes into $\,8\,$ evenly, and $\,4\,$ is a perfect square.
Thus, we can rename as follows: $$\sqrt{8} = \sqrt{4\cdot 2} = \sqrt{4}\sqrt{2} = 2\sqrt{2}$$ In the solutions to this web exercise, both names ($\,\sqrt{8}\,$ and $\,2\sqrt{2}\,$) are given.

Master the ideas from this section
by practicing the exercise at the bottom of this page.

When you're done practicing, move on to:
the Midpoint Formula

CONCEPT QUESTIONS EXERCISE:
On this exercise, you will not key in your answer.
However, you can check to see if your answer is correct.
PROBLEM TYPES:
 1 2 3 4 5
AVAILABLE MASTERED IN PROGRESS