Salam Academy
Contents · 0% complete
  1. Learning objectives
  2. Core idea
  3. Key formulae
  4. Worked examples
  5. Explore the graph
  6. Common mistakes
  7. Exam tip
  8. Guided practice
  9. Practice questions
  10. Challenge
  11. Exam-style questions
  12. Summary
  13. Quick quiz
  14. Same topic, different board
  15. Past paper questions
Straight-line graphs · Subtopic 1 of 3

Gradient, Length, Midpoint and Equations of Lines

The three measurements of a line segment (gradient, length and midpoint), the three forms of the equation of a straight line, and how to find where lines cross.

4037 past papers

Cambridge 9709 Paper 1Edexcel YMA01 WMA11Edexcel 9MA0 Paper 1Edexcel 9MA0 Paper 2AQA 7357 Paper 1AQA 7357 Paper 2≈ 35 minRevision 8 · updated
On the Cambridge 4037 syllabus (2025–2027): 2 points this lesson covers
  • 7.1 Equations of straight lines
  • 7.3 Midpoints, lengths and perpendicular bisectors

Summarised in our own words from the official syllabus. Check the exact wording in the board's specification.

Practise this topicTimed testAsk Salam Tutor
Section 1 of 15

Learning objectives

  • Find the gradient, length and midpoint of a line segment, and work backwards from them.
  • Write the equation of a line in the forms y=mx+cy=mx+c, y−y1=m(x−x1)y-y_1=m(x-x_1) and ax+by+c=0ax+by+c=0.
  • Read the gradient and intercept from any form of the equation.
  • Find where two lines intersect, check whether points are collinear, and find simple areas.
Pause and think

A line goes through (0,1)(0,1) and (2,7)(2,7). Without any formula: how much does yy go up each time xx goes up by 11?

Section 2 of 15

Core idea

Start hereDescribing a road with two numbers

A road sign says "Gradient 1 in 10": for every 1010 m you go along, you climb 11 m. A map gives the road's start and end as grid references. From just two points you can work out how steep the road is, how long it is, where its halfway café should go, and a formula for every point on it. That's coordinate geometry: turning shapes into numbers so algebra can answer geometric questions.

The big idea

From two points A(x1,y1)A(x_1,y_1) and B(x2,y2)B(x_2,y_2) you get the gradient m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}, the length (x2−x1)2+(y2−y1)2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}, the midpoint (x1+x22,y1+y22)\left(\frac{x_1+x_2}2,\frac{y_1+y_2}2\right), and the line's equation y−y1=m(x−x1)y-y_1=m(x-x_1).

1. Gradient: rise over run

Gradientm=riserun=y2−y1x2−x1m=\frac{\text{rise}}{\text{run}}=\frac{y_2-y_1}{x_2-x_1}
where
(x1,y1)(x_1,y_1), (x2,y2)(x_2,y_2)
the two points; the small numbers are labels, not powers.
y2−y1y_2-y_1
the rise: how far up (negative means down).
x2−x1x_2-x_1
the run: how far across.
A(1, 2) to B(5, 10): the run and the rise
−55102468100xyy = 2xrun = 4rise = 8A(1, 2)B(5, 10)midpoint M(3, 6)
Gradient =riserun=84=2=\dfrac{\text{rise}}{\text{run}}=\dfrac84=2. Length AB=42+82=80=45AB=\sqrt{4^2+8^2}=\sqrt{80}=4\sqrt5. Midpoint =(1+52,2+102)=(3,6)=\left(\dfrac{1+5}{2},\dfrac{2+10}{2}\right)=(3,6).
Worked exampleGradients of two segments

Find the gradient of ABAB with A(1,2)A(1,2), B(5,10)B(5,10), and of PQPQ with P(−2,3)P(-2,3), Q(4,−1)Q(4,-1).

Goal
Two gradients, with correct signs.
Strategy
Subtract in the same order on top and bottom; use brackets for negatives.
  1. mAB=10−25−1=84=2m_{AB}=\frac{10-2}{5-1}=\frac84=2
    Up 2 for every 1 across.
  2. mPQ=−1−34−(−2)=−46=−23m_{PQ}=\frac{-1-3}{4-(-2)}=\frac{-4}{6}=-\frac23
    4−(−2)=64-(-2)=6; negative gradient: downhill.
Answer22 and −23-\frac23.
✓ CheckReversing the order: 3−(−1)−2−4=4−6=−23\frac{3-(-1)}{-2-4}=\frac4{-6}=-\frac23 ✓ (order doesn't matter if consistent).
  • m>0m>0: uphill (left to right); m<0m<0: downhill.
  • m=0m=0: horizontal line y=ky=k.
  • Vertical line x=kx=k: the run is 00, so the gradient is undefined.
Common misconceptionMixed order y2−y1x1−x2\frac{y_2-y_1}{x_1-x_2} gives the wrong sign. Same point first on top and bottom.

2. Length: Pythagoras on the grid

The distance formula
  1. run=x2−x1,rise=y2−y1\text{run}=x_2-x_1,\qquad\text{rise}=y_2-y_1
    The two shorter sides of a right-angled triangle with hypotenuse ABAB.
  2. AB2=(x2−x1)2+(y2−y1)2AB^2=(x_2-x_1)^2+(y_2-y_1)^2
    Pythagoras: hypotenuse² = sum of the other two squared.
  3. AB=(x2−x1)2+(y2−y1)2AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
    Square root (length is positive).
For A(1,2)A(1,2), B(5,10)B(5,10): 16+64=80=45≈8.94\sqrt{16+64}=\sqrt{80}=4\sqrt5\approx8.94.

3. Midpoint: the average

Halfway along, you've done half the run and half the rise: x=x1+12(x2−x1)=x1+x22x=x_1+\frac12(x_2-x_1)=\frac{x_1+x_2}2, and similarly for yy. So the midpoint's coordinates are the averages.

Worked exampleWorking backwards from a midpoint

M(4,1)M(4,1) is the midpoint of A(1,−3)A(1,-3) and BB. Find BB.

Goal
Coordinates of B(x,y)B(x,y).
Strategy
Write the midpoint formula with unknowns and solve each coordinate.
  1. 1+x2=4⇒1+x=8⇒x=7\frac{1+x}2=4\Rightarrow1+x=8\Rightarrow x=7
    xx-coordinates.
  2. −3+y2=1⇒−3+y=2⇒y=5\frac{-3+y}2=1\Rightarrow-3+y=2\Rightarrow y=5
    yy-coordinates.
AnswerB(7,5)B(7,5).
✓ CheckMidpoint of (1,−3)(1,-3) and (7,5)(7,5) is (4,1)(4,1) ✓.

4. The equation of a line

Point–gradient form y−y1=m(x−x1)y-y_1=m(x-x_1)
  1. Let (x,y) be any other point on the line.\text{Let }(x,y)\text{ be any other point on the line.}
    We want a rule every point obeys.
  2. y−y1x−x1=m\frac{y-y_1}{x-x_1}=m
    The gradient from (x1,y1)(x_1,y_1) to (x,y)(x,y) must equal mm (a straight line has constant gradient).
  3. y−y1=m(x−x1)y-y_1=m(x-x_1)
    Multiply both sides by (x−x1)(x-x_1).
Expanding gives y=mx+cy=mx+c, where c=y1−mx1c=y_1-mx_1 is the yy-intercept.
y = mx + 1 as the gradient m changes
−4−3−2−11234−4−22460xyy-intercept (0, 1)
The gradient is how much yy goes up when xx goes up by 11.
Worked exampleLine through (3,−1)(3,-1) with gradient −23-\tfrac23

Find the equation in the form ax+by+c=0ax+by+c=0 with integers.

Goal
Integer coefficients.
Strategy
Point–gradient form, clear the fraction, collect.
  1. y+1=−23(x−3)y+1=-\tfrac23(x-3)
    y−(−1)=y+1y-(-1)=y+1.
  2. 3y+3=−2(x−3)3y+3=-2(x-3)
    Multiply both sides by 33.
  3. 3y+3=−2x+63y+3=-2x+6
    Expand.
  4. 2x+3y−3=02x+3y-3=0
    Add 2x2x, subtract 66.
Answer2x+3y−3=02x+3y-3=0.
✓ Check(3,−1)(3,-1): 6−3−3=06-3-3=0 ✓. Gradient: y=−23x+1y=-\frac23x+1 ✓.
Worked exampleWhere two lines meet

Find where y=2xy=2x meets x+y=9x+y=9.

Goal
The intersection point.
Strategy
The point satisfies both equations: solve simultaneously.
  1. x+2x=9⇒x=3x+2x=9\Rightarrow x=3
    Substitute y=2xy=2x.
  2. y=6y=6
    Back into y=2xy=2x.
Answer(3,6)(3,6).
✓ Check3+6=93+6=9 ✓.
Pause and think

Where does 3x+4y=243x+4y=24 cross each axis, and how far apart are those points?

Straight-line formulae
QuantityFormula
Gradientm=y2−y1x2−x1m=\frac{y_2-y_1}{x_2-x_1}
Equationy−y1=m(x−x1)y-y_1=m(x-x_1)
Midpoint(x1+x22,y1+y22)\left(\frac{x_1+x_2}2,\frac{y_1+y_2}2\right)
Distance(x2−x1)2+(y2−y1)2\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
Quick check

Find the midpoint and length of the segment from (1, 2) to (7, 10).

Summary

  • Gradient = rise/run.
  • Length by Pythagoras; midpoint by averages.
  • y−y1=m(x−x1)y-y_1=m(x-x_1); y=mx+cy=mx+c.
  • Intersections: solve simultaneously.
Key words
Gradient
Rise per unit run; steepness.
Intercept
Where a line crosses an axis.
HistoryWhy they are called Cartesian coordinates. In 1637 the French philosopher René Descartes published La Géométrie, showing how to describe curves with equations. Pierre de Fermat had the same idea at about the same time. Coordinates are named "Cartesian" after Descartes, whose Latin name was Renatus Cartesius.
Fun factThe fly on the ceiling (probably a legend). A popular story says Descartes invented coordinates while lying in bed watching a fly crawl across the ceiling, realising he could describe its position by its distances from two walls. There is no evidence it is true, but it is a perfect picture of what (x,y)(x,y) means.
Section 3 of 15

Key formulae

For A(x₁, y₁) and B(x₂, y₂)m=y2−y1x2−x1AB=(x2−x1)2+(y2−y1)2midpoint M=(x1+x22, y1+y22)\begin{gathered}m=\frac{y_2-y_1}{x_2-x_1}\qquad AB=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2} \\[4pt] \text{midpoint }M=\left(\frac{x_1+x_2}2,\ \frac{y_1+y_2}2\right)\end{gathered}
Three forms of a straight liney=mx+cy−y1=m(x−x1)ax+by+c=0from ax+by+c=0:  m=−ab\begin{gathered}y=mx+c\qquad y-y_1=m(x-x_1)\qquad ax+by+c=0 \\[3pt] \text{from }ax+by+c=0:\ \ m=-\frac ab\end{gathered}
NoteWhich form to give? Use y−y1=m(x−x1)y-y_1=m(x-x_1) to find the line: it needs no rearranging. Then give the answer in the form the question asks for. "ax+by+c=0ax+by+c=0 where aa, bb and cc are integers" means clear all fractions first.
Section 4 of 15

Worked examples

Example 1 · All three measurements0 / 3 steps
AA is (−3,4)(-3,4) and BB is (5,−2)(5,-2). Find the gradient, the length and the midpoint of ABAB.
Example 2 · Equation from two points0 / 3 steps
Find the equation of the line through (1,2)(1,2) and (4,11)(4,11) in the form ax+by+c=0ax+by+c=0.
Example 3 · Working backwards from a midpoint0 / 2 steps
M(3,5)M(3,5) is the midpoint of ABAB, where AA is (1,2)(1,2). Find BB.
Example 4 · Where two lines cross0 / 2 steps
Find the point of intersection of 2x+y=72x+y=7 and x−y=2x-y=2.
Section 5 of 15

Explore the graph

Two points, three measurements
Interactive graph
Try this
  1. The two value rows show the gradient and the length of the segment. Check they match Example 1: −34-\tfrac34 and 1010.
  2. Make b=db=d. What is the gradient of a horizontal line?
  3. Make a=ca=c. Why does the gradient row show an error? (A vertical line has an undefined gradient, and its equation is x=ax=a.)

The middle point is the midpoint. Try to predict where it will be before you move a slider.

TrickThe step trick for midpoints and ends. Find the step from one point to the midpoint (for example, right 22, up 33), then take the same step again to get the other end. It is quicker than solving two equations and much harder to get wrong.
In the real worldScreens count downwards. On a computer screen, pixel coordinates start at the top-left corner and yy increases downwards. Game designers flip the sign of every gradient, which is why a "rising" line on screen has a negative gradient in their code.
Section 6 of 15

Common mistakes

IncorrectGradient =x2−x1y2−y1=\dfrac{x_2-x_1}{y_2-y_1}
Correcty2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1}
Gradient is "up over across": change in yy on top.
Incorrect3x+4y=123x+4y=12 has gradient 33
Correct−34-\tfrac34
Rearrange to y=−34x+3y=-\tfrac34x+3 before reading the gradient.
Incorrect(5−(−3))2+(−2−4)2=22+62\sqrt{(5-(-3))^2+(-2-4)^2}=\sqrt{2^2+6^2}
Correct82+62\sqrt{8^2+6^2}
5−(−3)=85-(-3)=8: subtracting a negative adds.
Incorrecty−2=3(x−1)⇒y=3x−3−2y-2=3(x-1)\Rightarrow y=3x-3-2
Correcty=3x−3+2=3x−1y=3x-3+2=3x-1
Move the −2-2 across by adding 22.
  1. Gradient is run over rise

  2. Gradient is rise over run

  3. Gradient is y2−y1x2−x1\dfrac{y_2-y_1}{x_2-x_1} and I keep the order the same on top and bottom

Section 7 of 15

Exam tip

Exam tipKeep fractions exact. If a gradient is −34-\tfrac34, keep it as a fraction. Decimals like −0.75-0.75 are fine, but 13\tfrac13 as 0.3330.333 loses accuracy marks in the next step. Answers such as 52\sqrt{52} should be simplified to 2132\sqrt{13} when asked for exact form.
Section 8 of 15

Guided practice

SA-9709-P1-CG-G014 marksEasyCalculatorEquations
AA is (1, 2)(1,\,2) and BB is (5, 10)(5,\,10). Find the gradient of ABAB, the midpoint of ABAB, and the length of ABAB in exact form.

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
Section 9 of 15

Practice questions

Easy · 4 questions · One idea at a time

SA-9709-P1-CG1-0012 marksEasyCalculatorGradient & midpoint
Find the gradient of the line through (−3,4)(-3,4) and (5,−2)(5,-2).

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
SA-9709-P1-CG1-0032 marksEasyCalculatorGradient & midpoint
M(3,5)M(3,5) is the midpoint of ABAB, where AA is (1,2)(1,2). Find the coordinates of BB.

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
SA-9709-P1-CG-0012 marksEasyCalculatorEquations
Find the equation of the line with gradient 33 passing through (2, −1)(2,\,-1), in the form y=mx+cy=mx+c.

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
SA-9709-P1-CG-0032 marksEasyCalculatorEquations
The line LL has equation 3x+4y=123x+4y=12. State the gradient of LL and the yy-coordinate where LL crosses the yy-axis.

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
4 more practice questions with hints, worked solutions and instant marking
Included in Student Premium.
See Premium

More questions on every skill in this subtopic are in the question bank under Practise.

Section 10 of 15

Challenge

1 more challenge question with hints, worked solutions and instant marking
Included in Student Premium.
See Premium
Section 11 of 15

Exam-style questions

Questions set out the way exam papers set them, many with a diagram, table or graph to read. They are grouped by difficulty: start with Easy and work up to Hard.

SA-9709-P1-CG1-0022 marksEasyCalculatorGradient & midpoint
Find the midpoint of (−4,7)(-4,7) and (6,−3)(6,-3).

Sign in or create a free account to check answers, get hints and track your progress.

Salam Academy Original Practice · Proposed mark scheme
7 more exam-style questions with hints, worked solutions and instant marking
Included in Student Premium.
See Premium
Section 12 of 15

Summary

  • Gradient: change in yy over change in xx. Length: Pythagoras. Midpoint: average the coordinates.
  • Find the line with y−y1=m(x−x1)y-y_1=m(x-x_1), then rearrange to the form asked for.
  • For ax+by+c=0ax+by+c=0, the gradient is −ab-\tfrac ab.
  • Intersections: solve the two equations simultaneously.
Section 13 of 15

Quick quiz

3 more quiz questions with hints, worked solutions and instant marking
Included in Student Premium.
See Premium
Section 14 of 15

Same topic, different board

Specification
9709 AS & A Level Mathematics
Where
Paper 1, Pure Mathematics 1 · 1.3 Coordinate geometry
Expected
Find the equation of a straight line given sufficient information; interpret and use y = mx + c, y − y₁ = m(x − x₁) and ax + by + c = 0; use the distance between two points, the midpoint, the gradient and points of intersection.
Calculator
Permitted, but give coordinates and lengths exactly (fractions and surds) unless told otherwise.
Typical style
Often the opening steps of a longer question: find a gradient, then an equation, then a point of intersection or an area.
Open in
9709 · Paper 10606 · Papers 1, 24037 · Papers 1, 2
Section 15 of 15

Past paper questions

No past paper questions are tagged to this subtopic yet. We add papers every week.

4037 past papers

Salam Academy original content · Content status: reviewed and published. Syllabus mapping: Cambridge International 4037, 2025–2027 (official specification).