Home / IGCSE Mathematics 0580 / Equations of linear graphs
Cambridge IGCSE Mathematics 0580 · Coordinate geometry

Equations of linear graphs

What the m and the c in y=mx+c mean, how to read them from an equation, how to find the equation of a line drawn on a grid, vertical and horizontal lines, and what the gradient and intercept mean in a real situation. Extended: lines written as ax+by=c, and the equation of a line through two points.

C3.5E3.5Core and ExtendedFree lesson
What the syllabus says

C3.5 (Core)

  • Interpret and obtain the equation of a straight-line graph in the form y=mx+c.

Notes and examples

  • Questions may:
  • use and request lines in the forms y=mx+c x=k
  • involve finding the equation when the graph is given
  • ask for the gradient or y-intercept of a graph from an equation, e.g. find the gradient and y-intercept of the graph with the equation y=6x+3.
  • Candidates are expected to give equations of a line in a fully simplified form.

E3.5 (Extended)

  • Interpret and obtain the equation of a straight-line graph.

Notes and examples

  • Questions may:
  • use and request lines in different forms, e.g. ax+by=c y=mx+c x=k
  • involve finding the equation when the graph is given
  • ask for the gradient or y-intercept of a graph from an equation, e.g. find the gradient and y-intercept of the graph with equation 5x+4y=8.
  • Candidates are expected to give equations of a line in a fully simplified form.

Quoted from the Cambridge IGCSE Mathematics 0580 syllabus for 2025 to 2027.

What y = mx + c means

Every straight line that is not vertical has an equation that can be written

y=mx+c

The equation is a rule that every point on the line obeys: put in the x-coordinate of any point on the line and it gives that point's y-coordinate.

  • m is the gradient: how much y changes for every 1 unit increase in x.
  • c is the y-intercept: where the line crosses the y-axis, at the point (0,c).

Why the two numbers mean this. Put x=0 into y=mx+c and you get y=c, so the line passes through (0,c), which is on the y-axis. Now increase x by 1: mx goes up by exactly m, so y goes up by m. That is the definition of the gradient.

For example, y=6x+3 has gradient 6 and y-intercept 3: it crosses the y-axis at (0,3) and rises 6 for every 1 across.

Reading the gradient and intercept from an equation

Before you read anything off, make sure the equation starts "y=", with y on its own. Then:

  • the gradient is the number multiplying x, including its sign;
  • the y-intercept is the number on its own, including its sign.

The terms can come in either order. y=7−4x is the same line as y=−4x+7, so its gradient is −4 and its y-intercept is 7. A common slip is to take the first number you see as the gradient.

Watch the hidden numbers:

  • y=x−5: the gradient is 1, because x means 1x.
  • y=−x: the gradient is −1 and the y-intercept is 0. The line goes through the origin.
  • y=12x+4: the gradient is 12.

Vertical and horizontal lines

Two kinds of line have very short equations.

  • Horizontal lines have equations y=k, for a number k. Every point on the line y=3 has y-coordinate 3, wherever it is across. Its gradient is 0: it is y=0x+3.
  • Vertical lines have equations x=k. Every point on the line x=3 has x-coordinate 3. A vertical line cannot be written as y=mx+c, because its gradient cannot be calculated.

The trap is the letter. The line x=3 is vertical, even though it "contains" an x: it is the set of points whose x-coordinate is 3, and they sit one above another. The x-axis itself is the line y=0, and the y-axis is the line x=0.

Finding the equation from a graph

To write down the equation of a straight line drawn on a grid:

  1. Find the gradient m from two clear grid points (rise over run, using the axis scales).
  2. Read the y-intercept c: the y-value where the line crosses the y-axis.
  3. Write y=mx+c with your two numbers in it.
  4. Check with another point on the line: its coordinates should fit the equation.

If the line crosses the y-axis off the visible grid, or not at a clear point, use one point and the gradient to work back to x=0. A question asking for "the equation of the line" wants a full equation, starting "y=", not just the two numbers.

Worked example 1

Find the equation of the line drawn on the grid.

xy−112345−5−4−3−2−112345670
  1. Two clear grid points: (0,−3) and (3,3).

  2. Gradient =3−(−3)3−0=63=2.

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

  4. Equation: y=2x−3.

  5. Check with (4,5): 2×4−3=5. It fits.

Answer: y=2x−3

Worked example 2

Find the equation of the line drawn on the grid.

xy−5−4−3−2−112345−3−2−11234560
  1. Two clear grid points: (0,2) and (4,−1).

  2. Run =4. Rise =−1−2=−3. Gradient =−34.

  3. The line crosses the y-axis at (0,2), so c=2.

  4. Equation: y=−34x+2.

  5. Check with (−4,5): −34×(−4)+2=3+2=5. It fits.

Answer: y=−34x+2

Check yourself

Write down the gradient and the y-intercept of the line y=5−2x.

Answer it in the portal, where your answer is checked as you type →

Check yourself

Find the equation of the line drawn on the grid.

xy−2−1123−5−4−3−2−1123456780

Answer it in the portal, where your answer is checked as you type →

Interpreting the gradient and intercept

Many straight-line graphs describe something real, and the two numbers then have meanings.

  • The gradient is a rate: the change in the y quantity for each one unit of the x quantity. Its units are "y units per x unit".
  • The intercept is the starting value: the value of y when x=0.

For example, if a plumber charges C=45h+60 dollars for h hours of work, the gradient 45 means 45 dollars for each hour, and the intercept 60 means a fixed call-out charge of 60 dollars, paid even for no time at all.

A negative gradient means the quantity is falling. If the fuel in a tank is F=50−4t litres after t hours, the tank starts with 50 litres and loses 4 litres every hour. It is empty when F=0: 50−4t=0, so t=12.5 hours.

When you explain a gradient in words, always say what changes, by how much, and for each what: "the cost goes up by 45 dollars for each extra hour".

Worked example 3

The charge on a phone battery, y %, is given by y=100−8x, where x is the number of hours since it was fully charged. (a) Write down the gradient and explain what it means. (b) Explain what the 100 means. (c) After how many hours is the battery flat?

  1. (a) Written as y=−8x+100, the gradient is −8. The charge falls by 8 percentage points every hour.

  2. (b) 100 is the y-intercept, the charge when x=0: the battery starts fully charged, at 100%.

  3. (c) Flat means y=0: 100−8x=0, so 8x=100 and x=12.5.

Answer: (a) −8: the charge falls by 8% each hour (b) the starting charge, 100% (c) 12.5 hours

Fully simplified answers

Cambridge expects the equation of a line in a fully simplified form. That means:

  • y on its own on the left: y=2x+3, not y−3=2x;
  • like terms collected: y=2x+3, not y=2x+1+2;
  • no common factor left over: 2y=4x+6 simplifies, by dividing every term by 2, to y=2x+3;
  • no brackets left unexpanded: y=2(x+1)+1 is not finished.

A fraction gradient is fine: y=23x−1 is fully simplified. So is y=5−x; the order of the terms does not matter.

Equations in other forms Extended

Extended candidates must also work with equations such as ax+by=c, for example 3x+2y=6. The same line can be written in many ways, so to read its gradient and intercept, rearrange to make y the subject.

Take 5x+4y=8:

  1. Subtract 5x from both sides: 4y=−5x+8.
  2. Divide every term by 4: y=−54x+2.
  3. Read off: gradient −54, y-intercept 2.

Two quick facts help with this form. Putting x=0 gives the y-intercept straight away (4y=8, so y=2), and putting y=0 gives where the line crosses the x-axis (5x=8, so x=1.6).

A question may also ask you to give an equation in a particular form, such as ax+by=c where a, b and c are integers. Start from y=mx+c, clear any fractions by multiplying every term, then collect x and y on one side. For example, y=−23x+4 becomes 3y=−2x+12, then 2x+3y=12.

Worked example 4 Extended

Find the gradient and the y-intercept of the line 3x−2y=12.

  1. Make y the subject. Subtract 3x: −2y=−3x+12.

  2. Divide every term by −2: y=32x−6.

  3. Gradient =32, y-intercept =−6.

  4. Check the intercept directly: x=0 gives −2y=12, so y=−6.

Answer: gradient 32, y-intercept −6

Equation of a line through two points Extended

With no grid, you can still find the equation of a line from two points on it.

  1. Calculate the gradient: m=y2−y1x2−x1.
  2. Substitute m and the coordinates of one of the points into y=mx+c and solve for c.
  3. Write the equation, and check it with the other point.

Either point gives the same c, because both lie on the line. The check with the second point catches almost every arithmetic slip, so it is worth the ten seconds.

Worked example 5 Extended

Find the equation of the line through (−2,7) and (4,−5). Give your answer (a) in the form y=mx+c, (b) in the form ax+by=c.

  1. Gradient: m=−5−74−(−2)=−126=−2.

  2. Substitute (−2,7) into y=−2x+c: 7=−2×(−2)+c=4+c, so c=3.

  3. (a) y=−2x+3.

  4. Check with (4,−5): −2×4+3=−5. It fits.

  5. (b) Add 2x to both sides: 2x+y=3.

Answer: (a) y=−2x+3 (b) 2x+y=3

Check yourself Extended

Find the gradient and the y-intercept of the line 3x+4y=20.

Answer it in the portal, where your answer is checked as you type →

Check yourself Extended

Find the equation of the line through (1,1) and (3,7). Give your answer in the form y=mx+c.

Answer it in the portal, where your answer is checked as you type →

Key points

  • In y=mx+c, m is the gradient and c is the y-intercept, the point (0,c).

  • Read m and c only once y is on its own; keep their signs.

  • y=k is horizontal (gradient 0); x=k is vertical.

  • From a graph: gradient from two grid points, c from the y-axis crossing, then write y=mx+c.

  • In context, the gradient is the rate of change and the intercept is the starting value.

  • Extended: rearrange ax+by=c to y=…; through two points, find m then substitute a point to find c.

Where marks are lost

  • Reading the gradient of y=7−4x as 7. The gradient multiplies x: it is −4.

  • Giving only the numbers, such as m=2, c=−3, when the question asks for the equation.

  • Writing y=3 for a vertical line, or x=3 for a horizontal one.

  • Taking c as the y-coordinate of any point on the line, rather than the point where x=0.

  • Extended: reading the gradient of 3x+2y=6 as 3. Make y the subject first: the gradient is −32.

  • Extended: dividing only some of the terms when making y the subject.

  • Leaving an answer unsimplified, such as 2y=4x+6.

Related IGCSE Mathematics 0580 lessons

All IGCSE Mathematics 0580 lessons →

An original lesson written to the Cambridge IGCSE Mathematics 0580 syllabus (2025 to 2027). The worked examples and questions are our own, not Cambridge questions. Back to every IGCSE Mathematics 0580 lesson.