Midpoint and Length of a Line Segment

Finding the midpoint of a line segment, and its exact length, is a core coordinate geometry skill on the Edexcel IGCSE Maths course. On this page you will learn to average the coordinates to locate the midpoint, use Pythagoras' theorem to calculate the length of a segment, and work backwards from a midpoint to a missing endpoint. Study the worked examples with plotted diagrams, then scroll down to the auto-marked practice questions to test every skill on a live coordinate grid.

Prior Knowledge This page requires confidence with Pythagoras' Theorem and Gradient of a Straight Line.

How to Find the Midpoint of a Line Segment

The midpoint of a line segment is the point exactly halfway between its two endpoints. Each coordinate of the midpoint is the mean of the matching coordinates of the endpoints.

  1. Add the two x-coordinates and divide by 2: this gives the x-coordinate of the midpoint.
  2. Add the two y-coordinates and divide by 2: this gives the y-coordinate of the midpoint.
  3. Write your answer as a coordinate pair, and check on a quick sketch that it sits halfway along the segment.
Midpoint formula \( M = \left( \dfrac{x_1 + x_2}{2},\ \dfrac{y_1 + y_2}{2} \right) \)
0 2 4 6 8 −2 0 2 4 6 8 3 3 2 2 A (1, 2) B (7, 6) M (4, 4)

Halve each dashed leg (6 across becomes 3 and 3; 4 up becomes 2 and 2). The green lines from those halfway marks meet exactly on the segment: that crossing point is the midpoint, which is why averaging the coordinates works.

Working backwards to a missing endpoint

If you know the midpoint M and one endpoint A, reverse the averaging: double each coordinate of M, then subtract the coordinate of A. In symbols, \( x_B = 2x_M - x_A \) and \( y_B = 2y_M - y_A \). You can also step from A to M on a sketch and repeat the same step beyond M.

How to Find the Length of a Line Segment

A sloping line segment is the hypotenuse of a right angled triangle whose two legs are the horizontal and vertical distances between the endpoints, so Pythagoras' theorem gives its length.

  1. Subtract the x-coordinates to find the horizontal distance between the points.
  2. Subtract the y-coordinates to find the vertical distance between the points.
  3. Square both distances, add them, then take the square root. Round only at the very end if the question asks for it.
Length (distance) formula \( d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \)

The order of each subtraction does not matter: the differences are squared, so any negative sign disappears.

Midpoint: take the mean Average the two x-coordinates, then average the two y-coordinates. The answer is a coordinate pair, and halves such as 3.5 are completely normal.
Length: use Pythagoras The segment is the hypotenuse of a right angled triangle. Square the horizontal and vertical differences, add, then square root. The answer is a single number.
Missing endpoint: double back Given the midpoint and one end, double the midpoint's coordinates and subtract the known end. The midpoint is always the exact centre, so the other end is the same step again.
THE TWO FORMULAS TO REMEMBER
\( M = \left( \dfrac{x_1 + x_2}{2},\ \dfrac{y_1 + y_2}{2} \right) \)
\( d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \)

Worked Examples

💡 Example 1: Midpoint

Find the midpoint of the line segment joining A (2, 1) and B (8, 5).

0 2 4 6 8 −2 0 2 4 6 8 A (2, 1) M (5, 3) B (8, 5)
\[ \begin{array}{rcl} x_M &=& \dfrac{2 + 8}{2} \\ &=& 5 \\ y_M &=& \dfrac{1 + 5}{2} \\ &=& 3 \end{array} \]

The midpoint is (5, 3).

What's happening?

Each coordinate of M is the mean of the endpoint coordinates: halfway between 2 and 8 is 5, and halfway between 1 and 5 is 3. On the diagram, M sits exactly halfway along AB.

💡 Example 2: Midpoint with negatives

Find the midpoint of the line segment joining A (−5, 2) and B (2, −4).

−6 −4 −2 0 2 4 −4 −2 0 2 4 A (−5, 2) M (−1.5, −1) B (2, −4)
\[ \begin{array}{rcl} x_M &=& \dfrac{-5 + 2}{2} \\ &=& -\dfrac{3}{2} \\ y_M &=& \dfrac{2 + (-4)}{2} \\ &=& -1 \end{array} \]

The midpoint is (−1.5, −1).

What's happening?

Keep the signs when you add: −5 + 2 gives −3, and halving it gives −1.5. A half is a perfectly good midpoint coordinate; write it as −1.5 or as the fraction \( -\dfrac{3}{2} \).

💡 Example 3: Length of a segment

Find the length of the line segment joining A (−4, −2) and B (2, 6).

−4 −2 0 2 4 −2 0 2 4 6 6 8 A (−4, −2) B (2, 6)
\[ \begin{array}{rcl} x_2 - x_1 &=& 2 - (-4) \\ &=& 6 \\ y_2 - y_1 &=& 6 - (-2) \\ &=& 8 \\ AB^2 &=& 6^2 + 8^2 \\ &=& 100 \\ AB &=& \sqrt{100} \\ &=& 10 \end{array} \]
What's happening?

The dashed legs on the diagram are the horizontal distance 6 and the vertical distance 8. The segment AB is the hypotenuse, so Pythagoras' theorem gives AB. Here 6, 8, 10 is an exact right angled triple, so the length is a whole number.

💡 Example 4: Length with rounding

Find the distance between A (−3, 4) and B (5, −1). Give your answer correct to 1 decimal place.

−4 −2 0 2 4 6 −2 0 2 4 6 8 8 5 A (−3, 4) B (5, −1)
\[ \begin{array}{rcl} x_2 - x_1 &=& 5 - (-3) \\ &=& 8 \\ y_2 - y_1 &=& -1 - 4 \\ &=& -5 \\ AB^2 &=& 8^2 + (-5)^2 \\ &=& 89 \\ AB &=& \sqrt{89} \\ &=& 9.4339\ldots \\ &\approx& 9.4 \ \text{(1 d.p.)} \end{array} \]
What's happening?

The vertical difference is negative, but squaring removes the sign: \( (-5)^2 \) is 25. 89 is not a square number, so keep \( \sqrt{89} \) on your calculator and round once, at the end, to 9.4.

💡 Example 5: Finding a missing endpoint

M (0, 1) is the midpoint of the line segment AB. A is at (−4, 3). Find the coordinates of B.

−4 −2 0 2 4 −4 −2 0 2 4 6 A (−4, 3) M (0, 1) B (4, −1)
\[ \begin{array}{rcl} x_B &=& 2 \times 0 - (-4) \\ &=& 4 \\ y_B &=& 2 \times 1 - 3 \\ &=& -1 \end{array} \]

So B is (4, −1).

What's happening?

Double each midpoint coordinate and subtract the known end. Equivalently: to get from A to M you go right 4 and down 2, so repeating the same step from M lands on B at (4, −1). Check: the mean of −4 and 4 is 0, and the mean of 3 and −1 is 1, which is M.

Key Points and Pitfalls

🔑 Key Points

  • The midpoint is the mean of the coordinates: add each pair and divide by 2.
  • A midpoint is a coordinate pair; a length is a single number.
  • For length, subtract in either order: squaring removes any negative sign.
  • Halves such as 3.5 are normal midpoint answers; write them as decimals or fractions.
  • Draw a quick sketch to check your answer looks sensible.

⚠️ Pitfalls

  • Adding the coordinates but forgetting to divide by 2.
  • Sign slips with negatives: −5 + 2 is −3, not −7 or 3.
  • Mixing an x-coordinate with a y-coordinate when averaging or subtracting.
  • Stopping at \( d^2 \): 89 is not the length, \( \sqrt{89} \) is.
  • Rounding partway through the working instead of only at the end.
⇩ Practice Questions ⇩

Confident with midpoints and lengths? Every skill on this page feeds straight into finding the equation of a line through two points, so try the next topic when you are ready.

Next Topic: Equation of a Straight Line →

Midpoint and Length of a Line Segment: Practice Rooms

Practise finding the midpoint of a line segment and the length of a line segment in these free IGCSE Maths rooms, with every question plotted on its own coordinate grid. Difficulty rises from left to right: Starter, Builder, Challenger, Master. Type each coordinate or length as a plain number: halves can be entered as a decimal such as 3.5 or a fraction such as 7/2. Lengths are exact whole numbers unless the question asks you to round, in which case type the rounded value.

Correct 0
Re-attempts 0
🔥 Streak 0
🏆 Best 0

Difficulty increases left to right across the columns and down each column. Room 3 works backwards from a given midpoint to the missing endpoint; Room 4 mixes every question type on this page.