The distance between two points is the length of the straight line joining them. How you find it depends on how the points are arranged.
Points on the same horizontal or vertical line
If two points share the same y-coordinate, they lie on a horizontal line and the distance is the difference of the x-coordinates: |x2 − x1|. If they share the same x-coordinate, the distance is |y2 − y1|.
Worked example
The distance between (2, 3) and (7, 3): same y, so distance = |7 − 2| = 5 units.
The distance formula
For any two points, draw a right-angled triangle and use Pythagoras' theorem. This gives the distance formula:
Key idea
distance = √((x2 − x1)2 + (y2 − y1)2)
Example: from (1, 2) to (4, 6): √((4 − 1)2 + (6 − 2)2) = √(9 + 16) = √25 = 5 units.
Remember
- Same y → horizontal distance = |x2 − x1|.
- Same x → vertical distance = |y2 − y1|.
- Otherwise use √((x2 − x1)2 + (y2 − y1)2); distance is never negative.