Cambridge IGCSE · Topic 3.5
IGCSE Maths 0580 / Topic 3 / IGCSE

Two numbers, one line.

Every non-vertical straight line can be written as \(y = mx + c\). Read \(m\) and \(c\) and you know the line; find \(m\) and \(c\) and you can write its equation.

The key idea

In \(y = mx + c\), \(m\) is the gradient and \(c\) is the \(y\)-intercept (the line crosses the \(y\)-axis at \((0, c)\)). To find an equation: get the gradient, then substitute one point to find \(c\). A vertical line has equation \(x = k\).

−2 −1 1 2 3 4 5 −4 −3 −2 −1 1 2 3 4 5 6 x y (0, −3) run 1 rise 2 y = 2x − 3 gradient m = 2 ÷ 1 = 2 y-intercept c = −3
Fig. 1: y = 2x - 3 crosses the y-axis at (0, -3) and rises 2 for every 1 across, so m = 2 and c = -3
Section 01

Gradient and intercept.

In the lab, set \(m\) and \(c\) with the sliders. Change only \(c\): the line slides up and down but keeps its slope. Change only \(m\): the line pivots about the point \((0, c)\). Then set \(m = 2\), \(c = -3\) and compare with Fig. 1.

Worked example Reading the gradient and intercept
Write down the gradient and \(y\)-intercept of (a) \(y = 6x + 3\) (b) \(y = 5 - 2x\).
  1. (a) The coefficient of \(x\) is 6 and the constant is 3.
  2. (b) Rewrite as \(y = -2x + 5\): the coefficient of \(x\) is \(-2\) (the minus sign belongs to it).
Answer: (a) \(m = 6\), \(c = 3\)   (b) \(m = -2\), \(c = 5\)
Worked example Equation from a graph
A straight line crosses the \(y\)-axis at \((0, -3)\) and passes through \((2, 1)\). Find its equation.
  1. The \(y\)-intercept is \(-3\), so \(c = -3\).
  2. From \((0, -3)\) to \((2, 1)\): rise 4, run 2, so \(m = 4 \div 2 = 2\).
  3. Put both into \(y = mx + c\).
Answer: \(y = 2x - 3\) (Fig. 1)
Examiner trap

Taking the first number as the gradient. In \(y = 5 - 2x\) the gradient is \(-2\), not 5: the gradient is always the number in front of \(x\), with its sign.

Section 02

Rearrange to y =.

(Extended) A line may be given as \(ax + by = c\), such as \(5x + 4y = 8\). To read the gradient and intercept, make \(y\) the subject first.

Worked example From ax + by = c (Extended)
Find the gradient and \(y\)-intercept of the line \(5x + 4y = 8\).
  1. Subtract \(5x\) from both sides: \(4y = -5x + 8\).
  2. Divide EVERY term by 4: \(y = -\dfrac{5}{4}x + 2\).
Answer: Gradient \(-\dfrac{5}{4}\), \(y\)-intercept 2
Worked example y term not first (Extended)
Find the gradient of the line \(2y - 6x = 7\).
  1. Add \(6x\) to both sides: \(2y = 6x + 7\).
  2. Divide every term by 2: \(y = 3x + 3.5\).
Answer: Gradient 3 (and \(y\)-intercept 3.5)
Your turn
(Extended) Find the gradient and \(y\)-intercept of \(3x - 2y = 6\).
Examiner trap

Dividing only some of the terms. From \(4y = -5x + 8\), the equation \(y = -5x + 2\) divides only the 8 by 4. Every term on the right must be divided.

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

What is the gradient of the line \(y = 7 - 3x\)?

Quick check+10 XP

Where does the line \(y = 4x - 9\) cross the \(y\)-axis?

Quick check+10 XP

Which is the equation of the line with gradient 5 and \(y\)-intercept \(-2\)?

Quick check+10 XP

Which is the equation of the vertical line through \((3, -1)\)?

Section 03

Finding the equation.

Whatever you are given, the plan is the same: find the gradient \(m\), substitute the coordinates of one point on the line into \(y = mx + c\) to find \(c\), then write the equation in its simplest form.

Worked example Gradient and one point
Find the equation of the line with gradient 3 that passes through \((2, 1)\).
  1. \(y = 3x + c\).
  2. Substitute \(x = 2\), \(y = 1\): \(1 = 3 \times 2 + c = 6 + c\).
  3. So \(c = 1 - 6 = -5\).
Answer: \(y = 3x - 5\)
Worked example Two points (Extended)
Find the equation of the line through \((-1, 7)\) and \((3, -1)\). Give it in the form \(ax + by = c\).
  1. \(m = \dfrac{-1 - 7}{3 - (-1)} = \dfrac{-8}{4} = -2\).
  2. Substitute \((-1, 7)\) into \(y = -2x + c\): \(7 = 2 + c\), so \(c = 5\).
  3. \(y = -2x + 5\). Check with \((3, -1)\): \(-6 + 5 = -1\). Correct.
  4. Add \(2x\) to both sides: \(2x + y = 5\).
Answer: \(y = -2x + 5\), or \(2x + y = 5\)
Worked example A vertical line
Find the equation of the line through \((4, -1)\) and \((4, 6)\).
  1. Both points have \(x = 4\), so the line is vertical.
  2. Every point on it has \(x\)-coordinate 4.
Answer: \(x = 4\)
Examiner trap

Putting the coordinates in the wrong places: for the point \((2, 1)\), \(x = 2\) and \(y = 1\). Writing \(2 = 3 \times 1 + c\) gives the wrong \(c\). Always check your final equation with the point.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 2 and Paper 4 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

(Extended) Find the gradient and \(y\)-intercept of the line \(5x + 4y = 8\).

Exam style+20 XP

Find the equation of the line with gradient 3 that passes through \((2, 1)\).

Exam style+20 XP

(Extended) Find the equation of the line through \((-2, -1)\) and \((4, 8)\).

Exam style+20 XP

A straight-line graph crosses the \(y\)-axis at \((0, 4)\) and the \(x\)-axis at \((6, 0)\). What is its equation?

Skill unlocked

Straight-line equations, cracked.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Reading \(m\) and \(c\), rearranging \(ax + by = c\), the line through a point or two points, and a plumber's charges as a straight line.