Geometry · The foundations of geometry

Midpoint and distance in coordinates

Two formulas — and one of them is Pythagoras in disguise.

Add the coordinates, or subtract them?

Both the midpoint of a segment and its length start from the same four numbers, (2, 3) and (8, 11). One calculation adds them and the other subtracts — and anyone who mixes them up can catch it at once, if they know where the answer has to land.

On a coordinate grid, both the midpoint of a segment and its length can be computed directly. The two formulas look similar and do quite different things, which is exactly why they get confused.

M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right) \qquad d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Two worked examples

Example 1 — the midpoint is an average

  1. From (2, 3) to (8, 11).
  2. Average the x values. \frac{2 + 8}{2} = 5
  3. Average the y values. \frac{3 + 11}{2} = 7
  4. So the midpoint is (5, 7).

Example 2 — the distance is a difference

  1. The same two points.
  2. Subtract the x values. 8 - 2 = 6
  3. Subtract the y values. 11 - 3 = 8
  4. Then Pythagoras. \sqrt{36 + 64} = 10
  5. One formula adds and halves; the other subtracts and squares.
A calculator: Midpoint and distance from two points — sliders for x of the first point, y of the first point, x of the second point, y of the second point, with results that update at once on a graph.