- Practice
- About 16 min
- 5 practice questions
The distance between two points
Find the distance between two points on an axis, on a line parallel to an axis, and anywhere in the plane, using the distance formula built from Pythagoras' theorem.
If something looks wrong, please tell us.
By the end of this lesson you can
- Find distances between points on the axes or on lines parallel to the axes.
- Derive the distance formula from Pythagoras' theorem.
- Use d = √((x₂ − x₁)² + (y₂ − y₁)²) and the distance from the origin √(x² + y²).
Once points have coordinates, lengths can be calculated instead of measured with a ruler. That is the first big pay-off of coordinate geometry. We start with the easy cases, where the points lie on a horizontal or vertical line, and then combine them with Pythagoras' theorem to get one formula that works everywhere.
Points on a horizontal or vertical line
- On the x-axis, the distance between (x₁, 0) and (x₂, 0) is |x₂ − x₁|.
- On the y-axis, the distance between (0, y₁) and (0, y₂) is |y₂ − y₁|.
- On a horizontal line (same ordinate y), the distance between (x₁, y) and (x₂, y) is |x₂ − x₁|.
- On a vertical line (same abscissa x), the distance between (x, y₁) and (x, y₂) is |y₂ − y₁|.
The vertical bars mean 'the size of', so the distance is never negative. For example, (−3, 5) and (4, 5) are on a horizontal line, so the distance is |4 − (−3)| = 7 units; (2, 3) and (2, −4) are on a vertical line, so the distance is |−4 − 3| = 7 units.
The distance formula
Let A(x₁, y₁) and B(x₂, y₂) be any two points. Draw a horizontal line through A and a vertical line through B; they meet at C(x₂, y₁), making a right angle at C. Then AC = |x₂ − x₁| and BC = |y₂ − y₁|. By Pythagoras' theorem, AB² = AC² + BC², so:
AB = √((x₂ − x₁)² + (y₂ − y₁)²). The distance of P(x, y) from the origin is √(x² + y²).
Using the distance formula
- Label the points Call them (x₁, y₁) and (x₂, y₂); either can come first
- Find the differences x₂ − x₁ and y₂ − y₁, watching the signs
- Square and add Squares are never negative
- Take the square root Simplify the surd if needed
Because the differences are squared, it does not matter which point you call the first: (x₂ − x₁)² = (x₁ − x₂)². So distance(A, B) = distance(B, A).
Worked example 1: a whole-number answer
Find the distance between (1, 2) and (4, 6). Working: x₂ − x₁ = 4 − 1 = 3 and y₂ − y₁ = 6 − 2 = 4. d = √(3² + 4²) = √(9 + 16) = √25 = 5 units.
Worked example 2: negative coordinates
Find the distance between (−2, −3) and (3, 9). Working: x₂ − x₁ = 3 − (−2) = 5 and y₂ − y₁ = 9 − (−3) = 12. d = √(25 + 144) = √169 = 13 units. A common slip is to write 3 − 2 = 1 instead of 3 − (−2) = 5.
Worked example 3: a surd answer
Find the distance between P(−1, 4) and Q(3, −2). Working: differences 3 − (−1) = 4 and −2 − 4 = −6. d = √(16 + 36) = √52 = √(4 × 13) = 2√13 units (about 7.21 units).
Worked example 4: from the origin
How far is (−6, 8) from the origin? Working: √((−6)² + 8²) = √(36 + 64) = √100 = 10 units.
Worked example 5: an unknown coordinate
The distance between P(a, 3) and Q(1, −1) is 5 units. Find a. Working: (a − 1)² + (3 − (−1))² = 25, so (a − 1)² + 16 = 25 and (a − 1)² = 9. Then a − 1 = 3 or a − 1 = −3, giving a = 4 or a = −2. Both points (4, 3) and (−2, 3) are 5 units from Q.
Key takeaways: on a horizontal line subtract the abscissae, on a vertical line subtract the ordinates; in general use d = √((x₂ − x₁)² + (y₂ − y₁)²), which is Pythagoras' theorem; from the origin d = √(x² + y²); an unknown coordinate usually gives two answers because a square has two square roots.
Check your understanding
-
1. What is the distance between (−4, 6) and (5, 6)?
- 1 unit
- 9 units
- 12 units
- √97 units
Show answer
Answer: B. The ordinates are equal, so the points lie on a horizontal line and the distance is |5 − (−4)| = 9 units.
-
2. What is the distance between (2, −1) and (8, 7)?
- 14 units
- √20 units
- 10 units
- 8 units
Show answer
Answer: C. Differences: 8 − 2 = 6 and 7 − (−1) = 8. d = √(36 + 64) = √100 = 10 units.
-
3. How far is (5, −12) from the origin?
- 17 units
- 7 units
- √119 units
- 13 units
Show answer
Answer: D. √(5² + (−12)²) = √(25 + 144) = √169 = 13 units.
-
4. What is the distance between (0, 3) and (3, 0)?
- 3√2 units
- 6 units
- 3 units
- 9 units
Show answer
Answer: A. √((3 − 0)² + (0 − 3)²) = √(9 + 9) = √18 = 3√2 units, about 4.24 units.
-
5. The point (x, 2) is 10 units from (−3, −4). Which value of x is possible?
- 7
- 5
- 11
- −9
Show answer
Answer: B. (x + 3)² + (2 + 4)² = 100, so (x + 3)² = 64 and x + 3 = ±8, giving x = 5 or x = −11. Only 5 is listed. Check: (5 + 3)² + 6² = 64 + 36 = 100.
Sign in to keep track of the lessons you finish.