Become a math whiz with AI Tutoring, Practice Questions & more.

HotmathMath Homework. Do It Faster, Learn It Better.

# Distance Formula

You already know that the distance d between two points in a plane with Cartesian coordinates A $\left({x}_{1},{y}_{1}\right)$ and B $\left({x}_{2},{y}_{2}\right)$ is given by the following formula:

$d=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$

The distance formula is actually just the Pythagorean theorem in disguise. The distance between two points is measured as the length of the interval that joins two points. If the two points lie on the same vertical or horizontal line, the distance formula is simplified and is calculated by subtracting the coordinates.

To calculate the distance d between point A $\left({x}_{1},{y}_{1}\right)$ and B $\left({x}_{2},{y}_{2}\right)$ , first, draw a right triangle that has the segment AB as its hypotenuse.

If the lengths of the sides are A and B, then by the Pythagorean theorem,

${\left({\mathrm{AB}}_{}\right)}^{2}={\left({\mathrm{AC}}_{}\right)}^{2}+{\left({\mathrm{BC}}_{}\right)}^{2}$

Solving for the distance AB, we have

$d=\sqrt{{\left({\mathrm{AC}}_{}\right)}^{2}+{\left({\mathrm{BC}}_{}\right)}^{2}}$

Since AC is a horizontal distance, it is just the absolute difference between the x coordinates $|\left({x}_{2}-{x}_{1}\right)|$ . Similarly, BC is the vertical distance $|\left({y}_{2}-{y}_{1}\right)|$ .

Since we're squaring these distances anyway, and squares are always non-negative, we don't need to worry about those absolute value signs. So

$d=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$

Example 1

Find the distance between points A and B in the above figure.

In the above figure, we have

$A\left({x}_{1},{y}_{1}\right)=\left(-1,0\right),B\left({x}_{2},{y}_{2}\right)=\left(2,7\right)$

So

$d=\sqrt{{\left(2-\left(-1\right)\right)}^{2}+{\left(7-0\right)}^{2}}$

$d=\sqrt{{3}^{2}+{7}^{2}}$

$=\sqrt{9+49}$

$=\sqrt{58}$

Or approximately 7.6 square units

Example 2

Find the difference between P $\left(3,-4\right)$ and Q $\left(-5,-1\right)$

Coordinates of P $\left(3,-4\right)$ are $\left({x}_{1},{y}_{1}\right)$

Coordinates of Q $\left(-5,-1\right)$ are $\left({x}_{2},{y}_{2}\right)$

Applying the distance formula

$d=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$

$=\sqrt{{\left(-5-3\right)}^{2}+{\left(-1-\left(-4\right)\right)}^{2}}$

$=\sqrt{64+9}$

$=\sqrt{73}$

or approximately 8.54 square units

## Practice using the distance formula

a. Find the difference between P $\left(-4,0\right)$ and Q $\left(0,3\right)$

Coordinates of P $\left(-4,0\right)$ are $\left({x}_{1},{y}_{1}\right)$

Coordinates of Q $\left(0,3\right)$ are $\left({x}_{2},{y}_{2}\right)$

Applying the distance formula

$d=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$

$=\sqrt{{\left(0-\left(-4\right)\right)}^{2}+{\left(3-0\right)}^{2}}$

$=\sqrt{{\left(-4\right)}^{2}+{3}^{2}}$

$=\sqrt{16+9}$

$=\sqrt{25}$

$=5$

Therefore, according to the above calculations, the distance between points P and Q is 5 units.

b. Find the distance between P $\left(1,7\right)$ and Q $\left(3,2\right)$

Coordinates of P $\left(1,7\right)$ are $\left({x}_{1},{y}_{1}\right)$

Coordinates of Q $\left(3,2\right)$ are $\left({x}_{2},{y}_{2}\right)$

Applying the distance formula

$d=\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}$

$=\sqrt{{\left(3-1\right)}^{2}+{\left(2-7\right)}^{2}}$

$=\sqrt{{\left(2\right)}^{2}+{\left(-5\right)}^{2}}$

$=\sqrt{4+10}$

$=\sqrt{14}$

approximately equal to 3.74

Therefore, according to the above calculations, the distance between points P and Q is approximately 3.74 units.

## Get help learning about the distance formula

Using the distance formula can be confusing, whether your student is learning it by graphing or by using the formula without the benefit of a graph. If your student is having a hard time grasping the distance formula, it may be time to have them get together with a private tutor in a 1-on-1 setting where they can focus without distractions. Their tutor can move at your student's pace, going step by step through the process of solving the distance formula, until your student has a thorough understanding of how to use it. To learn more about how tutoring can benefit your student, contact the Educational Directors at Varsity Tutors today.

;
Download our free learning tools apps and test prep books