Krista King Math | Online math help

View Original

Finding the distance between two points

How to build the distance formula from the Pythagorean Theorem

In this lesson you’ll learn how to use the distance formula to calculate the distance between two points.

Let’s begin by looking at two points on a graph. The distance formula will calculate the length of the straight line between the two points.

You can draw a right triangle that has the line between these two points as its hypotenuse.

We can find the lengths of the sides,

and use the Pythagorean theorem, ???a^2+b^2=c^2???, to find the length between the original two points.

???4^2+4^2=c^2???

???32=c^2???

???c=\sqrt{32}???

???c=\sqrt{16\cdot 2}???

???c=\sqrt{16}\cdot\sqrt{2}???

???c=4\sqrt2???

So what did we do to get the length between the two points? If we just rearrange what we did with the Pythagorean theorem, we get

???c=\sqrt{(5-1)^2+(-1-3)^2}???

or in other words,

???c=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}???

And that’s the distance formula! Only the distance formula uses ???d??? instead of ???c???. It says that the distance between two points ???(x_1,y_1)??? and ???(x_2,y_2)??? is

???d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}???

How to use the Pythagorean Theorem to calculate the distance between two points in coordinate space


Take the course

Want to learn more about Algebra 2? I have a step-by-step course for that. :)


Using the distance formula to find the distance between two points

Example

What is the distance between the two points?

???(5,7)???

???(-3,5)???

We’ll plug the given points ???(x_1,y_1)=(5,7)??? and ???(x_2,y_2)=(-3,5)??? into the distance formula.

???d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}???

???d=\sqrt{(-3-5)^2+(5-7)^2}???

???d=\sqrt{(-8)^2+(-2)^2}???

???d=\sqrt{64+4}???

???d=\sqrt{68}???

???d=\sqrt{4 \cdot 17}???

???d=\sqrt{4}\cdot \sqrt{17}???

???d=2\sqrt{17}???


The distance formula works with irrational numbers as well.


Example

Find the distance between the points.

???(3,\sqrt{2})???

???(2,-\sqrt{2})???

We’ll plug the given points ???(x_1,y_1)=(3,\sqrt{2})??? and ???(x_2,y_2)=(2,-\sqrt{2})??? into the distance formula.

???d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}???

???d=\sqrt{(2-3)^2+\left(\sqrt{2}-(-\sqrt{2})\right)^2}???

???d=\sqrt{(2-3)^2+(\sqrt{2}+\sqrt{2})^2}???

???d=\sqrt{(-1)^2+(2\sqrt{2})^2}???

???d=\sqrt{1+2^2 \cdot (\sqrt{2})^2}???

???d=\sqrt{1+4 \cdot 2}???

???d=\sqrt{1+8}???

???d=\sqrt{9}???

???d=3???


Get access to the complete Algebra 2 course