Distance Formula Examples with Answers- Practice Problems
What Is the Distance Formula?
The distance formula finds the length between two points on a coordinate plane. It's derived from the Pythagorean theorem and works every time, no exceptions.
Here's the formula:
d = √[(x₂ - x₁)² + (y₂ - y₁)²]
That's it. Two points go in, distance comes out. The squaring eliminates negative numbers, so you don't have to worry about which point is "first."
How the Distance Formula Works
You're calculating the hypotenuse of a right triangle. The difference in x-values is one leg, the difference in y-values is the other. The distance formula is just the Pythagorean theorem packaged for coordinates.
Steps:
- Subtract the x-coordinates, then square the result
- Subtract the y-coordinates, then square the result
- Add those two squares together
- Take the square root of that sum
Distance Formula Examples with Solutions
Example 1: Basic Points
Find the distance between (3, 4) and (7, 1).
Apply the formula:
d = √[(7 - 3)² + (1 - 4)²]
d = √[(4)² + (-3)²]
d = √[16 + 9]
d = √25 = 5
Answer: 5 units
Example 2: Points with Negative Coordinates
Find the distance between (-2, -5) and (4, 3).
d = √[(4 - (-2))² + (3 - (-5))²]
d = √[(6)² + (8)²]
d = √[36 + 64]
d = √100 = 10
Answer: 10 units
Example 3: Origin to a Point
Find the distance from (0, 0) to (5, 12).
When one point is the origin, the formula simplifies:
d = √[(5 - 0)² + (12 - 0)²]
d = √[25 + 144]
d = √169 = 13
Answer: 13 units
Example 4: Points with Same X-Coordinate
Find the distance between (2, 1) and (2, 7).
When x-coordinates match, you're just measuring vertical distance:
d = √[(2 - 2)² + (7 - 1)²]
d = √[0 + 36]
d = √36 = 6
Answer: 6 units
Practice Problems
Try these on your own before checking the answers.
Problem 1: Find the distance between (1, 2) and (4, 6).
Problem 2: Find the distance between (-3, 4) and (2, -1).
Problem 3: Find the distance between (0, -4) and (3, 0).
Problem 4: Find the distance between (-5, -2) and (-1, -2).
Answers
Problem 1: d = √[(4-1)² + (6-2)²] = √[9 + 16] = √25 = 5
Problem 2: d = √[(2-(-3))² + (-1-4)²] = √[25 + 25] = √50 ≈ 7.07
Problem 3: d = √[(3-0)² + (0-(-4))²] = √[9 + 16] = √25 = 5
Problem 4: d = √[(-1-(-5))² + (-2-(-2))²] = √[16 + 0] = 4
Distance Formula vs. Other Methods
| Method | Best For | Speed |
|---|---|---|
| Distance Formula | Any two points | Fast with practice |
| Counting Grid Squares | Points close together | Slow for far points |
| Pythagorean Theorem | Right triangle problems | Same as formula |
| Graphing Calculator | Verification, decimals | Fastest |
Common Mistakes to Avoid
- Forgetting to square the differences — the squares are non-negotiable
- Taking the square root too early — add the squares first, then root
- Sign errors when subtracting — double-check your negatives
- Rounding too early — keep full precision until the final answer
How to Get Fast at the Distance Formula
Most students waste time rewriting the formula for each problem. Don't.
Step 1: Identify (x₁, y₁) and (x₂, y₂) — label them immediately
Step 2: Calculate x₂ - x₁ and y₂ - y₁ in your head
Step 3: Square both differences
Step 4: Add the squares
Step 5: Take the square root
Practice 10 problems back-to-back and you'll have it memorized. The formula doesn't change, and neither does the process.
When You'll Actually Use This
Geometry class is one thing. But the distance formula shows up in:
- Navigation apps calculating travel distances
- Computer graphics and game development
- Data analysis clustering nearby points
- Physics problems involving displacement
It's not just academic busywork. Programmers use it constantly for collision detection, proximity alerts, and spatial queries.
Quick Reference
Formula: d = √[(x₂ - x₁)² + (y₂ - y₁)²]
Key fact: The result is always positive. Distance has no direction.
Special cases:
- Horizontal line: d = |x₂ - x₁|
- Vertical line: d = |y₂ - y₁|
- Through origin: d = √(x² + y²)