GCSE Maths / Edexcel

Length of a line segment from coordinates

Find the length between two plotted points by making a right-angled triangle and using Pythagoras' theorem.

GraphsHigherGrades 6 to 8Focused skill

Curriculum path: GCSE Maths > Edexcel > Graphs > Length of a line segment from coordinates

Pearson Edexcel GCSE Maths Algebra A8 (Higher teaching guidance): calculate the length of a line segment from its endpoint coordinates; use Pythagoras' theorem (G20).

Revision notes

Theory, examples, and quick checks.

Keep the method short, then practise straight away. This note is written for GCSE Maths Edexcel students who need clear working and reliable method marks.

Theory

Coordinates locate the endpoints, but the straight segment between them may be diagonal. Counting grid squares along the diagonal is not reliable: first find how far across and how far up or down the endpoints are.

For A(-2, 1) and B(1, 5), go 3 units right from -2 to 1 and 4 units up from 1 to 5. Draw these horizontal and vertical moves as the two shorter sides of a right-angled triangle. The segment AB is its longest side, called the hypotenuse.

Pythagoras' theorem says hypotenuse² = horizontal change² + vertical change². Here AB² = 3² + 4² = 9 + 16 = 25, so AB = √25 = 5 units. The sketch shows why you add the squares; you do not add 3 and 4 to get the diagonal.

You can calculate each change by subtracting the endpoint coordinates: horizontal change = |x₂ - x₁| and vertical change = |y₂ - y₁|. The absolute-value bars mean take the positive size of the move. For A(-4, -1) to B(2, 7), the changes are 6 and 8, so the length is √(6² + 8²) = 10 units.

If both points share an x-coordinate or a y-coordinate, the segment is vertical or horizontal: just count that one change. If the square root does not simplify to a whole number, keep an exact surd unless the question asks for a decimal approximation. Label any real-world length with its unit.

Key ruleLength = √[(horizontal change)² + (vertical change)²]; draw the right-angled triangle first.

Diagram guide

-4-3-2-11234-3-2-112345xy0A(-2, 1)B(1, 5)34AB = 5
A 3-4-5 right triangle on a gridThe 3-unit horizontal and 4-unit vertical moves meet at a right angle; AB is 5 units.

Worked examples

Start with a grid

Find the length of AB where A(-2, 1) and B(1, 5).

-4-3-2-11234-3-2-112345xy0A(-2, 1)B(1, 5)34AB = 5
Across 3, up 4The diagonal AB is the hypotenuse, not the sum of the two moves.
  1. Count 3 units across and 4 units up.
  2. Use AB² = 3² + 4² = 25.
  3. Take the positive square root: AB = 5 units.

Answer: 5 units

Handle negative coordinates

Find the distance from (-4, -1) to (2, 7).

  1. Horizontal change = 2 - (-4) = 6.
  2. Vertical change = 7 - (-1) = 8.
  3. Distance = √(6² + 8²) = √100 = 10 units.

Answer: 10 units

Keep an exact answer

Find the exact distance from (-2, 1) to (3, 4).

  1. Horizontal change = 5 and vertical change = 3.
  2. Distance² = 5² + 3² = 34.
  3. √34 cannot be simplified to a whole number; leave it exact unless asked to round.

Answer: √34 units

Common mistakes

  • Adding the horizontal and vertical moves instead of using Pythagoras.
  • Subtracting negative coordinates without brackets.
  • Using the sum of the squares as the final length and forgetting the square root.
  • Rounding an exact surd when no approximation was requested.

Quick exercise

Try these before moving to the exam-style questions.

  1. From x = -2 to x = 1, how many units across?
  2. From y = 1 to y = 5, how many units up?
  3. A right triangle has shorter sides 3 and 4. How long is its hypotenuse?
  4. From (-4, -1) to (2, 7), what is the horizontal change?
  5. For horizontal change 5 and vertical change 3, what is the length squared?
Exam-style questions

Practise the same skill at three levels.

These are original GCSE-style questions with mark schemes, common wrong answers, and AI marking guidance so feedback stays close to exam expectations.

Basic GCSE styleHigherEither3 marks

The diagram shows A(-2, 1) and B(1, 5). Work out the length AB.

-4-3-2-11234-3-2-112345xy0A(-2, 1)B(1, 5)34
Find the diagonalUse the horizontal and vertical changes to find AB.
coordinate distancePythagoras
Standard exam styleHigherEither4 marks

A is (-4, -1) and B is (2, 7). Calculate the length AB, showing your method.

negative coordinatesdistance formula
ChallengeHigherEither4 marks

P is (-2, 1) and Q is (3, 4). Find the exact length PQ. Then give an estimate to one decimal place.

exact surdsdecimal approximation