Illustrated · 1 min

The Distance Formula\textbf{The Distance Formula}

The Distance Formula can be used to find the distance between two points on the coordinate plane.

Let's say you have any two points, (x1,y1)(x_1, y_1) and (x2,y2),(x_2, y_2), and you want to find the distance, d,d, between them. Then just use the following formula:

The Distance Formula: d=sqrt{(x2-x1)^2+(y2-y1)^2}}

Image by Caroline Kulczycky

The Distance Formula is a literal equation with several variables representing the locations of the points.

For example, say you're given two points, (3,7)(3, 7) and (−2,15),(-2, 15), and you're asked to find the distance between them.

Step One: Assign x1,y1,x2,x_1, y_1, x_2, and y2y_2

Let's say that (x1,y1)=(3,7)(x_1,y_1)=(3,7) and (x2,y2)=(−2,15).(x_2,y_2)=(-2,15). Thus, x1=3y1=7x2=−2x2=15\begin{align} x_1&=3\\ y_1&=7\\ x_2&=-2\\ x_2&=15 \end{align}

Step Two: Substitute Into the Distance Formula

Now that we have x1,y1,x2,x_1, y_1, x_2, and y2,y_2, we can substitute these values into the Distance Formula. d=(x2−x1)2+(y2−y1)2=(−2−3)2+(15−7)2=(−5)2+(8)2=25+64=89\begin{align} d&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{(-2-3)^2+(15-7)^2}\\ &=\sqrt{(-5)^2+(8)^2}\\ &=\sqrt{25+64}\\ &=\sqrt{89} \end{align}

So, the distance, d,d, between (3,7)(3, 7) and (−2,15)(-2, 15) is 89\sqrt{89} units.

Stretch your creativity

Contest problems rarely look like the examples you studied. Solving one means finding your own way in. These are real problems from the AMC 8, AMC 10, AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Interactive · 1 question

To find the distance between two points (x1,y1)(x_{1},y_{1}) and (x2,y2)(x_{2},y_{2}) on the coordinate plane, you can use this formula:

(x2−x1)2+(y2−y1)2\sqrt{(x_{2}-x_{1})^2+(y_{2}-y_{1})^2}

For example, the distance between (0,0)(0,0) and (3,4)(3,4) is equal to (3−0)2+(4−0)2\sqrt{(3-0)^2+(4-0)^2}, or 32+42\sqrt{3^2+4^2}, or 55.

What is the distance between (1,2)(1,2) and (5,8)(5,8)?

Choose one answer

Interactive · 2 questions

Finding the Distance Between 22 Points on a Line

Although you might see a few different types of problems asking about the distance between 22 points, but there's only one formula you need:

distance=(x2−x1)2+(y2−y1)2\text{distance}=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}

===

The xx and yy terms in the distance equation are the two coordinate pairs or points on the line, each written in the form (x,y)(x, y).

So, let's put this formula into use!

What is the distance between these two points?

(1,41,4) and (4,0)\left(4,0\right)

Choose one answer

Interactive · 2 questions

The Distance Formula is based on the Pythagorean Theorem. If you know the Pythagorean Theorem, you already know the Distance Formula! Here is how:

Pick any two different points on a grid and draw a line between them. This line will be the hypotenuse of your new right triangle! The length of this line is also the distance between the points.

I will choose these two points, AA and BB, at (2,3)(2, 3) and (5,7)(5, 7):

A segment connecting the points (2,3) and (5,7)

Next, draw the legs of the triangle by drawing a line straight down from the highest point of your line until it is level with the lowest point of your line. Then, draw a line straight across from the lowest point of your line until it intersects with your vertical line. I will do it here in purple, and label the point of intersection of the legs point CC:

Drew a line from point B (5,7) down to point C at (5,3). Then drew a line from point A (2,3) to point C (5,3).

Notice that the xx-coordinate of CC is equal to the xx-coordinate of BB, and the yy-coordinate of CC is equal to the yy-coordinate of AA!

From here, to find the distance between the points AA and BB, we use the Pythagorean formula, c2=a2+b2.c^2=a^2+b^2. (Be careful not to get the variables mixed up! Recall that aa and bb are the lengths of the two legs. In our current example, these lengths will be the lengths of the two purple lines.)

Let aa be the length of the horizontal purple leg. We can see from either counting the grids or finding the difference of the xx-coordinates of CC and AA, 5−25-2, is the length 33.

Let bb be the length of the vertical purple leg. From finding the difference of the yy-coordinates of BB and CC, we can see that the length is 7−3=47-3 = 4.

Now to solve for cc (our green line), we will first find c2c^2 by using the Pythagorean formula. c2=32+42=9+16=25c^2 = 3^2 + 4^2 = 9 + 16 = 25 Take the square root to get c=5c = 5. And that's the distance! We're finished!

Let's go through our steps again, this time with variables, to arrive at the distance formula.

Say point A is at (X1,Y1)(X_1,Y_1), and point B is at (X2,Y2)(X_2, Y_2).

Then the length of the horizontal leg (aa) will be (X2−X1)(X_2-X_1) and the length of the vertical leg (bb) will be (Y2−Y1)(Y_2-Y_1).

Plug these values into the formula to get c2=(X2−X1)2+(Y2−Y1)2c^2 = (X_2-X_1)^2 + (Y_2-Y_1)^2.

Now we want to solve for c, the distance, so we square root the whole thing.
c=(X2−X1)2+(Y2−Y1)2c = \sqrt{\left(X_2-X_1\right)^2+\left(Y_2-Y_1\right)^2} and that's the Distance Formula!

Which of the following equations would equal the distance between point AA at (3,5)(3, 5) and point BB at (4,2)(4, 2)? Choose all options that equal the distance.

Choose all correct answers

Video

(Video) Distance Formula

by yaymath

Here's a video by yaymath explaining the distance formula between two points.

Summary\large{\text{Summary}}

Plus he does it upside down so that's interesting. The distance formula gives you the distance between any two points. The formula is: d=(x2−x1)2+(y2−y1)2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}

Test Yourself: Find the distance between the points (3,6)(3,6) and (7,7)(7,7).

Choose one answer

Video

(Video) Finding the Distance Between Two Points Using the DIstance Formula

by The Math Sorcerer

This video by The Math Sorcerer shows how to find the distance between two points.

Summary\large{\text{Summary}}

To find the distance between (4,1)(4,1) and (2,3)(2,3) we use the distance formula. d=(x1−x2)2+(y1−y2)2d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}

Now, we just plug in the points and solve. d=(x1−x2)2+(y1−y2)2=(4−2)2+(1−3)2=(2)2+(−2)2=4+4=8=22\begin{align} d&=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}\\ &=\sqrt{(4-2)^2+(1-3)^2}\\ &=\sqrt{(2)^2+(-2)^2}\\ &=\sqrt{4+4}\\ &=\sqrt{8}\\ &=2\sqrt{2} \end{align}

Video

(Video) Distance Formula

by GVSUmath

This video by GVSUmath explains the distance formula for two points.

We know the distance formula is d=(x2−x1)2+(y2−y1)2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}

Now, let's plug in the points and solve! d=(x2−x1)2+(y2−y1)2=(8−5)2+(5−1)2=(3)2+(4)2=9+16=25=5\begin{align} d&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{(8-5)^2+(5-1)^2}\\ &=\sqrt{(3)^2+(4)^2}\\ &=\sqrt{9+16}\\ &=\sqrt{25}\\ &=5 \end{align}

Now, we look at some points on a coordinate plane. We are given the points (0,0)(0,0) and (4,3)(4,3). Plug those into the equation and check your solution after clicking the continue button.

d=(x2−x1)2+(y2−y1)2=(4−0)2+(3−0)2=(4)2+(3)2=16+9=25=5\begin{align} d&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{(4-0)^2+(3-0)^2}\\ &=\sqrt{(4)^2+(3)^2}\\ &=\sqrt{16+9}\\ &=\sqrt{25}\\ &=\color{red}{5} \end{align}

Video · + 1 min read

(Video) Distance and Midpoint

by mathman1024

In this video by mathman1024 he goes over the distance formula and the midpoint formula for two points.

Summary\large{\text{Summary}}

The distance formula is derived from the Pythagorean Theorem.

A right triangle on a coordinate grid with legs a and b and hypotenuse c.  The endpoints of the triangle are (x1, y1) and (x2, y2).

As you can see the distance between the points is the hypotenuse. So we can rewrite the Pythagorean Theorem to solve for cc. c=a2+b2c=\sqrt{a^2+b^2} You might also notice that aa and bb are the difference between the xx and yy coordinates. So the distance dd between two points is: d=(x2−x1)2+(y2−y1)2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2} Note: It doesn't matter which point you make (x1,y1)(x_1,y_1) and which you make (x2,y2)(x_2,y_2) as long as you're consistent when using the formula.

The second formula is the midpoint formula. This is super easy to find. The midpoint is a set of coordinates though so it'll be in the form (x,y)(x,y). To find it you just take the average of the xx-coordinates and the average of the yy-coordinates. Midpoint=(x1+x22,y1+y22)\text{Midpoint}=\bigg(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\bigg)

He goes over a problem to show how these are used. The problem is: Find the distance and midpoint between the points P(4,−7)P(4,-7) and Q(−2,1)Q(-2,1). d=(x2−x1)2+(y2−y1)2=(4−(−2))2+((−7)−1)2=(6)2+(−8)2=36+64=100=10\begin{align} d&=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\\ &=\sqrt{(4-(-2))^2+((-7)-1)^2}\\ &=\sqrt{(6)^2+(-8)^2}\\ &=\sqrt{36+64}\\ &=\sqrt{100}\\ &=10 \end{align} So our distance between the points P(4,−7)P(4,-7) and Q(−2,1)Q(-2,1) is 1010 units. Now let's find the midpoint. Midpoint=(x1+x22,y1+y22)=((4)+(−2)2,(−7)+(1)2)=(22,−62)=(1,−3)\begin{align} \text{Midpoint}&=\bigg(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\bigg)\\ &=\bigg(\frac{(4)+(-2)}{2},\frac{(-7)+(1)}{2}\bigg)\\ &=\bigg(\frac{2}{2},\frac{-6}{2}\bigg)\\ &=(1,-3) \end{align}

A coordinate grid with the points (-2, 1), (1, -3), and (4, -7).  (1, -3) is the midpoint of (-2, 1) and (4, -7).

As you can see this is in the middle of these two points!

Test Yourself: Find the distance between the points (−5,1)(-5,1) and (−10,13)(-10,13).

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems