C. Algebra · Linear and Non-Linear RelationsTables, Graphs and Equations: Spotting Linear and Non-Linear Relations
C4.1 C3.1 A1About 70 minutes
Learning goals- I can use first differences in a table of values to decide whether a relation is linear.
- I can tell from an equation whether a relation is linear or non-linear.
- I can compare the graphs of linear and non-linear relations, including y = x², y = 2ˣ and xy = k.
- I can read and change a short program that calculates first differences.
Words to know
table of values
A table that lists pairs of values (x, y) that belong to a relation.
first differences
The differences between consecutive y-values in a table where the x-values go up by equal steps.
degree
The highest exponent on a variable in an equation. A linear equation has degree 1: no x², no x³, no xy.
quadratic relation
A relation like y = x² (degree 2). Its graph is a U-shaped curve called a parabola. You will study these closely in Grade 10.
exponential relation
A relation like y = 2ˣ, where y is multiplied by the same number each time x goes up by 1.
inverse variation
A relation like xy = 12 (or y = 12 ÷ x): when one variable is doubled, the other is halved.
Three relations from one square
Take a square with side length s. Its perimeter is P = 4s. Its area is A = s². Both grow when s grows, but they grow in very different ways. Now take all the rectangles with an area of 12 square units: as the length goes up, the width must go down, because length × width = 12.
In this lesson you will learn to spot the difference between linear and non-linear relations in all three representations: tables, graphs and equations.
1. Tables: use first differences
When the x-values go up by equal steps, subtract each y-value from the next one. These are the first differences.
- If the first differences are all the same, the relation is linear.
- If they are not all the same, the relation is non-linear.
If the x-values are not evenly spaced, first differences do not work. Calculate the rate of change (change in y ÷ change in x) for each step instead, as you did in the last lesson.
Left: the perimeter goes up by 4 every time, so P = 4s is linear. Middle: the area goes up by 1, 3, 5, 7, so A = s² is non-linear. Right: the lengths 1, 2, 3, 4, 6 are not evenly spaced, so compare rates: from l = 1 to 2 the rate is −6 per unit, but from 4 to 6 it is −0.5 per unit, so lw = 12 is non-linear.2. Graphs: straight or curved?
A linear relation graphs as a straight line. Each type of non-linear relation has its own shape:
- y = x² (quadratic) makes a U-shaped curve called a parabola.
- y = 2ˣ (exponential) starts flat and then shoots upward, because y doubles each step.
- xy = 12 (inverse variation) makes a curve called a hyperbola. It gets closer and closer to both axes but never touches them, because neither x nor y can be 0 when their product is 12.
Left: the perimeter line P = 4s is straight, but the area curve A = s² bends upward (they happen to be equal at s = 4, where both are 16). Right: every rectangle with area 12 is a point on the curve lw = 12. As the length grows, the width shrinks, but the curve never reaches either axis.3. Equations: look at the variables
An equation is linear when each variable appears only to the first power and the variables are not multiplied or divided by each other. Examples: y = 3x + 2, y = 5 − 2x, 2x + 5y = 10, x = 4.
An equation is non-linear when it has a squared or cubed variable, a variable in an exponent, the two variables multiplied together, or a variable in a denominator. Examples: y = x² + 1, y = x³, y = 2ˣ, xy = 8, y = 12/x.
| Linear | Non-linear |
|---|
| Table (equal x-steps) | First differences are constant | First differences change |
| Rate of change | Constant | Changes from one interval to the next |
| Graph | Straight line | Curve (parabola, exponential curve, hyperbola, ...) |
| Equation | Degree 1: y = 3x + 2, 2x + 5y = 10 | x², x³, 2ˣ, xy or x in a denominator |
| Intercepts | A slanted line crosses each axis exactly once | Varies: xy = 12 never crosses either axis; y = x² + 1 never crosses the x-axis |
Characteristics of linear and non-linear relations in each representation.Worked exampleExample 1: Classify from the equation
Which equations are linear? (a) y = 5 − 2x (b) y = x² + 1 (c) 3x + 4y = 12 (d) xy = 8 (e) y = 3(2ˣ)
- (a) x has an exponent of 1 and is not multiplied by y: linear.
- (b) x is squared: non-linear (quadratic).
- (c) Each variable has exponent 1 and they are added, not multiplied: linear.
- (d) x and y are multiplied together: non-linear (inverse variation).
- (e) x is in the exponent: non-linear (exponential).
Only (a) and (c) are linear.
Worked exampleExample 2: Build a table and test it
Make a table of values for x = 0, 1, 2, 3, 4 for y = 4x − 3 and for y = 2x² − 1. Use first differences to classify each.
- y = 4x − 3: substitute each x. 4(0) − 3 = −3, 4(1) − 3 = 1, then 5, 9, 13.
- First differences: 1 − (−3) = 4, 5 − 1 = 4, 9 − 5 = 4, 13 − 9 = 4. All equal: linear.
- y = 2x² − 1: 2(0)² − 1 = −1, 2(1)² − 1 = 1, 2(2)² − 1 = 7, 2(3)² − 1 = 17, 2(4)² − 1 = 31.
- First differences: 2, 6, 10, 14. Not equal: non-linear. (Notice that the differences of the differences are all 4. That is a clue for quadratic relations, which you will study in Grade 10.)
y = 4x − 3 is linear (first differences all 4). y = 2x² − 1 is non-linear (first differences 2, 6, 10, 14).
Worked exampleExample 3: Describe a non-linear relation
Describe the characteristics of y = 12/x for positive values of x.
- Table: x = 1, 2, 3, 4, 6, 12 gives y = 12, 6, 4, 3, 2, 1.
- As x increases, y decreases, but by smaller and smaller amounts. The graph is a curve that flattens out.
- x cannot be 0 (you cannot divide by 0), so there is no y-intercept. y can never be 0 either, because 12 ÷ x is never 0, so there is no x-intercept.
- When x is doubled, y is halved: for example x = 3 gives 4 and x = 6 gives 2.
A decreasing, non-linear relation (a hyperbola) with no intercepts. Doubling x halves y.
Let the computer do the subtracting
This short Python program makes a table of values and calculates the first differences. Read it line by line: xs is a list of x-values, the loop subtracts each y-value from the next one, and the if decides whether all the differences are the same (set(diffs) keeps only the different values, so a set of size 1 means they are all equal).
xs = [0, 1, 2, 3, 4, 5]
ys = [x**2 for x in xs]
diffs = []
for i in range(1, len(ys)):
diffs.append(ys[i] - ys[i-1])
print(ys)
print(diffs)
if len(set(diffs)) == 1:
print("linear")
else:
print("non-linear")
# Output:
# [0, 1, 4, 9, 16, 25]
# [1, 3, 5, 7, 9]
# non-linear
Change line 2 to ys = [3*x + 2 for x in xs] and the output becomes [2, 5, 8, 11, 14, 17], then [3, 3, 3, 3, 3], then linear.
Hands-on activityRectangles and squares with coins
You need: 30 coins or small square crackers or LEGO bricks of the same size, paper, a pencil.
- Use 12 pieces. Make every rectangle you can (1 by 12, 2 by 6, 3 by 4, and the same ones turned: 4 by 3, 6 by 2, 12 by 1). Record length and width in a table. Plot the points. Do they make a straight line?
- Now build squares with sides 1, 2, 3 and 4 pieces. Record side length and the number of pieces (the area). Find the first differences.
- For the same squares, count the pieces around the outside edge of each square (for side 1, count 1 piece). Is this table linear?
What to look for: step 1 makes a curve (xy = 12). Step 2 gives 1, 4, 9, 16 with first differences 3, 5, 7: non-linear. Step 3 gives 1, 4, 8, 12: from side 2 onward, each new square has 4 more edge pieces (4(s − 1) pieces), so that part is linear. Side 1 does not fit the rule because the single piece is both the inside and the outside.
Just for funWhy was the parabola such a good skateboarder?
It always knew how to handle a curve.
Your turn
1Is y = 7x − 4 linear or non-linear?
Linear. x has an exponent of 1 and is not multiplied by y.
2Is y = x³ linear or non-linear?
Non-linear. x is cubed (degree 3).
3Is x + y = 10 linear or non-linear?
Linear. Both variables have exponent 1 and they are added.
4Classify using first differences.
x: 0, 1, 2, 3, 4
y: 3, 4, 7, 12, 19
First differences: 1, 3, 5, 7. Not equal, so non-linear.
5Classify using first differences.
x: 0, 1, 2, 3, 4
y: 20, 16.5, 13, 9.5, 6
First differences: all −3.5. Equal, so linear (shrinking).
6Which equation matches this table: y = 6x, y = 6 − x or xy = 6?
x: 1, 2, 3, 4, 6
y: 6, 3, 2, 1.5, 1
xy = 6. Each pair multiplies to 6: 1 × 6, 2 × 3, 3 × 2, 4 × 1.5, 6 × 1.
7In the program, change line 2 to ys = [10 - 2*x for x in xs]. What are the three lines of output?
[10, 8, 6, 4, 2, 0], then [-2, -2, -2, -2, -2], then linear.
More practice: warm-up
1The first differences of a table are 5, 5, 5, 5. Linear or non-linear?
2Is the graph of y = x² a straight line?
No. It is a U-shaped curve called a parabola.
4Find the first differences of the y-values 1, 4, 7, 10.
5Which is linear: xy = 20 or y = 20x?
y = 20x. In xy = 20 the variables are multiplied together.
More practice: on your own
1Make a table for y = x² − 3 for x = −2, −1, 0, 1, 2 and find the first differences.
y-values: 1, −2, −3, −2, 1. First differences: −3, −1, 1, 3. Not equal, so non-linear. (The table is symmetric because (−2)² and 2² are both 4.)
2Make a table for y = 2ˣ for x = 0 to 5. What do you notice?
y: 1, 2, 4, 8, 16, 32. First differences 1, 2, 4, 8, 16 are not equal (non-linear), but each y-value is 2 times the one before (a constant ratio): that is the mark of an exponential relation.
3Show that 2x + 3y = 6 is linear by making a table for x = 0, 3, 6.
x = 0: 3y = 6, y = 2. x = 3: 6 + 3y = 6, y = 0. x = 6: 12 + 3y = 6, 3y = −6, y = −2. Every step of 3 in x changes y by −2, a constant rate of −2/3, so it is linear.
4Make a table for y = 24/x for x = 1, 2, 3, 4. Is it linear? What happens to y as x gets very large?
y: 24, 12, 8, 6. Differences −12, −4, −2: non-linear. As x gets very large, y gets closer and closer to 0 but never reaches it (for example x = 240 gives 0.1).
5Explain why y = 3x + 5 always has first differences of 3 when x goes up by 1.
When x goes up by 1, the term 3x goes up by 3 × 1 = 3. The +5 is the same for every x, so it does not change the difference. So every first difference is 3.
Challenge
1x: 0, 1, 2, 3, 4 and y: 2, 5, 10, 17, 26. Is the relation linear? Use the pattern in the first differences to predict y when x = 5.
First differences: 3, 5, 7, 9, so it is non-linear. They go up by 2 each time, so the next difference is 11 and y = 26 + 11 = 37. (The equation is y = x² + 2x + 2; check: 25 + 10 + 2 = 37.)
2Change the program so it prints the ratios ys[i] / ys[i-1] instead of differences, and run it for ys = [2**x for x in xs]. What does it print for the ratios?
Replace line 5 with diffs.append(ys[i] / ys[i-1]) (and rename the list if you like). For 1, 2, 4, 8, 16, 32 the ratios print as [2.0, 2.0, 2.0, 2.0, 2.0]: a constant ratio, which shows the relation is exponential. Python shows 2.0 because / always gives a decimal answer. The last part would still print "linear", so you should also change that message to something like "constant ratio".
3Sam says "y = 3/x is linear because there are no exponents." Explain why Sam is wrong, using a table and the equation.
Table: x = 1, 2, 3 gives y = 3, 1.5, 1. Differences −1.5 and −0.5 are not equal, so it is non-linear. In the equation, x is in the denominator (y × x = 3, so the variables are multiplied), which makes it inverse variation, not linear.
Check your understandingQuiz
1. Which equation is linear?
2. A table with equal x-steps has first differences 6, 6, 6, 6. The relation is:
3. y-values 1, 2, 5, 10, 17 for x = 0, 1, 2, 3, 4. Why is this non-linear?
4. What does the graph of xy = 12 look like for positive x?
5. The program runs with ys = [4*x - 1 for x in [0, 1, 2, 3]]. What list of differences does it print?
6. Which relation is linear and passes through (0, 0)?
For parents and teachersBig idea: Expectation C4.1 asks students to compare the characteristics of graphs, tables of values and equations of linear and non-linear relations. Students should be able to recognize a linear relation in any of the three forms: constant first differences, a straight graph, or an equation of degree 1.
Common difficulties:
- Using first differences when the x-values are not evenly spaced. In that case, calculate rates (change in y ÷ change in x).
- Thinking "no exponent" means linear. xy = 8 and y = 12/x have no visible exponents but are not linear.
- Sign errors when subtracting negative y-values (1 − (−3) = 4).
How to help: Ask your child to explain the program in their own words; they do not need a computer to trace it by hand. If you have Python available, typing it in is a nice extension, but it is not required. The coin activity is a good way to see that some relations bend.