Graphing Straight Lines
Every question with a fully worked solution.
- Graphing Straight Lines - Video - Graphing Straight Lines using X-Y Intercepts Watch
Theory
To graph a linear equation, find two points on the line and rule through them. The intercept method uses where the line crosses the axes; the gradient–intercept method starts at \(c\) and steps by the gradient. This Year 10 maths page revises graphing from Years 7–9: tables of values, horizontal and vertical lines and the equations of the axes, intercepts (including fractions and decimals), lines through the origin, unknown coefficients, two lines on one graph, areas, and graphs in real contexts.
A linear equation in \(x\) and \(y\), such as \(5x + 2y = 10\) or \(y = \dfrac{3}{4}x - 2\), has a straight-line graph. Two points fix a line; a third point is a useful check.
The \(x\)-intercept is where the line crosses the \(x\)-axis (\(y = 0\)) and the \(y\)-intercept is where it crosses the \(y\)-axis (\(x = 0\)).
A line through the origin, such as \(y = -3x\), has both intercepts at \((0,\ 0)\), so you need another point. Horizontal lines have equations \(y = k\) and vertical lines \(x = k\).
A line parallel to the \(x\)-axis is horizontal and a line parallel to the \(y\)-axis is vertical. The \(x\)-axis itself is the line \(y = 0\) and the \(y\)-axis is the line \(x = 0\).
Lines with the same gradient and different intercepts are parallel. Equations that simplify to the same \(y = mx + c\) are the same line.
Intercepts of \(ax + by = k\):
Intercept form: the line with intercepts \(p\) and \(q\) is
How to graph a straight line
- Choose a method. Equation like \(ax + by = k\): use intercepts. Equation like \(y = mx + c\): use the gradient and intercept.
- Find two points: both intercepts, or \((0,\ c)\) and one step of \(\dfrac{\text{rise}}{\text{run}}\) from it. If the line goes through the origin, substitute another \(x\) value.
- Plot and rule a line through the points, extending past them. Label the intercepts and the line.
- Check with a third point or with the sign of the gradient.
Working with graphs
- Point and gradient given: find the equation with \(y - y_1 = m(x - x_1)\), then its intercepts.
- Unknown coefficient: substitute a known point, such as an intercept, to find it. If one intercept is linked to the other (e.g. \(2\) more), find the easy intercept first.
- Two lines: solve simultaneously to find the intersection, and use gradients to show they are perpendicular or parallel.
- Areas: a triangle with the axes has area \(\dfrac{1}{2} \times |x\text{-int}| \times |y\text{-int}|\). A triangle between two lines and an axis uses the gap between their intercepts as the base (Example 3).
- Four lines: two pairs of parallel lines whose gradients multiply to \(-1\) enclose a rectangle; find the corners by solving pairs of equations.
- In context: the starting value is the intercept and the rate is the gradient. Where two graphs cross, the quantities are equal (Example 4). Check the domain, e.g. time cannot be negative.
Find where the line crosses each axis.
| \(x = 0:\quad 2y = 10\) | \(\Rightarrow\) | \(y = 5\) |
| \(y = 0:\quad 5x = 10\) | \(\Rightarrow\) | \(x = 2\) |
Plot \((2,\ 0)\) and \((0,\ 5)\) and rule a line through them, extending past both.
Check with a third point: \(x = 1\) gives \(2y = 5\), so \((1,\ 2.5)\) should also be on the line, and it is.
The \(y\)-intercept is \(-2\), so start at \((0,\ -2)\). The gradient \(\dfrac{3}{4}\) means \(4\) right and \(3\) up, which lands on \((4,\ 1)\).
| \(0\) | \(=\) | \(\dfrac{3}{4}x - 2\) |
| \(\dfrac{3}{4}x\) | \(=\) | \(2\) |
| \(x\) | \(=\) | \(\dfrac{8}{3}\) |
The \(x\)-intercept is \(\mathbf{\dfrac{8}{3}}\), between \(2\) and \(3\), which matches the sketch.
Solve the equations together. Substitute \(y = x + 1\) into the second equation.
| \(2x + (x + 1)\) | \(=\) | \(7\) |
| \(3x\) | \(=\) | \(6\) |
| \(x\) | \(=\) | \(2,\quad y = 3\) |
The lines meet at \(\boldsymbol{(2,\ 3)}\). Their \(x\)-intercepts are \(x = -1\) and \(x = 3.5\).
| \(\text{base}\) | \(=\) | \(3.5 - (-1) = 4.5\) |
| \(\text{height}\) | \(=\) | \(3\) |
| \(\text{Area}\) | \(=\) | \(\dfrac{1}{2} \times 4.5 \times 3\) |
| \(\) | \(=\) | \(\mathbf{6.75}\text{ units}^2\) |
The height is the \(y\)-coordinate of the meeting point.
Each rule is starting amount plus (or minus) rate times time. The rate is the gradient and the starting amount is the vertical intercept.
| \(\text{A:}\quad V\) | \(=\) | \(200 + 15t\) |
| \(\text{B:}\quad V\) | \(=\) | \(500 - 25t\) |
Set the volumes equal:
| \(200 + 15t\) | \(=\) | \(500 - 25t\) |
| \(40t\) | \(=\) | \(300\) |
| \(t\) | \(=\) | \(7.5\) |
| \(V\) | \(=\) | \(200 + 15 \times 7.5\) |
| \(\) | \(=\) | \(312.5\) |
After \(\mathbf{7.5}\) minutes both tanks hold \(\mathbf{312.5}\) L, where the graphs cross.
Common pitfalls
Frequently asked questions
How do you graph a line using intercepts?
Put \(y = 0\) and solve for the \(x\)-intercept, then put \(x = 0\) and solve for the \(y\)-intercept. Plot both points on the axes and rule a line through them.
How do you graph y = mx + c?
Plot the \(y\)-intercept \(c\) on the \(y\)-axis. From there, use the gradient: go right by the run and up by the rise (down if the gradient is negative). Join the points with a straight line.
How do you graph a line that goes through the origin?
Both intercepts are at the origin, so choose another \(x\) value, such as \(x = 1\) or \(x = 2\), find \(y\), and draw the line through that point and the origin.
How do you find where two lines intersect?
Solve their equations simultaneously, for example by substituting one into the other. The solution is the point where the graphs cross; check it on your sketch.
What does the gradient mean on a real-life graph?
It is the rate of change, such as litres per minute or kilometres per hour. The vertical intercept is the starting value.
What is the equation of the x-axis?
It is \(y = 0\), because every point on the \(x\)-axis has a \(y\)-coordinate of \(0\). The \(y\)-axis is \(x = 0\).