The Distance Formula

Learn how to calculate the distance between two points on a coordinate plane using the distance formula.

Intermediate25 minLesson

Definition

The distance formula calculates the distance between two points on a coordinate plane.
For two points and , the distance is:
This formula comes from the Pythagorean theorem. When you draw a right triangle between two points:
  • The horizontal distance is
  • The vertical distance is
  • The actual distance is the hypotenuse

Try it now

What is the distance formula used to find?

Worked Examples

Find the distance between and .

1

Identify coordinates

and Points identified

2

Find horizontal distance

Horizontal:

3

Find vertical distance

Vertical:

4

Apply the formula

Common Mistakes

Forgetting to square the differences before adding

Why it's wrong: Students sometimes write instead of

Correct: Always square each difference:

Taking the square root of each term separately

Why it's wrong: . The square root applies to the entire sum.

Correct: Add the squared terms first, then take one square root of the total.

Getting confused with negative coordinates

Why it's wrong: Subtracting a negative number means adding:

Correct: Be careful with signs. Squaring will always give a positive result anyway.

Interactive Visual

Linear Function Explorer

y = x
Slope (m)1
Y-Intercept (b)0
b
run
rise

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

16 problems
Problem 1 of 16
Easy

What is the distance formula used to find?

Why It Matters

The distance formula has countless real-world applications:
  • Navigation: GPS systems calculate distances between locations using coordinates
  • Gaming: Video games use this formula to detect collisions and calculate movement
  • Architecture: Designers measure distances on blueprints using coordinate systems
  • Sports: Analysts calculate how far athletes run or throw using positional data
Mastering the distance formula prepares you for more advanced topics like circles, parabolas, and 3D geometry.

Real World Applications

GPS Navigation

GPS devices use coordinate systems to calculate distances between locations. While Earth's coordinates are more complex (latitude/longitude on a sphere), the fundamental principle is the same.

Example:

A GPS calculates you are at coordinates km and your destination is at km. The straight-line distance is km.

1Try It Yourself

You are at map coordinates km. A restaurant is at km.

How far is the restaurant in a straight line?

Step 1: Write the mathematical expression

Use the distance formula:

Video Game Design

Game developers use the distance formula constantly to calculate collision detection, enemy AI range, and movement physics.

Example:

In a game, your character is at pixels and an enemy is at . The distance is pixels.

2Try It Yourself

A player at has a weapon with range pixels. An enemy appears at .

Can the player hit the enemy?

Step 1: Write the mathematical expression

Calculate the distance and compare to 13:

Key Takeaways

  • 1The distance formula is
  • 2It comes from the Pythagorean theorem applied to a right triangle
  • 3Always square the differences first, then add, then take the square root
  • 4Negative coordinates work the same way since squaring eliminates negatives
  • 5The result may be a whole number or an irrational number (square root)

Frequently Asked Questions

No! Since we square the differences, the order does not matter. and give the same result.
No! Since we square the differences, the order does not matter. and give the same result.
Squaring converts negative differences to positive values and sets up the Pythagorean theorem calculation. The square root then gives us the actual distance (the hypotenuse length).
That is perfectly fine! Exact answers like are often preferred. You can also give a decimal approximation if needed.

Glossary

Distance formula
The formula used to find the distance between two points
Coordinate plane
A two-dimensional plane with horizontal () and vertical () axes
Pythagorean theorem
For a right triangle with legs and and hypotenuse :
Hypotenuse
The longest side of a right triangle, opposite the right angle

More in This Topic