Sometimes you'll be given two points on a coordinate grid and asked: how far apart are they? When the two points share a coordinate — they sit on the same horizontal line or the same vertical line — the answer is easy. You don't need any clever formula; you just count squares (or do a quick subtraction).
When two points share a coordinate
Look at the two points. Compare their x-values and their y-values:
- If the y-values match, the points sit on the same horizontal line. The distance is the difference of the x-values.
- If the x-values match, the points sit on the same vertical line. The distance is the difference of the y-values.
That difference is always taken so that the answer is positive — bigger number minus smaller number.
A worked example
A is at (1, 2) and B is at (4, 2). How far apart are A and B?
Both points have y = 2, so they share a horizontal line. The distance is the difference of the x-values:
4 − 1 = 3 squares
You can also check by counting: from (1, 2) move right past (2, 2), (3, 2), then to (4, 2). That's three jumps — three squares.
P is at (5, 1) and Q is at (5, 7). How far apart are they?
Both points have x = 5, so they share a vertical line. The distance is the difference of the y-values:
7 − 1 = 6 squares