Home / IGCSE Mathematics 0580 / Length and midpoint
Cambridge IGCSE Mathematics 0580 · Coordinate geometry

Length and midpoint

How to calculate the length of a line segment from the coordinates of its ends, using Pythagoras' theorem, as an exact surd or to 3 significant figures, and how to find the midpoint by averaging the coordinates. This subtopic is Extended content only.

E3.4Extended onlyFree lesson
What the syllabus says

E3.4 (Extended)

  • 1 Calculate the length of a line segment.
  • 2 Find the coordinates of the midpoint of a line segment.

Quoted from the Cambridge IGCSE Mathematics 0580 syllabus for 2025 to 2027.

Length of a line segment Extended

A line segment is the part of a line between two end points. To find its length from coordinates, draw the same right-angled triangle you use for a gradient: a horizontal side, a vertical side, and the segment itself as the hypotenuse.

The horizontal side is the change in x and the vertical side is the change in y. Pythagoras' theorem then gives the length. For the points (x1,y1) and (x2,y2):

length=(x2−x1)2+(y2−y1)2

The method, step by step:

  1. Find the change in x and the change in y.
  2. Square each one.
  3. Add the squares.
  4. Square root the total.

Why the signs do not matter here. A change of −8 and a change of 8 give the same square, 64. A length is always positive, and squaring removes the direction. You still have to subtract correctly, though: from x=−2 to x=4 is a change of 4−(−2)=6, not 2.

You do not need to memorise the formula if you understand the triangle. Many students sketch the triangle on a quick pair of axes, label the two short sides, and use a2+b2=c2 directly. That is exactly what the formula says.

The length triangle Extended

xy1234567812345678910110AB

From A(1,2) to B(7,10) the horizontal side is 7−1=6 and the vertical side is 10−2=8. So AB2=62+82=36+64=100 and AB=100=10.

Worked example 1 Extended

Calculate the length of the line segment joining A(−2,3) and B(4,−5).

  1. Change in x: 4−(−2)=6.

  2. Change in y: −5−3=−8.

  3. AB2=62+(−8)2=36+64=100.

  4. AB=100=10.

Answer: 10

Exact answers and rounded answers Extended

Most pairs of points do not give a whole-number length. What you write depends on the paper and the question.

Non-calculator (Paper 2): leave the answer as a surd, in its simplest form. Look for the largest square number that divides the number under the root: 80=16×5=45. If the question says "give your answer in the form k5", it is telling you which surd to aim for.

Calculator (Paper 4): give the answer correct to 3 significant figures unless told otherwise: 80=8.944…=8.94.

Keep the exact value for as long as you can. If the length is used again, for example in a perimeter, use the full calculator value, or the surd, and round only at the very end.

Worked example 2 Extended

P is the point (1,−2) and Q is the point (5,6). Find the length of PQ, (a) as a surd in its simplest form, (b) correct to 3 significant figures.

  1. Change in x: 5−1=4. Change in y: 6−(−2)=8.

  2. PQ2=42+82=16+64=80.

  3. (a) PQ=80. The largest square factor of 80 is 16, so 80=165=45.

  4. (b) 80=8.9442…=8.94 to 3 significant figures.

Answer: (a) 45 (b) 8.94

Check yourself Extended

Calculate the length of the line segment joining (2,−1) and (5,3).

Answer it in the portal, where your answer is checked as you type →

Check yourself Extended

Find the length of the line segment joining (−1,3) and (3,−3). Give your answer as a surd in its simplest form.

Answer it in the portal, where your answer is checked as you type →

Midpoint of a line segment Extended

The midpoint of a line segment is the point exactly halfway along it. Its x-coordinate is halfway between the two x-coordinates, and its y-coordinate is halfway between the two y-coordinates. Halfway between two numbers is their mean, so:

midpoint=(x1+x22,y1+y22)

Why it works. Go halfway along the segment and draw the small triangle back to the start. It is the big length triangle scaled by 12, so it covers half the change in x and half the change in y. Starting at x1 and adding half the change, x1+x2−x12, simplifies to x1+x22: the mean.

Note the plus signs. The midpoint adds the coordinates and halves; the length and the gradient subtract. Mixing the two up is the most common error in this topic.

Working backwards. If you know one end, A, and the midpoint, M, the other end is as far beyond M as M is beyond A. Find the step from A to M and take the same step again from M. Equivalently, B=(2×M)−A, coordinate by coordinate.

Worked example 3 Extended

Find the coordinates of the midpoint of the line segment joining (−3,7) and (5,−1).

  1. x-coordinate: −3+52=22=1.

  2. y-coordinate: 7+(−1)2=62=3.

  3. Sense check: 1 is halfway between −3 and 5, and 3 is halfway between 7 and −1.

Answer: (1,3)

Worked example 4 Extended

M(2,−1) is the midpoint of the line segment AB. A is the point (−3,4). (a) Find the coordinates of B. (b) Find the length of AB, giving your answer in the form k2.

  1. (a) From A to M: x changes by 2−(−3)=5 and y changes by −1−4=−5.

  2. Take the same step again from M: B=(2+5,−1−5)=(7,−6).

  3. Check: the midpoint of (−3,4) and (7,−6) is (42,−22)=(2,−1).

  4. (b) Change in x: 7−(−3)=10. Change in y: −6−4=−10.

  5. AB2=100+100=200, so AB=200=100×2=102.

Answer: (a) (7,−6) (b) 102

Check yourself Extended

Find the coordinates of the midpoint of the line segment joining (−4,9) and (6,2).

Answer it in the portal, where your answer is checked as you type →

Using length and midpoint together Extended

Exam questions often combine the two skills with a fact about a shape.

  • Circles. If AB is a diameter, the centre is the midpoint of AB and the radius is half the length of AB. A point lies on the circle exactly when its distance from the centre equals the radius.
  • Isosceles triangles. Calculate all three side lengths. Two equal lengths show the triangle is isosceles. The line from the top vertex to the midpoint of the base is then the height, which gives the area.
  • Parallelograms. The diagonals of a parallelogram cut each other in half, so both diagonals have the same midpoint. That lets you find a missing vertex.
  • Unknown coordinates. If a length is given and one coordinate is a letter, form an equation with Pythagoras and solve it. A square root has two signs, so there are often two answers.

In a "show that" question, give every length in full, as a surd or with the calculation shown, and finish with a sentence that states what you have shown.

Key points

  • Length =(x2−x1)2+(y2−y1)2: Pythagoras on the change in x and the change in y.

  • Midpoint =(x1+x22,y1+y22): the mean of each coordinate.

  • Length and gradient subtract the coordinates; the midpoint adds them.

  • Without a calculator, give lengths as surds in their simplest form; with one, to 3 significant figures.

  • To find an end point from the midpoint, take the step from the known end to the midpoint again.

Where marks are lost

  • Adding the changes instead of their squares: 6+8=14 is not the length.

  • Forgetting the final square root, and giving AB2 as the answer.

  • Subtracting negatives wrongly: 4−(−2)=6, not 2.

  • Halving the difference for the midpoint, x2−x12, instead of halving the sum.

  • Giving 52 when the question asks for the simplest form, 213.

  • Rounding a length early and then using the rounded value in a perimeter or area.

Related IGCSE Mathematics 0580 lessons

All IGCSE Mathematics 0580 lessons →

An original lesson written to the Cambridge IGCSE Mathematics 0580 syllabus (2025 to 2027). The worked examples and questions are our own, not Cambridge questions. Back to every IGCSE Mathematics 0580 lesson.