Every equation $y = mx + b$ (see slope-intercept form) graphs as a straight line. Many functions don’t. How can you tell from a table or an equation?
Why it works
A line has the same slope everywhere, so a linear function changes $y$ by the same amount for each step of 1 in $x$. If the rate of change is different anywhere, the points can’t all lie on one line, and the graph bends.
Key idea
A function is linear when its rate of change is constant: its equation can be written $y = mx + b$, and its graph is a line. Check every pair of neighboring rows; when the $x$-steps are uneven, compare change in $y$ ÷ change in $x$.
Worked examples
Worked example: Constant steps
Is this linear? $$\begin{array}{c|ccccc} x & 0 & 1 & 2 & 3 & 4 \\ \hline y & 3 & 7 & 11 & 15 & 19 \end{array}$$
- The changes are $+4, +4, +4, +4$.
Answer: linear ($y = 4x + 3$)
Worked example: Changing steps
Is this linear? $$\begin{array}{c|cccc} x & 1 & 2 & 3 & 4 \\ \hline y & 1 & 4 & 9 & 16 \end{array}$$
- The changes are $+3, +5, +7$.
Answer: nonlinear
Worked example: Uneven x-steps
Is this linear? $$\begin{array}{c|cccc} x & 0 & 2 & 5 & 6 \\ \hline y & 1 & 7 & 16 & 19 \end{array}$$
- Rates: $\frac{7 - 1}{2 - 0} = 3$, $\frac{16 - 7}{5 - 2} = 3$, $\frac{19 - 16}{6 - 5} = 3$.
- All the same.
Answer: linear
Worked example: From equations
Which are linear: $y = 3x - 2$, $y = x^{2}$, $y = \frac{5}{x}$, $2x + y = 7$?
- $y = 3x - 2$ is already $y = mx + b$.
- $2x + y = 7$ rearranges to $y = -2x + 7$.
- $x^{2}$ and $\frac{5}{x}$ can’t be written as $mx + b$.
Answer: $y = 3x - 2$ and $2x + y = 7$
Common mistake
Deciding from the first two rows. A table can start with equal steps and then change. In $y$-values 2, 5, 8, 12, the first steps are $+3$ and $+3$, but the next is $+4$, so it is nonlinear. Check every step.