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.
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.
What \(m\) and \(c\) tell you
The two letters in \(y = mx + c\) each describe one feature of the line.
Plotting \(y = mx + c\) from a table
\[y = mx + c\]
- Choose three well-spaced \(x\)-values inside the given range.
- Substitute each into the equation to find \(y\).
- Plot the three points.
- 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.
- Set \(x = 0\) and solve for \(y\): that is the \(y\)-intercept.
- Set \(y = 0\) and solve for \(x\): that is the \(x\)-intercept.
- 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\).
💡 Example 2: the intercept method
Plot \(3x + 4y = 12\).
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.