Lemmara logo

The Equation y = mx + c

Read the gradient m and y-intercept c from y = mx + c, and write the equation of a line from a grid, a gradient, or two points.

71real exam questions on this topic
  • 9 steps
  • 9 min
  • 4 syllabuses

Try a real exam question on this

0580/12 · May/Jun 2026 · Q19 · 4 marks · Solve it step by step, the way the examiner marks it.

Loading the animated solution…

See the solution as text
Text version of the solution

Line L is y = 3x + 7. Find its gradient, then use the line to find p in point P(4, p) and w in point W(w, −11).

(a) 1 mark

State the gradient of line L from its equation.

  1. y = mx + c with m = 3
  2. Gradient = 3

Answer 3

(bi) 1 mark

Find the value of p for point P(4, p) on line L.

  1. p = 3 × 4 + 7
  2. p = 19

Answer 19

(bii) 2 marks

Find the value of w for point W(w, −11) on line L.

  1. Understand the question. Point W lies on line L, which has the equation y equals 3x plus 7, and W has y coordinate minus 11. We must find its x coordinate w.
  2. Use the line equation. W lies on line L, so its coordinates must satisfy y equals 3x plus 7.
  3. Substitute the coordinates. W has x equal to w and y equal to minus 11, so put w where x is and minus 11 where y is. Watch out. The first coordinate is x, not y.
  4. −11 = 3w + 7
  5. Rearrange to isolate the w term. Subtract 7 from both sides, and minus 11 minus 7 is minus 18.
  6. 3w = −18
  7. Divide both sides by 3. 3w divided by 3 is w, and minus 18 divided by 3 is minus 6.
  8. w = −6

Answer −6

The lesson, step by step

Step 1 of 9

What m and c Mean

Every straight line (except an upright one) has an equation of this form:

Formula

Key idea

Why does this work? c is the height where the line crosses the y-axis, where x is 0. m is the gradient, how much the line goes up for each 1 across.

So at any x, the height is the start c, plus m for every step across, which is c plus m times x.

m is the gradient: how far the line goes up for each 1 across. Minus means it goes down. c is where the line crosses the y-axis, at the point .

Equationm and c

Key idea

If y is not on its own, get it alone first: becomes , so .

See this step move in Lemmara

Step 2 of 9

When y Is Not Alone

Exams often give a line as . You can only read m and c when y is on its own, so get y alone first.

Worked example

  1. 1

    — The question. y is not alone: it has a 3 with it and a 2x beside it.

  2. 2

    — Take 2x from both sides, so only the y term is left on the left.

  3. 3

    — Divide both sides by 3. Every term on the right is divided, not just the first.

  4. 4

    — 12 ÷ 3 = 4. Now y is alone. Writing this line earns a mark for working.

  5. 5

    — m is the number with x, minus included. c = 4, so the line crosses the y-axis at (0, 4).

Common mistake

Dividing only the 12 by 3. The 2x must be divided by 3 too, or the gradient comes out as −2.

Key idea

A bracket hides c. Multiply it out first: , so c = −12, not −4.

See this step move in Lemmara

Step 3 of 9

The Equation of a Line on a Grid

The 3-mark question: “Find an equation for the line L.” Read c from the y-axis, then work out the gradient.

Worked example

  1. 1

    — L crosses the y-axis at (0, 1). That crossing is c.

  2. 2

    — Pick two points where L goes exactly through grid corners, so you read them without guessing.

  3. 3

    — From (0, 1) to (2, 4), y goes up 3 (1 to 4) while x goes across 2 (0 to 2).

  4. 4

    — Gradient = up ÷ across, so 3 ÷ 2 = 1.5.

  5. 5

    — Put m = 1.5 in front of x and c = 1 on its own.

A line going down. Read it the same way, but down means a minus.

Worked example

  1. 1

    — The line crosses the y-axis at (0, −1), so c = −1.

  2. 2

    — Two grid corners on the line.

  3. 3

    — y goes from −1 to −3, so it drops 2 while x goes across 3.

  4. 4

    — Down means the gradient is negative. Leave it as a fraction, because it is exact.

  5. 5

    — Put m and c in. c is −1, so the line ends “− 1”, not “+ 1”.

Common mistake

Doing across ÷ up. The gradient is up ÷ across. If the line goes down from left to right, the gradient is negative.

Key idea

Show your working: draw the triangle on the grid and write up ÷ across. That earns a mark even if your final answer slips. Start the answer with “y =”, not “L =”.

See this step move in Lemmara

Step 4 of 9

Gradient and y-Intercept Given

The 2-mark question: “Write down an equation of the line with gradient −4 through .” A point with x = 0 is on the y-axis, so it gives c.

Worked example

  1. 1

    — The gradient is given, so m = −4. Keep the minus.

  2. 2

    — Its x is 0, so this point is on the y-axis.

  3. 3

    — Where the line crosses the y-axis is c, so c = 7.

  4. 4

    — Put m in front of x and c on its own.

Common mistake

Giving the y-axis crossing as (7, 0). It is on the y-axis, so x is 0: the point is (0, 7).

See this step move in Lemmara

Step 5 of 9

Flat and Upright Lines

The 1-mark question: “Write down the equation of the line PQ”, where PQ is flat.

Worked example

  1. 1

    — Look at the points. The y value is 2 both times.

  2. 2

    — y never changes, so the line goes up 0 for every 1 across.

  3. 3

    — Put m = 0 and c = 2 into y = mx + c.

  4. 4

    — 0x is 0, so drop it. Every point on PQ has y = 2.

Upright lines. An upright (vertical) line is the one line that y = mx + c cannot describe. Here x stays fixed instead.

Worked example

  1. 1

    — Look at the points. The x value is 4 both times.

  2. 2

    — Every point on RS has x = 4, whatever its y. So its equation is x = 4.

Key idea

The axes are lines too: the y-axis is x = 0 and the x-axis is y = 0.

Common mistake

Mixing them up. A flat line keeps y fixed, so it is y = a number. An upright line keeps x fixed, so it is x = a number.

See this step move in Lemmara

Step 6 of 9

A Line Through Two Points

The 3-mark question: “Find an equation of the line through A and B.” Find m, then put one point in to find c.

Worked example

  1. 1

    — The two points. Keep each x with its own y.

  2. 2

    — y of B take away y of A. y falls by 12.

  3. 3

    — Same order: x of B take away x of A. Taking away −2 is the same as adding 2.

  4. 4

    — Gradient = change in y ÷ change in x. It is negative, so the line goes down.

  5. 5

    — A is on the line, so put x = −2, y = 7 and m = −2 into y = mx + c.

  6. 6

    — (−2) × (−2) = +4, because minus times minus is plus.

  7. 7

    — Take 4 from both sides: 7 − 4 = 3.

  8. 8

    — Put m and c in. Check with B: −2 × 4 + 3 = −5, which matches.

Key idea

The gradient line and the line where you put a point in each earn a mark, so write both down.

Key idea

For more on this, see Equation of a Line Through Two Points.

See this step move in Lemmara

Step 7 of 9

Where a Line Crosses the x-Axis

Exams also ask where a line crosses the x-axis. Every point on the x-axis has y = 0, so put y = 0 and solve.

Worked example

  1. 1

    — The line. We want the point where it meets the x-axis.

  2. 2

    — On the x-axis y is 0, so put 0 in place of y. This line earns a mark for working.

  3. 3

    — Take 9 from both sides, so the x term is alone.

  4. 4

    — Divide both sides by 2: −9 ÷ 2 = −4.5.

  5. 5

    — Give the point, not just x. Its y is 0 because it is on the x-axis.

Common mistake

Writing (0, −4.5). On the x-axis y is 0, and x always comes first, so the point is (−4.5, 0).

Key idea

For the y-axis put x = 0; for the x-axis put y = 0. This line crosses the y-axis at (0, 9).

See this step move in Lemmara

Step 8 of 9

A Point With a Missing Number

“The point (k, 11) is on the line . Find k.” A point is on a line when its x and y fit the equation, so put in the number you know.

Worked example

  1. 1

    — x always comes first, so x = k is missing and y = 11 is known.

  2. 2

    — Put y = 11 and x = k into y = 3 − 4x.

  3. 3

    — Take 3 from both sides: 11 − 3 = 8.

  4. 4

    — Divide both sides by −4. Positive ÷ negative is negative.

  5. 5

    — Check: put k = −2 back in. We get 11, the y we were given.

Key idea

If the missing number is y, just work it out: for (5, p) on this line, .

Common mistake

Putting 11 in place of x. In (k, 11), k is x and 11 is y.

See this step move in Lemmara

Step 9 of 9

Which Method? Read the Question

Find what you are given, then read off or work out m and c.

You seeYou do
y not alone, e.g. get y alone first, then read m and c
A line drawn on a gridc from the y-axis, m = up ÷ across
A gradient and (0, a number)write y = mx + c straight away
A flat liney = a number
An upright linex = a number
Two pointsm first, then put a point in for c
Where it crosses the x-axisput y = 0 and solve
A point with a missing numberput the known number in and solve
Draw the line from its equationDrawing Straight-Line Graphs

Key idea

Check your equation: put a point you know into it. Both sides must match.

See this step move in Lemmara

More real exam questions on this

Solve one in Lemmara and see where every mark goes.

All 71 questions on this topic

Lemmara is an independent study tool, not affiliated with or endorsed by Cambridge International Education or Pearson Edexcel. The lessons and worked examples are Lemmara’s own.

Try a real exam question on this

Solve it →