Home / IGCSE Mathematics 0580 / Drawing linear graphs
Cambridge IGCSE Mathematics 0580 · Coordinate geometry

Drawing linear graphs

How to draw the straight line for an equation such as y=−2x+5: making a table of values, plotting the points, drawing the line with a ruler and reading values from it. Extended students also draw lines given in other forms, such as 3x+2y=5.

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

C3.2 (Core)

  • Draw straight-line graphs for linear equations.

Notes and examples

  • Equations will be given in the form y=mx+c (e.g. y=−2x+5), unless a table of values is given.

E3.2 (Extended)

  • Draw straight-line graphs for linear equations.

Notes and examples

  • Examples include:
  • y=−2x+5
  • y=7−4x
  • 3x+2y=5.

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

Straight-line graphs

An equation such as y=2x+1 links two quantities. Every pair of values that makes the equation true is a point (x,y): for example x=3 gives y=7, so (3,7) is on the graph. The graph of the equation is the set of all such points.

For an equation of the form y=mx+c the graph is always a straight line, which is why these are called linear equations. The reason is the steady step: every time x increases by 1, y changes by exactly m. A constant step in y for each step in x means a constant slope, and a constant slope is a straight line.

That steady step is also your best check. In a correct table for y=2x+1 the y-values go up by 2 each time; if one does not, it has been worked out wrongly.

Making a table of values

The question usually gives you the x-values, often in a table with some y-values already filled in. For each x:

  1. Substitute it into the equation, putting negative values in brackets.
  2. Work out y, doing the multiplication before the addition or subtraction.
  3. Check that the y-values change by the same amount at each step.

In Core questions the equation is given in the form y=mx+c, such as y=−2x+5, unless a table of values is given. Take care with a negative m: for y=−2x+5 at x=−1, −2×(−1)=+2, so y=7.

Worked example 1

Complete the table of values for y=−2x+5 and draw the graph for −1⩽x⩽3.

Table of values for y = -2x + 5
x−10123
y
  1. x=−1: y=−2(−1)+5=2+5=7.

  2. x=0: y=0+5=5.

  3. x=1: y=−2+5=3. x=2: y=−4+5=1. x=3: y=−6+5=−1.

  4. Check: the y-values 7,5,3,1,−1 go down by 2 each time, matching m=−2.

  5. Plot (−1,7), (0,5), (1,3), (2,1) and (3,−1) and join them with one ruled line from x=−1 to x=3.

Answer: y=7,5,3,1,−1

xy−2−11234−2−1123456780y = -2x + 5

The completed graph for Worked example 1. Every plotted point lies exactly on the ruled line.

Drawing the line

Plot every point in your table with a small neat cross. Then:

  • draw one straight line through all of them with a ruler, not a set of short pieces joined dot to dot;
  • draw it across the whole range of x the question asks for, from the first x-value to the last;
  • label the line with its equation if there is more than one line on the grid.

Two points fix a line, but always plot at least three. If one point refuses to line up with the others, you have made an arithmetic slip: recalculate that y-value rather than bending the line.

Check the scales before you plot. If the y-axis goes up in 2s or 5s, a value like y=7 sits between grid lines.

Check yourself

Complete the table of values for y=3x−2.

Table of values for y = 3x - 2
x−202
y

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

Horizontal and vertical lines

Some linear equations have only one letter.

  • y=3 is the set of points whose y-coordinate is 3, whatever x is: (−2,3), (0,3), (5,3). It is a horizontal line through 3 on the y-axis. It is y=mx+c with m=0.
  • x=−2 is the set of points whose x-coordinate is −2: a vertical line through −2 on the x-axis.

A common slip is to draw y=3 as a vertical line because it "crosses 3". Ask instead: which coordinate is fixed? If y is fixed, the line runs across.

xy−5−4−3−2−112345−5−4−3−2−1123450y = 3(-2, 3)

The horizontal line y=3 and the vertical line x=−2 cross at (−2,3), the one point that is on both.

Using your graph

Once the line is drawn you can read from it.

  • Find y for a given x: go up (or down) from the x-value to the line, then across to the y-axis.
  • Find x for a given y: go across from the y-value to the line, then down to the x-axis.
  • Where the line crosses the x-axis: read x where y=0.

Draw faint guide lines to show your reading, because examiners give method marks for them. A reading from a graph is accepted within a small range, so read carefully using the small squares.

To test whether a point lies on a line without drawing, substitute its x-coordinate into the equation and see whether you get its y-coordinate.

Worked example 2

Hiring a bike costs y dollars for x hours, where y=2.5x+4. (a) Complete a table for x=0,2,4,6 and draw the graph. (b) Use your graph to find how many hours of hire cost $16.50.

  1. (a) x=0: y=4. x=2: y=5+4=9. x=4: y=14. x=6: y=19.

  2. Plot (0,4), (2,9), (4,14), (6,19) and rule a line from x=0 to x=6. Negative hours make no sense, so the graph starts at x=0.

  3. (b) Go across from y=16.5 to the line, then down: x=5.

  4. Check by substitution: 2.5×5+4=16.5.

Answer: (b) 5 hours

Check yourself

The point (k,11) lies on the line y=3x−4. Find the value of k.

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

Equations in other forms Extended

Extended questions may give the equation in another form.

y=7−4x is just y=−4x+7 written in a different order. Substitute as usual: at x=2, y=7−8=−1.

3x+2y=5 has x and y on the same side. There are two good ways to make a table:

  • substitute each x-value and solve the small equation for y; or
  • rearrange first: 2y=5−3x, so y=5−3x2.

For a line like 2x+3y=12, the intercepts are quick: x=0 gives 3y=12, so y=4; y=0 gives 2x=12, so x=6. Plot (0,4) and (6,0), then find a third point, such as x=3 giving y=2, as a check.

If the x-values are your choice, pick ones that give whole-number y-values: for 3x+2y=5, odd values of x do.

Worked example 3 Extended

Draw the graph of 3x+2y=5 for −1⩽x⩽3.

  1. x=−1: −3+2y=5, so 2y=8 and y=4.

  2. x=1: 3+2y=5, so 2y=2 and y=1.

  3. x=3: 9+2y=5, so 2y=−4 and y=−2.

  4. Check the pattern: each step of 2 in x lowers y by 3.

  5. Plot (−1,4), (1,1) and (3,−2) and rule one line from x=−1 to x=3.

Answer: A straight line through (−1,4), (1,1) and (3,−2)

xy−2−11234−3−2−11234503x + 2y = 5

The line for Worked example 3.

Check yourself Extended

The line 2x+5y=20 passes through the point where x=−5. Find the y-coordinate of this point.

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

Key points

  • A linear equation gives a straight line. Make a table of values, plot at least three points and draw one ruled line.

  • Put negative x-values in brackets, and check that the y-values change by the same step each time.

  • Draw the line across the whole range of x asked for.

  • y=c is a horizontal line; x=a is a vertical line.

  • A point lies on a line if its coordinates make the equation true.

  • Extended: for ax+by=c, substitute each x and solve for y, or rearrange to make y the subject first.

Where marks are lost

  • Sign errors with negative x-values: for y=−3x+4 at x=−2, y=10, not −2.

  • Joining points dot to dot with a wobbly line instead of one ruled line.

  • Stopping the line short of the range asked for.

  • Misreading the scale on an axis that goes up in 2s, 5s or 10s.

  • Drawing y=3 as a vertical line.

  • Bending the line to pass through a point that was worked out wrongly, instead of rechecking it.

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.