Distance on the Coordinate Plane
Draw the right triangle and the distance formula stops being something to memorise.
You are at the corner of 1st and Oak. Your friend is four blocks east and three blocks north.
Walking the streets is 4 + 3 = 7 blocks. Easy.
But there is a park between you, and you can cut straight across it. How far is the short cut?
It is not 7 — the short cut is obviously shorter. It is not 3.5 either.
The two streets meet at a right angle, so you are standing on a right triangle whose legs are 4 and 3.
And you already know what to do with those: 42 + 32 = 25, so the short cut is √25 = 5 blocks. The distance formula is Pythagoras wearing coordinates.
Why it is just Pythagoras
Plot the two points. Draw a horizontal segment and a vertical segment to make a right triangle with your two points at the ends of the slanted side.
The horizontal leg is the difference in the x values. The vertical leg is the difference in the y values.
Then a2 + b2 = c2 gives the distance. That is the entire derivation of the formula.
Draw it every time
Even once you know the formula, sketching the triangle catches sign errors and tells you roughly what the answer should be.
Using the formula
d = √(x2 - x1)2 + (y2 - y1)2. Subtract, square, add, then square root.
The squaring removes any minus signs, so subtracting in the wrong order does no harm here.
Leave the answer as an exact root, like √29, unless you are asked to round.
Square before adding
√32 + 42 = √25 = 5, not 3 + 4 = 7. The root of a sum is not the sum of the roots.
Midpoint
The midpoint is the average of the two points: (x1 + x22, y1 + y22).
Add and halve each coordinate separately.
Sanity check: the midpoint must sit between the two points in both directions.
Add for midpoint, subtract for distance
Midpoint adds then halves. Distance subtracts then squares. Mixing them up is common, so say which one you need before you start.
Perimeter and shape
To find the perimeter of a shape on a grid, compute each side separately and add.
Equal side lengths can prove a shape is a rhombus; equal diagonals can help prove a rectangle.
Two sides with the same slope are parallel — that plus lengths settles most "what shape is it?" questions.
Worked examples
Distance between two points
Find the distance from (1, 2) to (7, 10).
- Horizontal leg: 7 - 1 = 6 The run.
- Vertical leg: 10 - 2 = 8 The rise.
- d = √62 + 82 = √36 + 64 = √100 Square each leg, then add.
- d = 10 A 6-8-10 triangle, which is a 3-4-5 doubled.
d = 10
An exact answer
Find the distance from (-3, 4) to (2, -1).
- Run: 2 - (-3) = 5 Subtracting a negative adds.
- Rise: -1 - 4 = -5 Negative is fine; squaring will fix it.
- d = √52 + (-5)2 = √50 25 + 25 = 50.
- √50 = 5√2 ≈ 7.07 50 = 25 × 2, so pull out the 5.
5√2 ≈ 7.07
Midpoint
Find the midpoint of the segment from (-4, 3) to (10, -7).
- x: -4 + 102 = 62 = 3 Average the x values.
- y: 3 + (-7)2 = -42 = -2 Average the y values.
- Midpoint is (3, -2). Between -4 and 10, and between 3 and -7 ✓
(3, -2)
Words to know
- Leg
- A side of a right triangle next to the right angle.
- Hypotenuse
- The longest side, opposite the right angle.
- Distance formula
- d = √(x2 - x1)2 + (y2 - y1)2.
- Midpoint
- The point halfway between two others: average the x values and average the y values.
Mistakes to watch for
Adding the legs instead of squaring them. √32 + 42 = 5, but 3 + 4 = 7 — that is the street route, not the short cut. The root of a sum is never the sum of the roots.
Subtracting for the midpoint. Midpoint adds then halves; distance subtracts then squares. Say which one you need before you start, because the two formulas look alike and do opposite things.
Forgetting the square root at the end. 16 + 9 = 25 is d2, not d. Stopping there gives an answer five times too big, and it looks plausible enough to survive a glance.
Mishandling a negative coordinate. The run from -2 to 4 is 4 - (-2) = 6, not 2. Subtracting a negative adds — and the squaring afterwards will hide the error rather than reveal it.
A rope with 12 evenly spaced knots, pulled into a 3-4-5 triangle, gives a perfect right angle. Egyptian surveyors used exactly this to re-mark field boundaries after the Nile flooded.
They were doing it a thousand years before Pythagoras was born, and the Babylonian tablet Plimpton 322 lists such triples from around 1800 BC.
What the Greeks added was not the fact but the proof — the argument that it must hold for every right triangle, not just the ones anyone had tried.