Graphing Linear Equations
A linear equation such as \(y = 2x + 1\) graphs as a straight line. This NSW Year 9 Core maths subtopic graphs lines from tables of values and from their intercepts, and is Stage 5 Core content under NESA outcome MA5‑LIN‑C‑01.
You will complete tables of values, write the equations of the axes (\(y = 0\) and \(x = 0\)) and of horizontal and vertical lines such as \(y = -3\) and \(x = -8\), and find where two of them meet. You will find where lines like \(y = 3x - 4\) and \(2x + 5y = 10\) cross each axis and use those points to graph the line, check by substitution if a point is on a line, find when a draining water tank is empty, and find the area of the triangle a line cuts off with the axes. It is part of Year 9 Core Straight Line.
Every question with a fully worked solution.
- Graphing Linear Equations - Video - Graph linear equations using y=mx+b Watch
Theory
A linear equation such as \(y = 2x - 6\) or \(5x + 2y = 20\) graphs as a straight line. This Year 9 maths page shows how to graph one from a table of values or from its intercepts, how to write the equations of horizontal and vertical lines, and how to test whether a point lies on a line.
A linear equation links \(x\) and \(y\) so that its graph is a straight line. Equations like \(y = mx + c\) and \(ax + by = c\) are linear.
A table of values lists chosen \(x\)-values and the \(y\)-values the equation gives. Each pair is a point to plot. Two points fix a line; a third is a check.
The \(y\)-intercept is where the line crosses the \(y\)-axis. Every point on the \(y\)-axis has \(x = 0\). The \(x\)-intercept is where the line crosses the \(x\)-axis, where \(y = 0\).
A horizontal line has an equation like \(y = 3\): every point on it has the same \(y\)-value. A vertical line has an equation like \(x = -2\). The \(x\)-axis is \(y = 0\) and the \(y\)-axis is \(x = 0\).
A point lies on a line if its coordinates make the equation true.
To find the intercepts of any line:
| The line | Its equation |
|---|---|
| the \(x\)-axis | \(y = 0\) |
| the \(y\)-axis | \(x = 0\) |
| horizontal, through \((a, b)\) | \(y = b\) |
| vertical, through \((a, b)\) | \(x = a\) |
How to graph a linear equation
- Choose a method: a table of values, or the two intercepts.
- Find the points. For intercepts, put \(x = 0\) for the \(y\)-intercept, and \(y = 0\) for the \(x\)-intercept.
- Plot the points on a number plane and rule a straight line through them, extending past both.
- Label the line with its equation.
- Check with a third point: substitute it into the equation.
Substitute each \(x\)-value into the equation to get its \(y\)-value.
| \(x = -1:\ y\) | \(=\) | \(3 \times (-1) - 2 = -5\) |
| \(x = 0:\ y\) | \(=\) | \(3 \times 0 - 2 = -2\) |
| \(x = 2:\ y\) | \(=\) | \(3 \times 2 - 2 = 4\) |
| \(x\) | \(-1\) | \(0\) | \(2\) |
|---|---|---|---|
| \(y\) | \(-5\) | \(-2\) | \(4\) |
Plot \((-1, -5)\), \((0, -2)\) and \((2, 4)\). They line up, which checks the arithmetic.
For the \(y\)-intercept put \(x = 0\). For the \(x\)-intercept put \(y = 0\) and solve.
| \(y\) | \(=\) | \(2 \times 0 - 6 = -6\) |
| \(0\) | \(=\) | \(2x - 6\) |
| \(6\) | \(=\) | \(2x\) |
| \(x\) | \(=\) | \(3\) |
The intercepts are \(\mathbf{(3, 0)}\) and \(\mathbf{(0, -6)}\).
(i) Find the intercepts of \(5x + 2y = 20\).
(ii) Find the area of the triangle the line cuts off with the two axes.
(i) Put \(y = 0\), then put \(x = 0\).
| \(5x + 2 \times 0\) | \(=\) | \(20 \;\Rightarrow\; x = 4\) |
| \(5 \times 0 + 2y\) | \(=\) | \(20 \;\Rightarrow\; y = 10\) |
The intercepts are \(\mathbf{(4, 0)}\) and \(\mathbf{(0, 10)}\).
(ii) The triangle has a right angle at the origin, a base of \(4\) and a height of \(10\).
| \(\text{area}\) | \(=\) | \(\dfrac{1}{2} \times 4 \times 10\) |
| \(\) | \(=\) | \(\mathbf{20} \text{ square units}\) |
(i) Does the point \((-2, 7)\) lie on the line \(y = -4x - 1\)?
(ii) The point \((k, 3)\) lies on the same line. Find \(k\).
(i) Substitute \(x = -2\) and compare with the \(y\)-coordinate.
| \(-4 \times (-2) - 1\) | \(=\) | \(8 - 1\) |
| \(\) | \(=\) | \(7 \ \checkmark\) |
The result equals the \(y\)-coordinate, so the point does lie on the line.
(ii) Substitute \(x = k\) and \(y = 3\), then solve.
| \(3\) | \(=\) | \(-4k - 1\) |
| \(4\) | \(=\) | \(-4k\) |
| \(k\) | \(=\) | \(\mathbf{-1}\) |
Check: \(-4 \times (-1) - 1 = 3\).
Common pitfalls
Frequently asked questions
How do you find the x-intercept of a line?
Put \(y = 0\) in the equation and solve for \(x\). For \(y = 2x - 6\): \(0 = 2x - 6\), so \(x = 3\) and the \(x\)-intercept is \((3, 0)\).
How do you find the y-intercept of a line?
Put \(x = 0\) in the equation and work out \(y\). For \(5x + 2y = 20\): \(2y = 20\), so the \(y\)-intercept is \((0, 10)\).
What is the equation of a horizontal line?
A horizontal line has an equation of the form \(y = b\), where \(b\) is the \(y\)-coordinate of every point on it. The \(x\)-axis itself is \(y = 0\).
How do you know if a point is on a line?
Substitute the \(x\)- and \(y\)-coordinates of the point into the equation. If both sides are equal, the point is on the line. If not, it is not.
How many points do you need to draw a straight line?
Two points are enough to fix a straight line. Plotting a third point is a good check: if it does not line up, there is a mistake.