☰ Course contents
Mathematics 📐 Grade 8 Functions: Linear vs Nonlinear
📐 Grade 8 · Lesson 1 of 15

Functions: Linear vs Nonlinear

A function is a rule that never hesitates — every input produces exactly one output. Whether that rule draws a straight line or a curve changes everything about how it grows.

Grade 8Pre-Algebra / Algebra 1
Functions: Linear vs Nonlinear — illustration
💡
The big idea: A <strong>function</strong> is simply a rule: feed it an input, it hands back exactly one output. That single restriction &mdash; one output per input, no exceptions &mdash; is what separates a function from an ordinary relation. Once you can recognise a function, the next question is how it behaves: does it climb (or fall) at a steady, constant rate, tracing a straight line, or does its rate of change itself keep changing, tracing a curve? Learning to tell linear from nonlinear &mdash; from an equation, a table, a graph, or even just a description &mdash; is one of the most useful skills in algebra.
🎯 By the end, you'll be able to
  • Decide whether a relation is a function by checking for exactly one output per input
  • Apply the vertical line test to a graph
  • Use rate of change and constant first differences to identify a linear rule
  • Compare functions given as equations, tables, graphs, or verbal descriptions, and sketch a graph qualitatively from a description
📎 You should already know
  • Plotting points on the coordinate plane
  • Slope: rise over run

A rule that never hesitates

Think of a vending machine. You press B4, and every single time it drops the same snack — never sometimes chips and sometimes candy. That reliability is exactly what mathematicians mean by a function: a rule that assigns each input one, and only one, output.

Not every rule behaves this way. “Give me a number whose square is 9” could answer 3 or −3 — two outputs for one input — so that is not a function. A function is stricter: input in, exactly one output out, guaranteed.

🔑 The definition of a function
A relation between inputs and outputs is a function if every input is paired with exactly one output. It is fine for two different inputs to share the same output — that is still a function. What breaks the rule is one input producing two different outputs.

Spotting a function in a table or graph

In a table, a rule is a function as long as no input value is listed twice with two different output values. On a graph, there is a quick visual check: the vertical line test. If any vertical line you could draw crosses the graph more than once, some input has two outputs, and the graph is not a function.

📝 Worked example: Is the relation {(1, 2), (2, 4), (3, 6), (2, 9)} a function?
  1. List the inputs: 1, 2, 3, 2.
  2. The input 2 appears twice — once paired with output 4, once with output 9.
  3. One input (2) produces two different outputs, which breaks the one−output−per−input rule.
✓ <strong>No</strong> &mdash; input 2 has two different outputs, so this relation is not a function.
⚠️ The vertical line test checks inputs, not outputs
Students sometimes draw a horizontal line by mistake. The vertical line test works because a vertical line marks a single input value (a fixed x); if it hits the graph twice, that one input has two outputs. A horizontal line crossing twice is perfectly fine — it just means two different inputs share an output, which is allowed.

Rate of change: how fast is the output moving?

Once you know a rule is a function, the next question is how it changes. The rate of change compares how much the output changes for a given change in the input — the same idea as slope, applied to any function, not just lines.

\[ \text{rate of change} = \dfrac{\text{change in output}}{\text{change in input}} \]
For a linear function this ratio is the same number no matter which two points you pick.
✨ Constant first differences mean linear
Build a table with evenly spaced inputs and subtract each output from the next — these are the first differences. If the first differences are all the same number, the rule is linear: the output changes by a fixed amount for every fixed step in the input. If the first differences keep changing, the rule is nonlinear.
🎮 Linear Rule Builder LIVE
Drag the slope and intercept sliders and watch the table of first differences &mdash; then compare against y = x&sup2;, whose differences never stay constant.
📝 Worked example: The table below gives outputs for evenly spaced inputs. Is the rule linear? x: 1, 2, 3, 4 &rarr; y: 5, 8, 11, 14.
  1. Find the first differences in y: 8 − 5 = 3, then 11 − 8 = 3, then 14 − 11 = 3.
  2. Every first difference equals 3 — it is constant.
  3. Constant first differences (with evenly spaced inputs) mean the rule changes by the same amount each step, which is the signature of a linear rule.
✓ <strong>Yes, linear</strong> &mdash; the rate of change is a constant 3 per step.
📝 Worked example: Is the rule behind the table x: 1, 2, 3, 4 &rarr; y: 1, 4, 9, 16 linear?
  1. Find the first differences: 4 − 1 = 3, 9 − 4 = 5, 16 − 9 = 7.
  2. The differences are 3, 5, 7 — not the same value each time.
  3. Since the first differences are not constant, the output is not changing at a steady rate.
✓ <strong>No, nonlinear</strong> &mdash; this table actually comes from the rule &ldquo;square the input&rdquo; (y = input&sup2;).

Comparing functions across representations

The same function can be shown four ways: as an equation (a compact rule), a table (specific input−output pairs), a graph (a visual picture), or a verbal description (a sentence). Learning to move between them — and to compare two functions given in different forms, like one as an equation and another as a graph — is a core Grade 8 skill. Whichever form you're given, the fastest way to check linearity is usually the same: look for a constant rate of change.

Reading a graph qualitatively

Not every graph needs numbers to describe. You can often read a story straight from its shape: is the output increasing or decreasing? Is it changing at a constant rate (a straight segment) or a varying rate (a curve)? A car travelling at a steady speed produces a straight, increasing graph of distance over time — equal distances in equal times, so the first differences are constant. A car that is speeding up covers more ground in each successive second, so its distance-time graph bends upward into a curve.

Check your understanding

1. Which of these relations is a function?
In {(1, 3), (2, 5), (3, 3), (4, 7)} every input (1, 2, 3, 4) appears only once. Repeated outputs (like 3 appearing twice) are fine — only a repeated input with two different outputs would break the rule.
2. A graph is crossed twice by a single vertical line. What does that tell you?
A vertical line marks one fixed input value. If it crosses the graph twice, that one input has two different outputs, which violates the definition of a function.
3. A table has evenly spaced inputs 0, 1, 2, 3 with outputs 2, 5, 10, 17. Is the rule linear?
The first differences are 5 − 2 = 3, 10 − 5 = 5, and 17 − 10 = 7. Since they change (3, 5, 7 rather than a fixed number), the rule is nonlinear.
4. Two functions are given, one as an equation y = 4x + 1 and one as a table with first differences of 4. What can you conclude?
y = 4x + 1 has a constant rate of change of 4 (its slope), and constant first differences of 4 in the table signal the same rate of change — so both are linear functions with rate of change 4, though they may still differ in their starting value.
5. A hiker's elevation rises quickly on a gentle early slope, then the trail gets steeper and steeper toward the summit. Which best describes the elevation-vs-distance graph?
Elevation is increasing throughout (uphill), but because the rate of increase itself grows as the trail steepens, the graph is a curve bending upward more sharply, not a straight line.
✅ Key takeaways
  • A function assigns each input exactly one output; repeated inputs with different outputs break the rule.
  • The vertical line test spots non-functions on a graph: a vertical line crossing more than once means one input has two outputs.
  • Rate of change compares output change to input change; for a straight line it is the same value everywhere.
  • Constant first differences across evenly spaced inputs are the signature of a linear rule; changing differences signal nonlinear.
  • The same function can appear as an equation, table, graph, or description &mdash; and graphs can be read qualitatively for increasing, decreasing, linear, or nonlinear behaviour without any numbers at all.