# Distance formula: $d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$

- Lesson: 1a1:45
- Lesson: 1b2:51
- Lesson: 23:04

## Distance between two points

If you recall the Pythagorean Theorem, the distance formula is actually a variation of that theorem.

Letβs look deeper into this with the points on the above graph. We have two points, one at x1, y1 and another one x2, y2. To calculate the distance between them, join the points together and form a right-angled triangle that uses the two points as its corners.

The lengths of the two sides of the right-angled triangle are easy to find with the help of the x- and y- axis. Simply subtract the x-values and the y-values to find the lengths.

Now that we have the lengths of the two sides of the triangle, do you recall how we find its hypotenuse? We use the formula: c^2 = a^2 + b^2

Therefore, if we were to plug in the points of (x1, y1), and (x2, y2), then move the square over to the other side of the equation so that it becomes a square root, weβll get the formula for distance.

## What is the distance formula?

d is used to represent distance in this case. This formula is always true and useful when youβve got two points. As long as you know where they are on a graph, you can plot them, then draw a right-angled triangle to help you find the length of its hypotenuse. This makes use of the Pythagorean Theorem which we learned back when studying geometry. The hypotenuse is the distance youβre looking for between the two points! Now youβve learned how the distance formula works.

Key things to remember when calculating for distance is: 1) Do not mismatch your x and y values. Ensure that youβve matched them up properly in the right order, such that if you use a the x-value in point A, match it up with the x-value in point B when doing subtracting. Then for the second part of the formula, make sure youβre again using the y-value from point A and then subtracting the y-value from point B. 2) Simplify what is inside the parentheses before carrying out squaring. Thatβs the correct order in doing math problems, and holds true in the distance formula. 3) Remember to write down the square root symbol. Itβs a good habit to have and if you leave it till the end, you may forget to put it back in and therefore get the wrong answer.

## Examples for finding distance

Letβs put the formula for distance into use with an example question.

Question: What is the distance between A(4,2) and B(6,8)?

We know that weβll be using both the x-values and the y-values. Simply plug in the numbers into the distance formula. Itβll look something like the following:

In the above, we consider B as point 2, and consistently use point 2βs coordinates before Aβs in the formula. Donβt forget to square the differences between the Xβs and Yβs, and youβll get a number under a square root. Make sure to simplify the answer so that certain numbers can be brought out from the radical symbol.

How about if we were to do horizontal or vertical lines? Would the distance formula work? The short answer is that it will. However, thereβs an easier way to do this. When dealing with horizontal lines, the length of the line is simply the difference between the two pointsβ x-coordinates. In a similar fashion, a vertical lineβs length can be found by subtracting one of the y-coordinates with the other. You can feel free to try this out yourself with coordinates from a vertical or horizontal line, and youβll find that youβll get the same answer by just subtracting the coordinates and using the distance formula.

For a recap on the concept, hereβs a good resource for you to go through. If you wanted to play around with different coordinates and see how the distance formula works, try it out on this interactive chart!

##### Do better in math today

##### Don't just watch, practice makes perfect.

### Distance formula: $d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$

#### Lessons

- 1.Determine the distance between each pair of points.a)$A(4, 2)$ & $B(6 , 8)$b)$A(-2.5, -4)$ & $(-8, 4)$
- 2.Determine the diameter of the circle with centre $(-4,8)$ which passes through $(5,-4)$.

##### Do better in math today

##### Don't just watch, practice makes perfect.

### Distance formula: $d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$

#### Don't just watch, practice makes perfect.

We have over 400 practice questions in Geometry for you to master.

Get Started Now