# 1. Distance Formula

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

### See also:

### Need Graph Paper?

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

`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:

### The Cartesian Plane

The cartesian plane was named after Rene Descartes.

See more about Descartes in Functions and Graphs.

A (x_{1}, y_{1})B (x_{2}, y_{1})C (x_{2}, y_{2})distance =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 JSXGraph (it's not a fixed image).

**Drag** either point A or point B to investigate how the distance formula works.

You can move the graph up-down, left-right if you hold down the "Shift" key and then drag the graph.

Sometimes the explanation boxes overlap. It can't be helped!

If you get lost, you can always refresh the page.

### Example 1

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

### Example 2

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

### Example 3

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

### Example 4

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

### Search IntMath, blog and Forum

### Online Algebra Solver

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

Go to: Online algebra solver

### Math Lessons on DVD

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!