Pythagoras on the grid
Draw a right triangle under two points: its legs are differences of coordinates.
How far is town B from town A?
A town B is 36 km east and 15 km north of a town A. How far is B from A, without measuring on the road?
How far is B from A in a straight line?
What this lesson covers
The idea
The distance between P(x₁, y₁) and Q(x₂, y₂) is PQ = √[(x₂ – x₁)² + (y₂ – y₁)²], obtained from the Pythagoras theorem; only the positive square root is taken, and it equals √[(x₁ – x₂)² + (y₁ – y₂)²].
How far is town B from town A?
A town B is 36 km east and 15 km north of a town A. How far is B from A, without measuring on the road?
How far is B from A in a straight line?
- 51 km, because 36 + 15 = 51
- 39 km
- 21 km, because 36 − 15 = 21
Draw the triangle under two points
Drag P and Q, or choose a point and press the arrows. The blue leg PT goes across. The green leg QT goes up or down. The amber line is PQ. Watch how each leg is a difference of coordinates, and what PQ² is.
The distance formula
PQ = √[(x₂ − x₁)² + (y₂ − y₁)²] is the distance between P(x₁, y₁) and Q(x₂, y₂).
Under P and Q, draw a right triangle. Its legs are PT = x₂ − x₁ and QT = y₂ − y₁, the distances along the axes from lesson 1. Pythagoras gives PQ² = PT² + QT². For the town: √(36² + 15²) = √(1296 + 225) = √1521 = 39 km.
Squaring removes any minus sign, so it does not matter which point you call P: √[(x₁ − x₂)² + (y₁ − y₂)²] gives the same number. Only the positive square root is taken, because a distance is never negative.
Notes
PQ = √[(x₂ − x₁)² + (y₂ − y₁)²]. The legs of the right triangle are the differences of the coordinates, and only the positive square root is taken.
Check yourself
Find the distance between (2, 1) and (8, 9).
Answer: 10 units
Legs: 8 − 2 = 6 and 9 − 1 = 8. PQ = √(36 + 64) = √100 = 10 units.
Back to the towns. B is 36 km east and 15 km north of A. How many km is B from A in a straight line?
Answer: 39 km
AB = √(36² + 15²) = √(1296 + 225) = √1521 = 39 km. It is shorter than 36 + 15 = 51, the road east and then north.
To find the distance between P(1, 2) and Q(4, 6), Ravi works out √[(1 − 4)² + (2 − 6)²] and Meena works out √[(4 − 1)² + (6 − 2)²]. Whose answer is right?
For P(3, 2) and Q(−2, −3), find PQ² (the square of the distance).
Answer: 50
Legs: 3 − (−2) = 5 and 2 − (−3) = 5. PQ² = 5² + 5² = 25 + 25 = 50, so PQ = √50, about 7.07.
- Only Meena's, because Ravi's brackets have minus signs. (−3)² is 9 and (−4)² is 16, so Ravi's brackets give 9 + 16 too. Squaring removes the minus sign.
- Both. They give the same number, 5. — correct. Yes! (1 − 4)² = (4 − 1)² = 9 and (2 − 6)² = (6 − 2)² = 16, so both get √25 = 5.
- Only Ravi's, because P comes first. Either order works. (1 − 4)² and (4 − 1)² are both 9.