Skip to content
Home › Math lessons › Grade 8 › Introduction to Functions: math lesson, Grade 8

Introduction to Functions: math lesson, Grade 8 – download the PDF

  • by
Rate this post
Math lessons Grade 8 : Introduction to Functions — Zyro the alien explorer of Planète Maths

Every time you look up a price, check the temperature, or watch a game score change, one quantity depends on another. Functions give us a precise way to describe that dependence. In this chapter you will learn what a function is, how to show it in four different ways, how to tell lines from curves, and how to compare two functions or sketch one from a story.

1. What is a function?

Think of a machine: you drop in a number, the machine follows a rule, and a number comes out. The number going in is the input, the number coming out is the output.

Definition: function

A function is a rule that assigns to each input exactly one output. We often call the input \(x\) and the output \(y\), and we say that \(y\) is a function of \(x\).

The key words are exactly one. An input may never lead to two different outputs. However, two different inputs are allowed to give the same output.

Example 1: a machine rule

A machine uses the rule \(y = 3x + 1\). The input \(x = 0\) gives \(y = 3(0) + 1 = 1\), the input \(x = 1\) gives \(y = 4\), the input \(x = 2\) gives \(y = 7\) and the input \(x = 5\) gives \(y = 16\). Each input has exactly one output, so the rule is a function.

Input \(x\) 0 1 2 5
Output \(y\) 1 4 7 16
Common mistake

Many students think that two inputs sharing an output breaks the rule. It does not. The pairs \((2, 5)\) and \((3, 5)\) are fine. What is forbidden is \((2, 5)\) together with \((2, 8)\), because the input 2 would have two outputs.

2. Four ways to represent a function

The same function can be described in four ways, and a good mathematician moves easily between them.

  • In words: “A plant is 4 cm tall today and grows 2 cm each day.”
  • With a table: a list of inputs next to their outputs.
  • With an equation: \(y = 2x + 4\), where \(x\) is the number of days.
  • With a graph: the ordered pairs \((x, y)\) plotted on the coordinate plane.
Day \(x\) 0 1 2 3
Height \(y\) (cm) 4 6 8 10
Example 2: from an equation to a graph

Take \(y = 2x + 1\). Choose inputs and compute outputs: \(x = 0 \Rightarrow y = 1\), \(x = 1 \Rightarrow y = 3\), \(x = 2 \Rightarrow y = 5\), \(x = 3 \Rightarrow y = 7\), \(x = 4 \Rightarrow y = 9\). Plot the points \((0, 1), (1, 3), (2, 5), (3, 7), (4, 9)\). They line up, and the straight line through them is the graph.

12345246810(0, 1)(1, 3)(2, 5)(3, 7)(4, 9)

Method: graphing a function from its equation

  1. Pick at least three inputs, including 0.
  2. Compute each output with the rule.
  3. Write the ordered pairs in a table.
  4. Plot the points and connect them if the situation allows any value in between.

3. The vertical line test

Looking at a graph, how can you tell whether it shows a function? A graph shows a function when no input has two outputs. On a graph, all the points with the same input lie on one vertical line. So a vertical line must never touch the graph twice.

Vertical line test

A graph represents a function if and only if every vertical line crosses the graph at most once.

-4-3-2-112342468(2, 2)
-1123456-3-2-1123(0, 0)(1, 1)(1, -1)(4, 2)(4, -2)

In the first graph the dashed line \(x = 2\) meets the curve once. In the second graph the dashed line \(x = 4\) meets the points \((4, 2)\) and \((4, -2)\): the input 4 has two outputs, so this relation is not a function.

4. Linear versus nonlinear functions

A linear function has a graph that is a straight line. Its equation can be written \(y = mx + b\). Every other function is nonlinear: its graph is a curve, or it is a line broken into pieces. For example \(y = x^2\) and \(y = x^3\) are nonlinear.

12324681012

In a table with equally spaced inputs, a linear function has a constant change in the outputs. In a nonlinear function the changes vary.

Example 3: testing a table

For \(y = x^2\), the outputs go \(0, 1, 4, 9, 16\). The changes are \(+1, +3, +5, +7\). They are not constant, so \(y = x^2\) is nonlinear.

\(x\) 0 1 2 3 4
\(y = x^2\) 0 1 4 9 16
Change in \(y\) +1 +3 +5 +7

5. Rate of change and initial value

For a linear function \(y = mx + b\), two numbers tell the whole story.

Definition: rate of change and initial value

The rate of change \(m\) tells how much \(y\) changes when \(x\) increases by 1. It is found with \(m = \dfrac{\text{change in } y}{\text{change in } x}\). The initial value \(b\) is the output when \(x = 0\); it is where the graph crosses the \(y\)-axis.

Example 4: finding the equation from two points

A plant is 4 cm tall on day 0 and 10 cm tall on day 3. The rate of change is \(\dfrac{10 - 4}{3 - 0} = 2\) cm per day. The initial value is 4 cm. The equation is \(y = 2x + 4\). On day 10 the height is \(2(10) + 4 = 24\) cm, which is about 9.4 inches.

A positive rate means the function increases, a negative rate means it decreases, and a rate of 0 means it stays constant. In a real situation, always give the units: dollars per month, gallons per minute, miles per hour.

Zyro’s tip

On my planet we say: “the rate is the staircase, the initial value is the ground floor.” Start at the initial value, then climb one step of size \(m\) for every unit of \(x\)!

6. Comparing two functions

Two functions can be given in different forms: one by an equation, another by a table or a graph. To compare them, first find the rate of change and the initial value of each.

Example 5: two gym plans

Plan A costs \(y = 20x + 15\) dollars for \(x\) months. Plan B is shown by a table: 35 dollars after 1 month, 60 after 2 months, 85 after 3 months. The table has a constant change of 25, so the rate of plan B is 25 dollars per month. Going back one month, the initial value is \(35 - 25 = 10\) dollars, so B is \(y = 25x + 10\).

Plan A has the greater initial value (15 versus 10), but plan B has the greater rate (25 versus 20). The plans cost the same when \(20x + 15 = 25x + 10\), that is \(5 = 5x\), so \(x = 1\). After that, plan B costs more.

1234520406080100120140(1, 35)

7. Sketching a graph from a description

You do not always need numbers to draw a graph. Read the story one piece at a time and decide for each piece whether the graph goes up, goes down, or stays flat, and how steeply.

Method: sketching from a story

  1. Label the horizontal axis (usually time) and the vertical axis (the quantity), with units.
  2. Mark the starting point.
  3. For each stage, draw a segment: rising if the quantity grows, flat if it stays the same, falling if it shrinks.
  4. Steeper segments mean faster changes.
Example 6: a bathtub

A tub is empty. It fills at 3 inches per minute for 4 minutes, so the water reaches 12 inches. Nothing changes for 2 minutes. Then the tub drains at 2 inches per minute for 6 minutes until it is empty again. The points are \((0, 0), (4, 12), (6, 12), (12, 0)\).

246810122468101214(4, 12)(6, 12)(12, 0)

Key takeaways

  • A function assigns to each input exactly one output.
  • A function can be shown with words, a table, an equation or a graph.
  • Vertical line test: a graph is a function if no vertical line crosses it more than once.
  • A linear function has a straight-line graph, \(y = mx + b\), with constant change in a table.
  • The rate of change is \(\dfrac{\text{change in } y}{\text{change in } x}\); the initial value is the output when \(x = 0\).
  • To compare functions, find the rate and the initial value of each, whatever the form.
  • To sketch from a story, draw one segment per stage: up, flat or down.
Do the practice problems : Introduction to Functions: math lesson, Grade 8 – Planète MathsTake the quiz : Introduction to Functions: math lesson, Grade 8 – Planète Maths

Test yourself: quick challenge for Grade 8

Speed drill for Grade 8: how many in 60 seconds?

🚀 Keep exploring with Zyro