Build y=mx+c from a gradient and a point, from two points, or from a graph, and read m and c from an equation. It is on Foundation and Higher, aimed at grade 5. Free questions with answers are on this page.
The equation of a straight line is y=mx+c (or ax+by+c=0). m is the gradient, c is the y-intercept. Given two points: find m, then substitute one point to find c. Given a gradient and a point: y−y1=m(x−x1) and rearrange.
A line parallel to y=3x−1 through (2,5) still has m=3, then 5=3×2+c gives c=−1, so y=3x−1 — which happens to be the same line if the point sits on it. Check by substituting the given point into your final equation.
y=mx+c. If you have a point and a gradient, substitute into y−y1=m(x−x1) or find c from y=mx+c. Rearrange 2y=6x+8 to y=3x+4 before you read m.
Objectives
Write the equation from a gradient and an intercept.
Write the equation through a point on the y-axis.
Read the gradient, and read the intercept, from y = mx + c.
Key points
Write the equation of a line from its gradient and y-intercept.
Find c by substituting a known point when the gradient is given.
Find the equation of the line through two points (gradient first, then c).
Rearrange equations such as 2y=6x+8 or x+y=5 into y=mx+c to read the gradient.
Worked examples
Example 1
Write down the equation of the line with gradient 2 and y-intercept 1.
2 marks
Identify the gradient m = 2 and y-intercept c = 1
Substitute into y = mx + c: y = 2x + 1
State the line equation: y=2x+1
Answer: y=2x+1
Common slips
Slip: Alan swapped m and c The gradient is the coefficient of x.
Slip: Alan wrote y = x + 2 m multiplies x, while c is the constant term.
Slip: Amber omitted y = An equation must have both sides.
Example 2
Write down the equation of the line through (0, 5) with gradient 2.
2 marks
Recognise that (0, 5) is the y-intercept, so c = 5
Combine with gradient m = 2: y = 2x + 5
State the full equation: y=2x+5
Answer: y=2x+5
Common slips
Slip: Brenda used 5 as the gradient A point on the y-axis gives c.
Slip: Brenda wrote y = 5x + 2 The gradient multiplies x.
Slip: Brenda wrote 2x + 5 Write the complete equation starting with y =.
Example 3
Write down the gradient of the line y=-2x+3.
3 marks
Identify the form y = mx + c where m is the multiplier of x
Read the coefficient of x including its sign: -2
State the gradient: -2
Answer: -2
Common slips
Slip: Chloe read the constant term 3 3 is the y-intercept c.
Slip: Chloe dropped the minus sign to write 2 The minus sign belongs to the coefficient.
Slip: Colin wrote -2x Gradient is a numerical value, not including x.
Questions and answers
GCSE Maths equation of a line questions and answers. Try each one, then open the answer. Easy questions come first.
Question 1 Easy2 marks
Write down the equation of the line with gradient 5 and y-intercept 2.
Show answer
Answer: y=5x+2
Gradient multiplies x: 5x.
Intercept is added: y = 5x + 2.
M1 — Gradient multiplies x: 5x.
A1 — Intercept is added: y = 5x + 2.
Question 2 Easy2 marks
Write down the equation of the line with gradient 3 and y-intercept -4.
Show answer
Answer: y=3x-4
Gradient multiplies x: 3x.
Negative intercept is subtracted: y = 3x - 4.
M1 — Gradient multiplies x: 3x.
A1 — Negative intercept is subtracted: y = 3x - 4.
Question 3 Medium2 marks
Write down the equation of the line through (0, 1) with gradient 4.
Show answer
Answer: y=4x+1
Point (0, 1) means intercept c = 1.
Gradient m = 4 gives y = 4x + 1.
M1 — Point (0, 1) means intercept c = 1.
A1 — Gradient m = 4 gives y = 4x + 1.
Question 4 Medium2 marks
Write down the equation of the line through (0, -2) with gradient 3.
Show answer
Answer: y=3x-2
Point (0, -2) means intercept c = -2.
Gradient m = 3 gives y = 3x - 2.
M1 — Point (0, -2) means intercept c = -2.
A1 — Gradient m = 3 gives y = 3x - 2.
Question 5 Hard2 marks
Write down the gradient of the line y=5x-1.
Show answer
Answer: 5
Read the coefficient of x.
Coefficient is 5.
M1 — Read the coefficient of x.
A1 — Coefficient is 5.
Question 6 Hard2 marks
Write down the gradient of the line y=-4x+1.
Show answer
Answer: -4
Read the coefficient of x including sign.
Coefficient is -4.
M1 — Read the coefficient of x including sign.
A1 — Coefficient is -4.
Question 7 Exam-style2 marks
Write down the equation of the line with gradient 4 and y-intercept -7.
Show answer
Answer: y=4x-7
The gradient is m = 4 and the intercept is c = -7.
Substitute into y = mx + c, so the equation is y = 4x - 7.
B1 — y = 4x + c or y = mx - 7
B1 — y = 4x - 7
Common mistakes
Most lost marks on this topic are one slip.
Swapping gradient and intercept
m is the multiplier of x; c is the standalone number
Dropping the minus sign from negative gradients or intercepts
Always preserve signs in front of coefficients and constants
Including x when stating the gradient
The gradient is purely the numerical coefficient m
Spot the slip
Ada is asked for the equation of the line with gradient 2 and intercept 1. She writes the intercept as the gradient. What is the equation?
y=2x+1
y=x+2
y=2+1
Show the slip
y=2x+1 The gradient multiplies x, and the intercept is added.
Exam tips
Be ready to do this without a calculator. Paper 1 is the non-calculator paper.
If the question says “show that”, the result is given. The marks are for the steps that reach it.
The method is the same on AQA-style and Edexcel-style papers.
Write 'y=mx+c' as your first line, then fill in m — markers look for that structure.
Always check the final equation with a second point; it converts a probable answer into a certain one.
Printable worksheet
The same questions are in a PDF you can print. Answers start on a later page.