Distance Between Two Points

Two points on a grid are the ends of a sloping line. Drop a right-angled triangle underneath it and Pythagoras hands you the straight-line distance between them.

MYP 4Standard MathsCoordinate Geometry & SequencesCriteria A · C · D~10 min read

The hidden triangle

Join two points on a grid with a straight line. That line is the longest side, the hypotenuse, of a right-angled triangle whose other two sides run straight across and straight up.

Distance between two points
The length of the straight line joining them. It equals the hypotenuse of the right-angled triangle formed by the horizontal and vertical gaps between the points.

The horizontal side has length "difference in x" and the vertical side has length "difference in y". Because the corner is a right angle, Pythagoras applies: \(\text{hypotenuse}^2 = \text{side}^2 + \text{side}^2\).

The distance formula

Writing the horizontal gap as \(x_2 - x_1\) and the vertical gap as \(y_2 - y_1\), Pythagoras gives the distance \(d\):

\[ d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \]

Because each gap is squared, any minus signs disappear, so it does not matter which point you call the first. Squaring makes both differences positive before you add them.

Using the formula

Find the two gaps, square them, add, then take the square root. Keep the working laid out so each step is easy to check.

Worked example

Find the distance between \(A(1, 2)\) and \(B(4, 6)\).

1
Horizontal gap: \(x_2 - x_1 = 4 - 1 = 3\). Vertical gap: \(y_2 - y_1 = 6 - 2 = 4\).
2
Square each gap: \(3^2 = 9\) and \(4^2 = 16\).
3
Add them: \(9 + 16 = 25\).
4
Take the square root: \(\sqrt{25} = 5\).
The distance is \(d = 5\) units.

Common slip-ups

The most common mistake is forgetting the square root at the end and leaving your answer as \(25\) instead of \(5\). Remember \(25\) is the distance squared, so you must undo the square.

Square each gap separately, then add

You cannot add first and square after: \((x_2 - x_1) + (y_2 - y_1)\) then squared is wrong. Pythagoras needs each side squared on its own, so it is \((x_2 - x_1)^2 + (y_2 - y_1)^2\) under the root. Showing this working clearly is what earns the method marks under Criteria C and D.

Check yourself

1. Find the distance between \((0, 0)\) and \((6, 8)\) +

Gaps: \(6 - 0 = 6\) and \(8 - 0 = 8\). Squared: \(6^2 + 8^2 = 36 + 64 = 100\). Distance: \(\sqrt{100} = \mathbf{10}\) units.

2. Find the distance between \((2, 3)\) and \((5, 7)\) +

Gaps: \(5 - 2 = 3\) and \(7 - 3 = 4\). Squared: \(3^2 + 4^2 = 9 + 16 = 25\). Distance: \(\sqrt{25} = \mathbf{5}\) units.

3. Find the distance between \((-1, -2)\) and \((2, 2)\) +

Gaps: \(2 - (-1) = 3\) and \(2 - (-2) = 4\). Squared: \(3^2 + 4^2 = 9 + 16 = 25\). Distance: \(\sqrt{25} = \mathbf{5}\) units.


Part of the Standard Maths library. Spotted an error or want a topic added? That feedback makes the notes better.