Distance Formula


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

math expression

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

math expression

We use this to find the distance between any two points (x1, y1) and (x2, y2) 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.

distance formula - hypotenuse

The point B (x2, y1) is at the right angle. We can see that:

math expression

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

Distance Formula

The distance between (x1, y1) and (x2, y2) is given by:

distance formula

Note: Don't worry about which point you choose for (x1, y1) or (x2, y2), 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:

  • Zoom in or out of the graph using your mouse scroll wheel; and
  • 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, 2k) is 10 units.

Didn't find what you are looking for on this page? Try search:

Online Algebra Solver

This algebra solver can solve a wide range of math problems. (Please be patient while it loads.)

Math Lessons on DVD

get MathTutorDVDs

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

More info: Math videos

Ready for a break?

shadow factory

Play a math game.

(Well, not really a math game, but each game was made using math...)

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!

Given name: * required

Family name:

email: * required

See the Interactive Mathematics spam guarantee.

Share IntMath!

This page has

  • 1 tweets

axs