What if you were given the coordinates of two points? How could you find how far apart these two points are? After completing this Concept, you'll be able to find the distance between two points in the coordinate plane using the Distance Formula.

### Watch This

CK-12 Foundation: Chapter3DistanceFormulaintheCoordinatePlaneA

James Sousa: The Distance Formula

### Guidance

The shortest distance between two points is a straight line. This distance can be calculated by using the distance formula. The distance between two points \begin{align*}(x_1, \ y_1)\end{align*}

Just by looking at a few line segments from \begin{align*}A\end{align*} to line \begin{align*}l\end{align*}, we can tell that the shortest distance between a point and a line is the ** perpendicular line** between them. Therefore, \begin{align*}AD\end{align*} is the shortest distance between \begin{align*}A\end{align*} and line \begin{align*}l\end{align*}.

#### Example A

Find the distance between (4, -2) and (-10, 3).

Plug in (4, -2) for \begin{align*}(x_1, \ y_1)\end{align*} and (-10, 3) for \begin{align*}(x_2, \ y_2)\end{align*} and simplify.

\begin{align*}d& = \sqrt{(-10-4)^2+(3+2)^2}\\ & = \sqrt{(-14)^2+(5^2)} \qquad \qquad \quad Distances \ are \ always \ positive!\\ & = \sqrt{196+25}\\ & = \sqrt{221} \approx 14.87 \ units\end{align*}

#### Example B

The distance between two points is 4 units. One point is (1, -6). What is the second point? You may assume that the second point is made up of integers.

We will still use the distance formula for this problem, however, we know \begin{align*}d\end{align*} and need to solve for \begin{align*}(x_2, \ y_2)\end{align*}.

\begin{align*}4 & = \sqrt{\left (1-x_2 \right )^2+(-6-y_2)^2}\\ 16 & = (1-x_2)^2 + (-6-y_2)^2\end{align*}

At this point, we need to figure out two square numbers that add up to 16. The only two square numbers that add up to 16 are \begin{align*}16 + 0\end{align*}.

\begin{align*}&16 = \underbrace{ (1-x_2)^2 }_{4^2} + \underbrace{ (-6-y_2)^2 }_{0^2} && \text{or} && 16 = \underbrace{ (1-x_2)^2 }_{0^2} + \underbrace{ (-6-y_2)^2 }_{4^2}\\ &1-x_2 = \pm 4 \qquad \qquad \quad -6-y_2=0 &&&& 1-x_2=0 \qquad \qquad \quad -6-y_2=\pm 4\\ & \ \ -x_2 = -5 \ \text{or} \ 3 \quad \ \text{and} \quad \ \ -y_2=6 && \text{or} && \ \ -x_2=-1 \quad \ \text{and} \ \qquad \qquad \-y_2=10 \ \text{or} \ 2\\ &\qquad x_2 = 5 \ \text{or} \ -3 \qquad \qquad \quad \ y_2=-6 &&&& \qquad x_2=1 \qquad \qquad \qquad \qquad y_2=-10 \ \text{or} \ -2\end{align*}

Therefore, the second point could have 4 possibilities: (5, -6), (-3, -6), (1, -10), and (1, -2).

#### Example C

Determine the shortest distance between the point (1, 5) and the line \begin{align*}y=\frac{1}{3}x-2\end{align*}.

First, graph the line and point. Second determine the equation of the perpendicular line. The opposite sign and reciprocal of \begin{align*}\frac{1}{3}\end{align*} is -3, so that is the slope. We know the line must go through the given point, (1, 5), so use that to find the \begin{align*}y-\end{align*}intercept.

\begin{align*}y&=-3x+b\\ 5&=-3(1)+b \qquad \quad \text{The equation of the line is} \ y=-3x+8.\\ 8&=b\end{align*}

Next, we need to find the point of intersection of these two lines. By graphing them on the same axes, we can see that the point of intersection is (3, -1), the green point.

Finally, plug (1, 5) and (3,-1) into the distance formula to find the shortest distance.

\begin{align*}d& =\sqrt{(3-1)^2+(-1-5)^2}\\ &=\sqrt{(2)^2+(-6)^2}\\ & = \sqrt{2+36}\\ & = \sqrt{38} \approx 6.16 \ units\end{align*}

Watch this video for help with the Examples above.

CK-12 Foundation: Chapter3DistanceFormulaintheCoordinatePlaneB

### Vocabulary

The ** distance formula** tells us that the distance between two points \begin{align*}(x_1, y_1)\end{align*} and \begin{align*}(x_2, y_2)\end{align*} can be defined as \begin{align*}d= \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}\end{align*}.

### Guided Practice

1. Find the distance between (-2, -3) and (3, 9).

2. Find the distance between (12, 26) and (8, 7).

3. Find the shortest distance between (2, -5) and \begin{align*}y=-\frac{1}{2}x+1\end{align*}

**Answers:**

1. Use the distance formula, plug in the points, and simplify.

\begin{align*}d & = \sqrt{(3-(-2))^2 + (9-(-3))^2}\\ & = \sqrt{(5)^2 + (12)^2}\\ & = \sqrt{25+144}\\ & = \sqrt{169} = 13 \ units\end{align*}

2. Use the distance formula, plug in the points, and simplify.

\begin{align*}d & = \sqrt{(8-12)^2 + (7-26)^2}\\ & = \sqrt{(-4)^2 + (-19)^2}\\ & = \sqrt{16+361}\\ & = \sqrt{377} \approx 19.42 \ units\end{align*}

3. Find the slope of the perpendicular line. The opposite reciprocal of \begin{align*}-\frac{1}{2}\end{align*} is \begin{align*}2\end{align*}. We know the perpendicular line has a slope of \begin{align*}2\end{align*} and contains the point (2, -5), so \begin{align*}-5=2(2)+b\end{align*} and therefore \begin{align*}b=-9\end{align*}. Next, we need to figure out where the lines \begin{align*}y=-\frac{1}{2}x+1\end{align*} and \begin{align*}y=2x-9\end{align*} intersect:

\begin{align*}2x-9&=-\frac{1}{2}x+1\\ 2.5x&=10\\ x&=4, \text{and therefore} \ y=-1\end{align*}

So the lines intersect at the point (4, -1). Now, use the distance formula to find the distance between (4, -1) and (2, -5): \begin{align*}\sqrt{(2-4)^2+(-5-(-1))^2}=\sqrt{4+36}=\sqrt{40}\approx 6.32 \ units \end{align*}.

### Explore More

Find the distance between each pair of points. Round your answer to the nearest hundredth.

- (4, 15) and (-2, -1)
- (-6, 1) and (9, -11)
- (0, 12) and (-3, 8)
- (-8, 19) and (3, 5)
- (3, -25) and (-10, -7)
- (-1, 2) and (8, -9)
- (5, -2) and (1, 3)
- (-30, 6) and (-23, 0)

Determine the shortest distance between the given line and point. Round your answers to the nearest hundredth.

- \begin{align*}y=\frac{1}{3}x+4; \ (5, \ -1)\end{align*}
- \begin{align*}y = 2x-4; \ (-7, \ -3)\end{align*}
- \begin{align*}y=-4x+1; \ (4, \ 2)\end{align*}
- \begin{align*}y=-\frac{2}{3}x-8; \ (7, \ 9)\end{align*}
- The distance between two points is 5 units. One point is (2, 2). How many possibilities are there for the second point? You may assume that the second point is made up of integers.
- What if in the previous question the second point was not necessarily made up of integers? What shape would be created by plotting all of the possibilities for the second point?
- Find one possibility for the equation of a line that is exactly 6 units away from the point (-3,2).