# 1. Distance Formula

### See also:

### The Cartesian Plane

The cartesian plane was named after Rene Descartes.

See more about Descartes in Functions and Graphs.

We have a right-angled triangle with hypotenuse length *c*, as shown:

Recall Pythagoras' Theorem, which tells us the length of the longest side (the hypotenuse) of a right triangle:

`c=sqrt(a^2+b^2)`

We use this to find the distance between any two points (*x*_{1}, *y*_{1}) and (*x*_{2}, *y*_{2}) on the cartesian (*x*-*y*) plane:

_{1}, y

_{1})

_{2}, y

_{1})

_{2}, y

_{2})

*d*

The point *B* (*x*_{2}, *y*_{1}) is at the right angle. We can see that:

- The distance between the points
*A*(*x*_{1},*y*_{1}) and*B*(*x*_{2},*y*_{1}) is simply*x*_{2}−*x*_{1}and - The distance between the points
*C*(*x*_{2},*y*_{2}) and*B*(*x*_{2},*y*_{1}) is simply*y*_{2}−*y*_{1}.

_{1}, y

_{1})

_{2}, y

_{1})

_{2}, y

_{2})

_{2}− x

_{1}

_{2}− y

_{1}

*d*

Distance from (*x*_{1}, *y*_{1}) to (*x*_{2}, *y*_{2}).

Using Pythagoras' Theorem we can develop a formula for the distance *d*.

## Distance Formula

The distance between (*x*_{1}, *y*_{1}) and (*x*_{2}, *y*_{2}) is given by:

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2`

**Note:** Don't worry about which point you choose for (*x*_{1}, *y*_{1}) (it can be the first or second point given), because the answer works out the same.

## Interactive Graph - Distance Formula

You can explore the concept of distance formula in the following interactive graph (it's not a fixed image).

**Drag** either point A (*x*_{1}, *y*_{1}) or point C (*x*_{2}, *y*_{2}) to investigate how the distance formula works.

Length AB = *x*_{2} − *x*_{1}

Length BC = *y*_{2} − *y*_{1}

Length

Copyright © www.intmath.com

### Example 1

### Need Graph Paper?

Find the distance between the points (3, −4) and (5, 7).

Answer

Here, *x*_{1} = 3 and *y*_{1} = −4; *x*_{2} = 5 and *y*_{2} = 7

So the distance is given by:

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`

`=sqrt((5-3)^2+(7-(-4))^2)`

`=sqrt(4+121)`

`=11.18`

### Example 2

Find the distance between the points (3, −1) and (−2, 5).

Answer

This time, *x*_{1} = 3 and *y*_{1} =
−1; *x*_{2} = −2 and *y*_{2} = 5

So the distance is given by:

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`

`=sqrt((-2-3)^2+(5-(-1))^2)`

`=sqrt(25+36)`

`=sqrt61`

`=7.8102`

Easy to understand math videos:

MathTutorDVD.com

### Example 3

What is the distance between (−1, 3) and (−8, −4)?

Answer

In this example, *x*_{1} = −1 and *y*_{1} = 3; *x*_{2} = −8 and *y*_{2} = −4

So the distance is given by:

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`

`=sqrt((-8-(-1))^2+(-4-3)^2)`

`=sqrt(49+49)`

`=sqrt98`

`=9.899`

### Example 4

Find *k* if the distance between (*k*,0) and (0, 2*k*) is 10 units.

Answer

This is the situation:

Applying the distance formula, we have:

`d=sqrt((x_2-x_1)^2+(y_2-y_1)^2)`

`=sqrt((2k-0)^2+(0-k)^2)`

`=sqrt(4k^2+k^2)`

`=sqrt(5k^2)`

Now `sqrt(5k^2)=10` so `5k^2=100`, giving:

k^{2 }= 20

so

`k=+-sqrt(20)~~+-4.472`

We obtained 2 solutions, so there are 2 possible outcomes, as follows:

Please support IntMath!

### Search IntMath, blog and Forum

### Online Math Solver

This math solver can solve a wide range of math problems.

Go to: Online algebra solver

### Math Lessons on DVD

Math videos by MathTutorDVD.com

Easy to understand math lessons on DVD. See samples before you commit.

More info: Math videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!