Three formulas, three coordinate-geometry workhorses. Find the length of a line segment, the midpoint, and the gradient — building blocks for tangents, perpendiculars, and quadrilateral classification.
At a glance
Distance between (x1,y1) and (x2,y2): (x2−x1)2+(y2−y1)2.
Midpoint: (2x1+x2,2y1+y2) — the AVERAGE of coordinates.
Gradient: x2−x1y2−y1. Rise over run.
Parallel lines: SAME gradient.
Perpendicular lines: gradients multiply to −1 → m2=−m11.
Mapped to the Cambridge IGCSE 0580 syllabus (2025-2027).
E3.1 — Calculate the gradient and length of a straight line; find the midpoint of a line segment.
Recognise parallel and perpendicular lines from their gradients.
Distance between two points
Pythagoras applied to coordinates. Square the differences, add, square root.
Formula. Distance between A(x1,y1) and B(x2,y2):
d=(x2−x1)2+(y2−y1)2.
This is just Pythagoras' theorem applied to the right triangle formed by the horizontal and vertical legs.
The distance is the hypotenuse — square the horizontal and vertical gaps, add, take the root.
Worked. Find the distance from A(1,2) to B(4,6).
d=(4−1)2+(6−2)2=9+16=25=5.
Worked (negatives). Find the distance from P(−2,5) to Q(3,−7).
d=(3−(−2))2+(−7−5)2=25+144=169=13.
Sign-doesn't-matter rule. Since each difference is squared, the order of subtraction doesn't matter: (x2−x1)2=(x1−x2)2.
Square the differences.
Add.
Square root.
Order of subtraction doesn't matter (squared).
Midpoint of a line segment
Average each coordinate. Half-way along the line.
Formula. Midpoint of segment from (x1,y1) to (x2,y2):
M=(2x1+x2,2y1+y2).
Worked. Midpoint of A(2,−1) and B(8,5).
M=(22+8,2−1+5)=(5,2).
The midpoint sits exactly halfway — average the x-values and the y-values.
Reverse problem. "Given M and one endpoint, find the other endpoint."
If M=(5,2) and one endpoint is A(2,−1), the other endpoint B satisfies 22+x=5 → x=8. Similarly y=5. So B(8,5) ✓.
Average each coordinate.
Same midpoint regardless of order of endpoints.
Reverse: solve for the missing endpoint.
Gradient of a line
Rise over run. Positive: rises left to right. Negative: falls.
Formula. Gradient of the line through (x1,y1) and (x2,y2):
m=x2−x1y2−y1.
The order matters HERE — but be consistent in numerator and denominator.
Sign of the gradient.
m>0: line rises left to right.
m<0: line falls left to right.
m=0: horizontal line.
Vertical line: m is undefined (zero denominator).
Gradient tells you the steepness and direction — flat means zero, vertical means undefined.
Worked. Gradient through A(1,2) and B(4,11).
m=4−111−2=39=3.
Parallel lines: SAME gradient.
Perpendicular lines.m1×m2=−1. Each is the negative reciprocal of the other.
If m1=2, perpendicular gradient is −21.
If m1=−43, perpendicular gradient is 34.
m=ΔxΔy.
Positive: up. Negative: down. Zero: flat.
Parallel ⇔ same m.
Perpendicular ⇔ m1⋅m2=−1.
Quick recap
Distance: Pythagoras on coordinate differences.
Midpoint: average each coordinate.
Gradient: rise over run.
Parallel: same gradient.
Perpendicular: gradients multiply to −1.
Horizontal: m=0. Vertical: undefined.
Memorise this
Verbatim phrases and definitions Cambridge mark schemes credit.
Distance formula — d=(x2−x1)2+(y2−y1)2.
Midpoint formula — M=(2x1+x2,2y1+y2).
Gradient formula — m=x2−x1y2−y1.
Parallel — same gradient.
Perpendicular — gradients multiply to −1.
How it’s examined
These three formulas appear inside almost every Paper 4 coordinate-geometry question (5-7 marks). Common combo: find midpoint, find gradient of perpendicular, write equation of perpendicular bisector. Examiner reports flag inverted gradient (run/rise instead of rise/run) and arithmetic slips with negatives.
Step-by-step worked examples — Distance, Midpoint and Gradient
Step-by-step solutions to past-paper-style questions on distance, midpoint and gradient, written exactly the way a tutor would explain them at the board.
Question type:
Question patterns to master — Distance, Midpoint and Gradient
Almost every distance, midpoint and gradient exam question is one of these shapes. Learn to spot each one and you will always know how to start.
Direct calculation▼
Recognise it by
A single instruction — find the distance / midpoint / gradient, or find a missing coordinate — using one of the three coordinate formulae.
How to approach it
Pick the right formula and substitute carefully: distance squares the differences and adds; midpoint averages the coordinates; gradient is rise over run. For a missing coordinate, set up the formula as an equation and solve.
Common trap
Subtracting instead of averaging in the midpoint formula, or flipping the gradient to ΔyΔx. Examiner reports flag both — and forgetting the negative when finding a perpendicular gradient.
Show that / prove▼
Recognise it by
The words show that, prove or verify — typically asking you to demonstrate a triangle is isosceles, or that three points are collinear.
How to approach it
Compute the relevant distances or gradients, then finish with an explicit conclusion: state which two sides are equal, or that the gradients match and a point is shared.
Common trap
Computing the distances or gradients and stopping there. Examiner reports stress the final comparison line — and for collinearity, the shared-point clause — is where the last mark sits.
1Find the distance between two points
CoreDirect calculation• distance
▼
Question
Find the distance between A(1,2) and B(7,10).
Step-by-step solution
Step 1
d=(x2−x1)2+(y2−y1)2.
d=(7−1)2+(10−2)2
Step 2
Compute.
=36+64=100=10
Answer
d=10 units
2Find the midpoint of a segment
CoreDirect calculation• midpoint
▼
Question
Find the midpoint of the segment joining P(−3,5) and Q(7,−1).
Step-by-step solution
Step 1
Average each coordinate.
M=(2−3+7,25+(−1))
Step 2
Simplify.
=(2,2)
Answer
M=(2,2)
3Find the gradient between two points
CoreDirect calculation• Adapted from 0580/22 May/Jun 2024 Q8• gradient
▼
Question
Find the gradient of the line through A(2,3) and B(8,15).
Step-by-step solution
Step 1
m=x2−x1y2−y1.
m=8−215−3=612=2
Answer
m=2
4Find a missing coordinate using the gradient
ExtendedDirect calculation• gradient
▼
Question
Points P(1,k) and Q(5,11) lie on a line of gradient 2. Find k.
A line has gradient 43. Find the gradient of any line perpendicular to it.
Step-by-step solution
Step 1
Perpendicular gradient is the negative reciprocal.
m⊥=−34
Answer
−34
6Find an endpoint given the midpoint
ExtendedDirect calculation• Adapted from 0580/22 May/Jun 2023 Q14• midpoint, endpoint
▼
Question
The midpoint of segment AB is M(4,−1). If A=(−2,5), find the coordinates of B.
Step-by-step solution
Step 1
Let B=(x,y). Use the midpoint formula component-by-component.
2−2+x=4⟹x=10
Step 2
And:
25+y=−1⟹y=−7
Answer
B=(10,−7)
Examiner tip
The mark scheme awards method marks for setting up the two simultaneous component equations. The examiner report flags candidates often guess at B by symmetry without writing the equations.
7Distance giving a surd answer
ExtendedDirect calculation• distance, surd
▼
Question
Find the exact distance between C(−3,4) and D(2,−1), giving the answer in simplest surd form.
Step-by-step solution
Step 1
Apply the distance formula.
d=(2−(−3))2+(−1−4)2
Step 2
Compute.
=25+25=50
Step 3
Simplify.
50=52
Answer
52 units
8Gradient between two points on a curve
ExtendedDirect calculation• gradient, curve
▼
Question
Points P and Q on the curve y=x2+1 have x-coordinates 1 and 3 respectively. Find the gradient of line PQ.
Step-by-step solution
Step 1
Find the y-coordinates.
P(1,2),Q(3,10)
Step 2
Apply the gradient formula.
m=3−110−2=28=4
Answer
m=4
9Verify a triangle is isosceles
ChallengeShow that / prove• Adapted from 0580/42 Feb/Mar 2023 Q15• distance, isosceles
▼
Question
Three points are A(1,3), B(5,7) and C(7,1). Show that triangle ABC is isosceles.
Step-by-step solution
Step 1
Compute AB2.
AB2=(5−1)2+(7−3)2=16+16=32
Step 2
Compute BC2.
BC2=(7−5)2+(1−7)2=4+36=40
Step 3
Compute AC2.
AC2=(7−1)2+(1−3)2=36+4=40
Step 4
BC=AC=40 but AB=32 — two equal sides, so triangle ABC is isosceles.
Answer
BC=AC=40 (or 210); triangle is isosceles.
Examiner tip
The examiner report flags candidates often compute distances and stop without comparing. State which two sides are equal as the concluding line — that's where the final mark sits.
10Test for collinearity using gradients
ChallengeShow that / prove• gradient, collinear
▼
Question
Show that the points P(−1,−3), Q(2,3) and R(5,9) are collinear.
Step-by-step solution
Step 1
Gradient of PQ.
mPQ=2−(−1)3−(−3)=36=2
Step 2
Gradient of QR.
mQR=5−29−3=36=2
Step 3
Both gradients are equal and they share the point Q, so P, Q, R lie on the same straight line.
Answer
mPQ=mQR=2, with Q as a common point — the three points are collinear.
Examiner tip
The mark scheme awards the final mark for explicitly stating "same gradient AND shared point". The examiner report flags candidates often forget the shared-point clause.
Key Formulae — Distance, Midpoint and Gradient
The formulae you need to memorise for distance, midpoint and gradient on the Cambridge IGCSE 0580 paper, with every variable defined in plain English and a note on when to use it.
Distance formula
d=(x2−x1)2+(y2−y1)2
(x1,y1)
first point
(x2,y2)
second point
When to use
Whenever you need the straight-line distance between two coordinate points.
Midpoint formula
M=(2x1+x2,2y1+y2)
When to use
Average of the coordinates — finds the point exactly halfway.
Gradient formula
m=x2−x1y2−y1
When to use
Slope of a line through two given points — rise over run.
Perpendicular gradient
m1⋅m2=−1⟺m2=−m11
When to use
Two lines are perpendicular when the product of their gradients is −1.
Key Definitions and Keywords — Distance, Midpoint and Gradient
Definitions to memorise and the exact keywords mark schemes credit for distance, midpoint and gradient answers — sharpened from recent examiner reports for the 2026 0580 sitting.
Distance between two points
Examiner keyword
The straight-line length of the segment joining them, found via Pythagoras' theorem in coordinate form.
Midpoint
Examiner keyword
The point exactly halfway between two given points; coordinates are the average of the endpoints.
Gradient
Examiner keyword
Steepness of a line; rise over run.
Parallel lines
Lines with equal gradients (m1=m2).
Perpendicular lines
Examiner keyword
Lines whose gradients multiply to −1 (m1m2=−1).
Common Mistakes and Misconceptions — Distance, Midpoint and Gradient
The traps other students keep falling into on distance, midpoint and gradient questions — taken from recent Cambridge IGCSE 0580 examiner reports and mark schemes — and how to avoid them.
✕Forgetting to square the differences inside the distance formula
▼
Why it happens
Students write d=x2−x1+y2−y1.
How to avoid it
Always: square each difference, ADD, then square root.
✕Subtracting instead of averaging in the midpoint formula
0580/22 — recurring
▼
Why it happens
Confusion with the gradient formula.
How to avoid it
Midpoint = ADD coordinates and divide by 2.
✕Computing y2−y1x2−x1 instead of x2−x1y2−y1
▼
Why it happens
Confusing rise/run with run/rise.
How to avoid it
Gradient is RISE over RUN — y on top, x on bottom.
✕Using the reciprocal as the perpendicular gradient (without negating)
▼
Why it happens
Half-remembering the rule.
How to avoid it
Perpendicular gradient = NEGATIVE RECIPROCAL. Both flip and change sign.
Distance, Midpoint and Gradient — frequently asked questions
The things students keep getting wrong in this sub-topic, answered.