T TestsWorld
Lesson 4 of 11 Distance formula ⏱ 4 min

The distance formula

🤔
Think first
Can one formula find the distance between any two points on a map?
🎯 In this lesson you'll learn
  • ✓Derive the distance formula
  • ✓Use it quickly

For any P(x₁, y₁) and Q(x₂, y₂), draw PR and QS down to the x-axis and PT across to QS. In right triangle PTQ:

  • PT = RS = x₂ − x₁
  • QT = QS − TS = y₂ − y₁

By Pythagoras:

📌

PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]

This is the distance formula. A distance can't be negative, so we take only the positive square root.

Remarks:

  1. The distance of P(x, y) from the origin is OP = √(x² + y²).
  2. The order doesn't matter: (x₁ − x₂)² = (x₂ − x₁)², so you can subtract either way round.
✏️

Example: (2, 3) and (4, 1): √(2² + (−2)²) = √8 = 2√2. And (a, b) to (−a, −b): √(4a² + 4b²) = 2√(a² + b²).

P(x₁, y₁)Q(x₂, y₂)TRSOx₂ − x₁y₂ − y₁PQ² = PT² + QT²PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]

Tap the diagram to enlarge it

Any two points make a right triangle whose legs are the coordinate differences.
📌 Remember these
  1. Square the gaps
  2. Add, then square root
  3. Origin: √(x² + y²)
✅ Quick check
← →