How to Plot Straight-Line Graphs

Master straight-line graphs for IGCSE Maths: from reading the gradient m and y-intercept c straight from an equation, to plotting lines in the form y = mx + c and ax + by = c. This page also covers real-life graphs and conversion graphs, with clear worked examples and auto-marked practice rooms to build speed and confidence.

Prior Knowledge This page builds on finding the gradient of a straight line. Make sure you are confident finding a gradient before starting. If you want conversion graphs, see conversion graphs.

The big idea: \(y = mx + c\)

Every straight line has the equation \(y = mx + c\). The gradient \(m\) sets how steep it is, and \(c\) is where it crosses the \(y\)-axis.

xyc = 1(y-intercept)runrisem = gradient= rise ÷ runc = interceptwhere it cuts y
Read it like this: \(m\) is the rise divided by the run, and \(c\) is the height where the line cuts the \(y\)-axis. Know those two numbers and you can draw any straight line.

What \(m\) and \(c\) tell you

The two letters in \(y = mx + c\) each describe one feature of the line.

\(m\) is the gradient
How much \(y\) changes for every 1 across in \(x\). Positive slopes up, negative slopes down, zero is flat.
\(c\) is the \(y\)-intercept
The value of \(y\) where the line crosses the \(y\)-axis, the point \((0,\,c)\). Put \(x=0\) to find it.
Same \(m\), parallel
Lines with equal gradients are parallel. The steepest line is the one with the largest size of \(m\).

Plotting \(y = mx + c\) from a table

The straight-line equation

\[y = mx + c\]

  1. Choose three well-spaced \(x\)-values inside the given range.
  2. Substitute each into the equation to find \(y\).
  3. Plot the three points.
  4. Draw a single straight line through them.

Use three points, not two: if they do not line up, you know there is an arithmetic slip to fix.

Plotting \(ax + by = c\): the intercept method

When a line is written as \(ax + by = c\), the fastest way to draw it is to find where it crosses each axis. Two points are enough for a straight line.

  1. Set \(x = 0\) and solve for \(y\): that is the \(y\)-intercept.
  2. Set \(y = 0\) and solve for \(x\): that is the \(x\)-intercept.
  3. Plot both intercepts and join them.

Real-life straight-line graphs

In a real-life graph, \(x\) and \(y\) are replaced by meaningful quantities such as time, cost or distance. The two parts of \(y = mx + c\) then have real meanings:

Gradient is the rate of change (cost per minute, speed in km/h). The \(y\)-intercept is the starting value (a fixed charge, an initial amount).

When drawing a graph of one quantity against another, the first-named quantity goes on the vertical axis.

Worked examples

💡 Example 1: plotting \(y = mx + c\)

Draw the graph of \(y = 2x - 3\) for \(-1 \leq x \leq 4\).

Substitute three \(x\)-values into \(y = 2x - 3\):

\[\begin{aligned} x=-1:\ y &= 2(-1)-3 = -5 \\ x=1:\ y &= 2(1)-3 = -1 \\ x=4:\ y &= 2(4)-3 = 5 \end{aligned}\]

This gives the table:

\[\begin{array}{c|ccc} x & -1 & 1 & 4 \\ \hline y & -5 & -1 & 5 \end{array}\]

Plot \((-1,-5)\), \((1,-1)\) and \((4,5)\) and join them.

What's happening?

Each \(y\) comes from substituting \(x\) into \(2x-3\). The gradient is \(2\) (up 2 for every 1 across) and the line cuts the \(y\)-axis at \(-3\).

-2-112345-6-4-2246xy

💡 Example 2: the intercept method

Plot \(3x + 4y = 12\).

-1123456-112345(0,3)(4,0)xy

Set \(x = 0\):

\[4y = 12 \Rightarrow y = 3 \quad (0,\,3)\]

Set \(y = 0\):

\[3x = 12 \Rightarrow x = 4 \quad (4,\,0)\]

Plot \((0,3)\) and \((4,0)\) and join.

What's happening?

Setting one variable to zero leaves a simple equation for the other, giving an intercept on each axis. Two intercepts fix the line.

💡 Example 3: comparing lines

Four lines are given below. Find the steepest line, the line with a negative gradient, and a parallel pair.

First write down each gradient (the number in front of \(x\)):

\[\begin{array}{l|c} \text{line} & \text{gradient } m \\ \hline y = 2x+3 & 2 \\ y = -3x+5 & -3 \\ y = 4x-2 & 4 \\ y = 2x-4 & 2 \end{array}\]

What's happening?

Everything you need is the gradient \(m\). Steepness is the size of \(m\), the sign tells you the direction, and equal gradients mean the lines are parallel.

Steepest: \(y = 4x - 2\), because \(4\) is the largest size of gradient.

Negative gradient: \(y = -3x + 5\), the only one with \(m < 0\).

Parallel pair: \(y = 2x+3\) and \(y = 2x-4\), both have gradient \(2\).

Reading the table

Compare only the gradient column. The largest size is the steepest, a minus sign means negative, and matching values mean parallel.

💡 Example 4: a real-life graph

A taxi charges a fixed booking fee of 2 plus 1.5 per kilometre. Write the cost \(C\) for a journey of \(d\) km, and say what the gradient and intercept mean.

\[C = 1.5d + 2\]

Gradient \(= 1.5\): the cost rises by 1.5 for each extra kilometre.

Intercept \(= 2\): the fixed fee, paid even for zero distance.

What's happening?

The equation is just \(y = mx + c\) with real labels. The rate per km is the gradient, and the fixed fee is the \(y\)-intercept.

🔑 Key points

  • In \(y = mx + c\): \(m\) is the gradient, \(c\) is the \(y\)-intercept.
  • For \(ax + by = c\), find intercepts by setting \(x=0\) then \(y=0\).
  • Plot three points, not two, to catch errors.
  • Parallel lines share the same gradient.
  • Real-life: gradient is the rate, intercept is the starting value.

⚠ Common pitfalls

  • Mixing up \(m\) and \(c\): in \(y = 3x + 5\) the gradient is \(3\), not \(5\).
  • Plotting only two points, so a slip goes unnoticed.
  • Forgetting a fixed charge, so the line wrongly passes through the origin.
  • Rearranging \(ax + by = c\) by dividing only one side.
  • Putting the wrong quantity on the vertical axis in a real-life graph.
⇩ Jump to Practice Questions ⇩

Ready to practise? The room below lets you read \(m\) and \(c\), plot lines yourself, use the intercept method, compare lines and work with real-life graphs.

Next: Quadratic Graphs →

Straight-Line Graphs — Practice Room

Practise reading and drawing straight lines, auto-marked as you work. Read the gradient and intercept, plot a line yourself by clicking the grid, use the intercept method, compare lines and work with real-life graphs. Plotting is checked against the correct line.

Correct 0
Re-attempts 0
🔥 Streak 0
🏆 Best 0