GCSE Equation of a Straight Line

Step-by-step worked examples and graded practice questions on finding the equation of a straight line — from a gradient and a point, from two points, and by rearranging into y = mx + c.

📚 Foundation & Higher ✅ 15 Practice Questions 🔍 Full Worked Examples ⚠️ Common Mistakes

The equation y = mx + c

Every straight line (that isn't vertical) can be written in the form y = mx + c, where m is the gradient and c is the y-intercept. At GCSE you need to be able to find this equation from:

  • A gradient and a single point
  • Two points on the line
  • An equation that isn't yet in y = mx + c form
  • The x- and y-intercepts

You also need to recognise the equations of horizontal and vertical lines, which don't fit the usual pattern.

From a gradient and a point

If you know the gradient m and a point (x₁, y₁) on the line, substitute into:

y − y₁ = m(x − x₁)

then expand and rearrange into y = mx + c form.

Worked Example 1 — Gradient and a point
Find the equation of the line with gradient −2 passing through (3, 7)
1
Substitute into y − y₁ = m(x − x₁): y − 7 = −2(x − 3)
2
Expand: y − 7 = −2x + 6
3
Rearrange: y = −2x + 13
Answery = −2x + 13
2026-07-14T07:58:57.534500 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/

The line with gradient −2 through (3, 7): y = −2x + 13.

From two points

If you're given two points instead of a gradient, calculate the gradient first using m = (y₂ − y₁) / (x₂ − x₁), then substitute one of the points into y − y₁ = m(x − x₁) as before.

Worked Example 2 — Two points
Find the equation of the line passing through (1, 4) and (5, −4)
1
Find the gradient: m = (−4 − 4) / (5 − 1) = −8 / 4 = −2
2
Substitute the point (1, 4): y − 4 = −2(x − 1)
3
Expand and rearrange: y − 4 = −2x + 2 → y = −2x + 6
Answery = −2x + 6
2026-07-13T13:39:22.126834 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/

The line through (1, 4) and (5, −4): y = −2x + 6.

Rearranging into y = mx + c

Not every equation of a line is given in y = mx + c form. Use inverse operations to get y on its own, keeping the equation balanced at every step.

Worked Example 3 — Rearranging
Rearrange 4x + 2y = 10 into the form y = mx + c
1
Subtract 4x from both sides: 2y = 10 − 4x
2
Divide every term by 2: y = 5 − 2x, or equivalently y = −2x + 5
Answery = −2x + 5

Horizontal and vertical lines

A horizontal line through a point with y-coordinate b has the equation y = b — every point on it shares the same y-value. A vertical line through a point with x-coordinate a has the equation x = a — it cannot be written in y = mx + c form, since its gradient is undefined.

Worked Example 4 — Horizontal and vertical lines
State the equation of the horizontal line through (3, −6), and the equation of the vertical line through (3, −6)
1
Horizontal line: every point has y = −6, so the equation is y = −6
2
Vertical line: every point has x = 3, so the equation is x = 3
Answery = −6 and x = 3
2026-07-13T13:39:22.224679 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/

The horizontal line y = −6 and the vertical line x = 3, both passing through (3, −6).

From x- and y-intercepts

If you know where a line crosses both axes, you have two points to work with: (a, 0) on the x-axis and (0, c) on the y-axis. The y-intercept gives you c directly, and you can find the gradient using the two points as usual.

Worked Example 5 — From intercepts
A line has x-intercept 4 and y-intercept −8. Find its equation.
1
The line passes through (4, 0) and (0, −8)
2
Find the gradient: m = (−8 − 0) / (0 − 4) = −8 / −4 = 2
3
The y-intercept is c = −8, so the equation is y = 2x − 8
Answery = 2x − 8
2026-07-13T13:39:22.328124 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/

The line through x-intercept (4, 0) and y-intercept (0, −8): y = 2x − 8.

Practice questions

Work through each question before checking the answers. Difficulty is shown for each question.

Foundation (Grade 3–5)

Q1Find the equation of the line with gradient 3 passing through (0, 2)Foundation
Q2Find the equation of the line with gradient −1 passing through (4, 0)Foundation
Q3A line has gradient 5 and y-intercept −2. Write its equation.Foundation
Q4State the equation of the horizontal line passing through (7, 9)Foundation
Q5State the equation of the vertical line passing through (−3, 5)Foundation

Higher (Grade 5–7)

Q6Find the equation of the line passing through (2, 1) and (6, 9)Higher
Q7Rearrange 3y − 6x = 12 into the form y = mx + cHigher
Q8Find the equation of the line with gradient −3/4 passing through (8, −2)Higher
Q9Find the equation of the line passing through (−2, 5) and (2, −3)Higher
Q10A line has x-intercept 6 and y-intercept 3. Find its equation.Higher

Higher — Hard (Grade 8–9)

Q11Find the equation of the line parallel to y = 3x − 1 that passes through (4, 10)Grade 8–9
Q12Find the equation of the line perpendicular to y = ½x + 4 that passes through (2, −1)Grade 8–9
Q13The line 2x + ky = 10 passes through (3, 4). Find k, then write the equation in y = mx + c form.Grade 8–9
Q14A line passes through (a, 3) and (a + 2, 11) and has gradient 4 for any value of a. Show this is consistent, then find the equation of the line when a = 1.Grade 8–9
Q15The lines y = 2x + 3 and y = −x + 9 intersect at point P. Find the equation of the line through P with gradient −½.Grade 8–9

Answers

Foundation (Q1–Q5)

Q1y = 3x + 2((0, 2) is the y-intercept, so c = 2)
Q2y = −x + 4(y − 0 = −1(x − 4))
Q3y = 5x − 2
Q4y = 9
Q5x = −3

Higher (Q6–Q10)

Q6y = 2x − 3(m = (9−1)/(6−2) = 2; y − 1 = 2(x − 2))
Q7y = 2x + 4(3y = 12 + 6x → y = 4 + 2x)
Q8y = −(3/4)x + 4(y + 2 = −3/4(x − 8) → y + 2 = −3/4x + 6)
Q9y = −2x + 1(m = (−3−5)/(2−(−2)) = −2; y − 5 = −2(x + 2))
Q10y = −(1/2)x + 3(points (6,0) and (0,3); m = (3−0)/(0−6) = −1/2; c = 3)

Higher — Hard (Q11–Q15)

Q11y = 3x − 2(parallel → same gradient 3; y − 10 = 3(x − 4))
Q12y = −2x + 3(perpendicular gradient = −2; y + 1 = −2(x − 2))
Q13k = 1; y = −2x + 10(2(3) + k(4) = 10 → 4k = 4 → k = 1; 2x + y = 10 → y = 10 − 2x)
Q14Gradient = 8/2 = 4 regardless of a, confirming it's consistent. When a = 1: y = 4x − 1(points (1,3) and (3,11); y − 3 = 4(x − 1))
Q15y = −(1/2)x + 8(intersection: 2x+3=−x+9 → x=2, y=7; y − 7 = −1/2(x − 2))

Common mistakes

These are the errors Alamin sees most frequently with equations of straight lines at GCSE. Recognising them now will save you marks in the exam.

Common Mistake 1
Forgetting to find c after finding the gradient
Some students write y = mx and stop there. You must substitute a point to find the value of c — the equation isn't finished without it.
Common Mistake 2
Sign errors when rearranging
When rearranging 4x + 2y = 10, every term must be treated the same way. Dividing only the constant by 2 and forgetting to divide the x-term is a common error — divide the whole equation, term by term.
Common Mistake 3
Mixing up horizontal and vertical line equations
A horizontal line has the equation y = (a number). A vertical line has the equation x = (a number). Students often swap these two round, especially under exam pressure.
Common Mistake 4
Substituting the wrong coordinate into y − y₁ = m(x − x₁)
Make sure the y-value and x-value you substitute come from the same point. Mixing the x from one point with the y from another gives a completely wrong equation.
Common Mistake 5
Not checking the final answer
Once you have an equation, substitute one of the original points back in to check it works. This quick check catches most arithmetic slips before you lose marks.
Common Mistake 6
Confusing the rules for parallel and perpendicular lines
Parallel lines have the exact same gradient. Perpendicular lines have gradients that are negative reciprocals of each other (they multiply to −1). Mixing up which rule applies is a very common exam error.

Want to improve your grade faster?

If finding the equation of a line is still causing problems, Alamin's diagnostic approach identifies exactly which skills are missing and builds a targeted plan to address them — with AI-powered practice between sessions to reinforce what's been taught.

Book an Assessment Session (£60)

No upfront payment required — payment is taken after confirmation.