Distance in the Coordinate Plane
“The coordinate distance formula is just the Pythagorean theorem.”
The formula
d = √((x₂ − x₁)² + (y₂ − y₁)²)How to read it: the distance between two points is the square root of the horizontal gap squared plus the vertical gap squared
- x₂ − x₁
- — the horizontal (x) difference between the two points
- y₂ − y₁
- — the vertical (y) difference between the two points
- d
- — the length of the segment joining the two points (the straight-line distance)
The hook
The distance between two points on a grid is really just the Pythagorean theorem, copied straight over.
In plain words
Find the horizontal gap and the vertical gap between the two points and they form a right triangle; the segment joining the points is its hypotenuse. So the distance is √(horizontal² + vertical²).
The intuition
Draw a staircase between the two points — across by (x₂−x₁), up by (y₂−y₁). Those two legs meet at a right angle, and the 'straight' distance we want is their hypotenuse. The distance formula is Pythagoras in disguise.
How it's built
① Horizontal difference x₂−x₁, ② vertical difference y₂−y₁. ③ Square each and add for the hypotenuse squared, ④ take the square root for the distance. Squaring erases the sign, so it doesn't matter which point you subtract first.
Example
Distance between (0, 0) and (3, 4): horizontal gap 3, vertical gap 4 → √(3² + 4²) = √25 = 5. It's the 3-4-5 right triangle again.
Common mistake
Forgetting to subtract before squaring, or mixing x with y instead of x-with-x and y-with-y, breaks it. Also, since squaring removes the sign, subtracting as (x₁−x₂) gives the same result.
Where it's used
Straight-line distance between two spots in a map app, the gap between game characters, measuring how 'close' two points are in data analysis — anywhere there are coordinates.
Where it came from
When Descartes moved shapes onto coordinates (analytic geometry), distances once measured with ruler and compass became something you could compute.
Prerequisites
Quick check
What is the distance between the points (0, 0) and (6, 8)?
- 10✓
- 14
- 48
- 100
Practice
What is the distance between the points (1, 1) and (4, 5)?
Answer: 5
- horizontal gap: 4 − 1 = 3, vertical gap: 5 − 1 = 4
- d = √(3² + 4²) = √(9 + 16) = √25
- = 5
Takeaway: Get the horizontal and vertical gaps first, then it's just Pythagoras.
What is the distance between the points (2, 3) and (2, 7)?
Answer: 4
- horizontal gap: 2 − 2 = 0, vertical gap: 7 − 3 = 4
- d = √(0² + 4²) = √16 = 4
Takeaway: Same x means the points differ only vertically — just the y gap.
Find the distance between (0, 0) and (2, 2) as an approximate value.
Answer: 2.83
- horizontal gap 2, vertical gap 2
- d = √(2² + 2²) = √8 = 2√2
- 2√2 ≈ 2.83
Takeaway: A distance that doesn't come out clean is irrational — answer with an approximation.