Straight Line Graphs
Every question with a fully worked solution.
- Straight Line Graphs - Video - Graphing straight lines using a table of values Watch
Theory
A straight line graph shows a linear relationship between \(x\) and \(y\). This Year 11 Maths Standard page shows how to complete a table of values, plot and rule the line, test whether a point lies on the line, sketch a line from its intercepts, and find the equation \(y=mx+c\) from a table or a graph.
A linear relationship is one where \(y\) changes by the same amount every time \(x\) goes up by \(1\). Its graph is a straight line. Everyday examples are a taxi fare, a phone plan or a plumber's bill: a fixed starting charge plus the same extra amount for every kilometre, gigabyte or hour.
A table of values lists some \(x\) values and the matching \(y\) values. Each column gives a point \((x,\,y)\) to plot. A point lies on the line only if its coordinates make the equation true.
The \(y\)-intercept is where the line crosses the \(y\)-axis, so \(x=0\) there. The \(x\)-intercept is where it crosses the \(x\)-axis, so \(y=0\) there.
The equation \(y=mx+c\) is the gradient–intercept form. The number \(m\) is the gradient (how steep the line is: positive if it rises from left to right, negative if it falls) and \(c\) is the \(y\)-intercept. Equations can also be written with everything on one side, such as \(x+3y-9=0\). This is called the general form.
Gradient–intercept form of a straight line:
Gradient between two points \((x_1,\,y_1)\) and \((x_2,\,y_2)\):
Intercepts:
| \(3x+2y\) | \(=\) | \(8\) |
| \(2y\) | \(=\) | \(-3x+8\) |
| \(y\) | \(=\) | \(-\dfrac{3}{2}x+4\) |
How to draw a straight line graph from \(y=mx+c\)
- Choose three easy \(x\) values, such as \(-1\), \(0\) and \(1\).
- Substitute each one into the equation to complete a table of values.
- Plot the points \((x,\,y)\) and rule one straight line through them. If the points do not line up, check your working.
- Label the line with its equation.
How to sketch a line in general form
- Put \(x=0\) and solve to get the \(y\)-intercept.
- Put \(y=0\) and solve to get the \(x\)-intercept.
- Plot both intercepts and rule the line through them.
How to test whether a point is on a line
- Substitute the \(x\) and \(y\) values of the point into the equation.
- Compare: for general form, work out the left-hand side (LHS) and see if it equals \(0\). For \(y=mx+c\), see if the \(y\) you calculate matches the point.
- Conclude: if the equation is true the point is on the line; if not, it is not.
How to find the equation \(y=mx+c\)
- From the gradient and \(y\)-intercept: put them straight into \(y=mx+c\).
- From a table: the change in \(y\) when \(x\) goes up by \(1\) is \(m\). Substitute one point from the table into \(y=mx+c\) to find \(c\).
- From a graph or two points: find \(m=\dfrac{\text{rise}}{\text{run}}\) or use the gradient formula. Read \(c\) where the line crosses the \(y\)-axis, or substitute a point to find it.
How to match an equation to its graph
- Gradient sign: a positive \(m\) rises from left to right; a negative \(m\) falls.
- \(y\)-intercept: the line must cross the \(y\)-axis at \(c\) (above the origin if \(c\) is positive, below if negative).
- Check one more point, such as the \(x\)-intercept, if two graphs still look alike.
| \(x\) | \(-1\) | \(0\) | \(1\) | \(a\) |
| \(y\) | \(p\) | \(-1\) | \(2\) | \(8\) |
When \(x=-1\), \(y=p\): substitute \(x=-1\).
| \(p\) | \(=\) | \(3\times(-1)-1\) |
| \(\) | \(=\) | \(-3-1\) |
| \(\) | \(=\) | \(-4\) |
When \(x=a\), \(y=8\): this time \(y\) is known, so substitute \(y=8\) and solve.
| \(8\) | \(=\) | \(3a-1\) |
| \(3a\) | \(=\) | \(9\) |
| \(a\) | \(=\) | \(3\) |
\(\therefore\ p=\mathbf{-4}\) and \(a=\mathbf{3}\). All four points lie on one straight line, which confirms the table:
(i) Find the \(x\)- and \(y\)-intercepts and sketch the line.
(ii) Does the point \(A(-5,\,4)\) lie on the line? Does \(B(5,\,1)\)?
(i) For \(x=0\):
| \(0+5y-10\) | \(=\) | \(0\) |
| \(5y\) | \(=\) | \(10\) |
| \(y\) | \(=\) | \(2\) |
| \(\therefore\) | \(\) | \((0,\,2)\) |
For \(y=0\):
| \(2x+0-10\) | \(=\) | \(0\) |
| \(2x\) | \(=\) | \(10\) |
| \(x\) | \(=\) | \(5\) |
| \(\therefore\) | \(\) | \((5,\,0)\) |
(ii) Substitute each point into the left-hand side.
| \(\text{For }A\quad \text{LHS}\) | \(=\) | \(2\times(-5)+5\times4-10\) |
| \(\) | \(=\) | \(-10+20-10\) |
| \(\) | \(=\) | \(0\) |
| \(\) | \(\therefore\) | \(\text{A is on the line}\) |
| \(\text{For }B\quad \text{LHS}\) | \(=\) | \(2\times5+5\times1-10\) |
| \(\) | \(=\) | \(10+5-10\) |
| \(\) | \(=\) | \(5\neq 0\) |
| \(\) | \(\therefore\) | \(\text{B is not on the line}\) |
The graph agrees: \(A\) sits on the line and \(B\) is one unit above it.
| \(x\) | \(2\) | \(3\) | \(4\) | \(5\) |
| \(y\) | \(11\) | \(8\) | \(5\) | \(2\) |
\(x\) increases by \(1\) and \(y\) decreases by \(3\) each time \((11\to 8\to 5\to 2)\), so \(m=-3\).
Substitute the point \((2,\,11)\) to find \(c\):
| \(y\) | \(=\) | \(-3x+c\) |
| \(11\) | \(=\) | \(-3\times2+c\) |
| \(11\) | \(=\) | \(-6+c\) |
| \(c\) | \(=\) | \(17\) |
\(\therefore\ \boldsymbol{y=-3x+17}\)
Check with another point from the table, \((5,\,2)\):
| \(-3\times5+17\) | \(=\) | \(-15+17\) |
| \(\) | \(=\) | \(2\ \checkmark\) |
Notice the \(y\)-intercept \(17\) is not in the table, because the table does not start at \(x=0\). Working backwards one more step from \((2,\,11)\) gives \((1,\,14)\), then \((0,\,17)\).
(ii) Explain what the gradient and the vertical intercept mean.
(i) Read two points from the graph: \((0,\,80)\) and \((4,\,360)\).
Vertical intercept \(c=80\)
| \(m\) | \(=\) | \(\dfrac{360-80}{4-0}\) |
| \(\) | \(=\) | \(\dfrac{280}{4}\) |
| \(\) | \(=\) | \(70\) |
\(\therefore\ \boldsymbol{C=70h+80}\)
(ii) Gradient: the cost rises by \(\$70\) for each hour of work (the hourly rate).
Vertical intercept: \(\$80\) is charged before any work is done (the call-out fee).
Check: a \(4\)-hour job costs \(70\times4+80=\$360\), which matches the graph.
Common pitfalls
Frequently asked questions
How do you draw a straight line graph from an equation?
Make a table of values: choose three \(x\) values such as \(-1\), \(0\) and \(1\), substitute each one to get \(y\), plot the points and rule one straight line through them. Two points are enough, but a third point is a useful check.
How do you check if a point lies on a line?
Substitute the coordinates of the point into the equation. If the equation is true (for example the left-hand side works out to \(0\) for a general-form equation), the point is on the line. If not, it is not on the line.
How do you find the x- and y-intercepts of a line?
Put \(x=0\) and solve for \(y\) to get the \(y\)-intercept. Put \(y=0\) and solve for \(x\) to get the \(x\)-intercept. For \(x+2y-8=0\) this gives \((0,\,4)\) and \((8,\,0)\).
How do you find the equation of a line from a table of values?
Look at how much \(y\) changes when \(x\) goes up by \(1\): that is the gradient \(m\). Then substitute any point from the table into \(y=mx+c\) and solve for \(c\).
What do m and c mean in y = mx + c?
\(m\) is the gradient, which tells you how steep the line is and whether it rises or falls. \(c\) is the \(y\)-intercept, where the line crosses the \(y\)-axis. Some exam papers write \(y=mx+b\); \(b\) means the same as \(c\).