Midpoint and distance formulas: coordinates, gradients and line segments
TutorAura guide · Updated
Two questions come up constantly in coordinate geometry: where is the middle of a line segment, and how long is it? The midpoint is the average of the endpoints' coordinates; the distance comes from Pythagoras. Both formulas are short, and knowing where they come from means you can rebuild them if you forget. This guide covers both, the reverse problem of finding a missing endpoint, and how the gradient fits in.
Key takeaways
- Midpoint: average the x's and average the y's.
- Distance: square the difference in x, square the difference in y, add, square root.
- To find a missing endpoint, double the midpoint and subtract the known end.
- Gradient = change in y ÷ change in x.
The midpoint formula
For endpoints and :
The midpoint of and is .
With negatives: the midpoint of and is . Averages can be decimals: the midpoint of and is .
The distance formula
This is Pythagoras: the horizontal and vertical differences are the two shorter sides of a right-angled triangle and the segment is the hypotenuse.
Distance from to : .
The order of subtraction doesn't matter because the differences are squared. Leave the answer as a simplified surd unless asked for a decimal.
Finding a missing endpoint
The midpoint of AB is and A is . Find B.
Since the midpoint is halfway, B is as far beyond M as A is before it: .
Check: the midpoint of and is . ✓
Gradient of the segment
From to : . The line slopes down.
Midpoint, distance and gradient together let you find the perpendicular bisector of a segment: it passes through the midpoint with gradient . For the segment above, that's gradient through , so . See straight line graphs for the equation of a line.
Shapes on a grid
These formulas prove facts about shapes. To show that a quadrilateral is a parallelogram, check that the diagonals have the same midpoint. To show a triangle is isosceles, show two sides have the same length. To show it's right-angled, check that the gradients of two sides multiply to −1, or that the side lengths satisfy Pythagoras.
Example: , , . , , so triangle PQR is isosceles. Gradient of PQ is and of QR is ; they multiply to −1, so the angle at Q is a right angle too.
Practice questions
- Find the midpoint of and .
- Find the distance between and .
- Find the exact distance between and .
- M is the midpoint of AB. A is . Find B.
- Find the gradient of the line through and .
Answers: 1. . 2. 15. 3. . 4. . 5. 2.
More practice in our midpoint questions, the midpoint calculator and the distance calculator.
Frequently asked questions
How do you find the midpoint of two points?
Add the x-coordinates and halve; add the y-coordinates and halve. The midpoint of (2, 5) and (8, 1) is (5, 3).
Where does the distance formula come from?
From Pythagoras' theorem. The horizontal and vertical differences between the points form a right-angled triangle, and the distance is its hypotenuse.
Does it matter which point is (x₁, y₁)?
Not for the midpoint or the distance. For the gradient, keep the same order on the top and bottom of the fraction.
Sources
- GCSE mathematics: subject content and assessment objectives. Department for Education.
- Cambridge IGCSE Mathematics 0580 syllabus. Cambridge International.
Keep reading
Midpoint and length of a line segment questions and answers
8 GCSE and IGCSE questions with worked answers, checked as you type.
Midpoint calculator with working
The midpoint of two points, averaging each coordinate, with the working shown.
Pythagoras' theorem: finding the hypotenuse, a shorter side and distances
a² + b² = c², finding any side, Pythagorean triples, coordinate distances and 3D diagonals.
Straight line graphs: y = mx + c, gradient, intercept and parallel and perpendicular lines
Gradient and intercept, plotting, equation from two points, rearranging to y = mx + c, parallel and perpendicular lines.