Distance between two points, and from the origin
A delivery app works out straight-line distances between shops and homes from their map coordinates, using exactly this formula before it plans a route.
The distance between (x₁, y₁) and (x₂, y₂) is √((x₂ − x₁)² + (y₂ − y₁)²). From the origin it is √(x² + y²).
Where the formula comes from
Join A(x₁, y₁) and B(x₂, y₂). Draw a line through A parallel to the x-axis and a line through B parallel to the y-axis. They meet at C(x₂, y₁). ΔACB is right-angled at C, with AC = x₂ − x₁ and CB = y₂ − y₁. By Pythagoras theorem, AB² = AC² + CB². So AB = √((x₂ − x₁)² + (y₂ − y₁)²). The order of subtraction does not matter, because the differences are squared.
Example 1: distance between two points
Find the distance between A(−2, 3) and B(4, −5).
- Formula: AB = √((x₂ − x₁)² + (y₂ − y₁)²).
- x₂ − x₁ = 4 − (−2) = 6.
- y₂ − y₁ = −5 − 3 = −8.
- AB = √(6² + (−8)²) = √(36 + 64) = √100.
AB = 10 units.
Example 2: distance from the origin, and a distance in root form
(a) Find the distance of P(−8, 15) from the origin. (b) Find the distance between (3, −1) and (−2, 4).
- (a) Formula: OP = √(x² + y²).
- OP = √((−8)² + 15²) = √(64 + 225) = √289 = 17.
- (b) Differences: −2 − 3 = −5 and 4 − (−1) = 5.
- Distance = √(25 + 25) = √50 = √(25 × 2) = 5√2.
- 5√2 ≈ 5 × 1.414 = 7.07.
(a) 17 units. (b) 5√2 units, about 7.07 units.
Example 3: finding an unknown coordinate
The distance between P(x, 3) and Q(5, 7) is 5 units. Find x.
- PQ² = (5 − x)² + (7 − 3)² = 25.
- (5 − x)² + 16 = 25, so (5 − x)² = 9.
- 5 − x = 3 or 5 − x = −3.
- x = 2 or x = 8.
x = 2 or x = 8: there are two such points.
Subtract, square, add, root: SSAR.