Grade6 20210331 Functions
Grade6 20210331 Functions
What is a Function?
A function performs an action on an input to produce an output.
We could define a function that makes “ pie,” where the blank is filled with a type of
pie filling as an input. Inputting “apple” would give us “apple pie,” and inputting “pumpkin”
would give us “pumpkin pie.” However, we would not be able to use “book” as an input,
because it is not a pie filling!
Additionally, a function only produces one output for each input. So, with the pie function
above, inputting “blueberry” can only produce one kind of pie: “blueberry pie.”
Mathematically, functions are written like this: f (x). The letter f is the name of the
function, and x is the name of the variable. In math, a variable is a placeholder for a
number, like the blank line in our pie function is a placeholder for a pie filling. Variables
behave the same way that a number would: you can add, subtract, multiply, divide, and
do exponential operations with them. Note that when a number and a variable are directly
beside each other, this signifies multiplication.
Example 1:
• x+3 • 2x = 2 × x
1 1×x x
• x − 0.5 • 5
x = 5
= 5
=x÷5
2 3
• x÷ =x× = 32 x
• 100 − x 3 2
These mathematical expressions with a variable are also examples of a “rule” that a func-
tion could follow. A number goes into the function as the input, and the function follows
this given rule to produce an output based on the value of the input.
As with our pie function, the function f should only be able to produce one output for each
input value of x.
1
Example 2: Let’s set the rule to be f (x) = x + 3. That means that:
You’ll most commonly see f used as the function name and x used as the variable, but you
can use any symbol to represent the function name and the variable. For example, we could
have g(x), F (a), r(t), or g(α).
Solution:
g(0) = 2(0) + 1 = 0 + 1 = 1.
g(1) = 2(1) + 1 = 2 + 1 = 3.
g(2) = 2(2) + 1 = 4 + 1 = 5.
g(10) = 2(10) + 1 = 20 + 1 = 21.
Question 2:
Let
a + 1 if a is odd.
h(a) =
a ÷ 2 if a is even.
Solution: Like before, for any value of a, we input the number into the function h to
calculate h(a).
2
Notice that each input value only produces one output value, but the outputs from different
input values can be the same.
Number Systems
A number system is a set of numbers. In particular, we will be using the following sets in
this lesson:
• Natural Numbers (N): the set of all positive whole numbers, i.e. {1, 2, 3, ...}
• Integers (Z): the set of numbers in N, their additive inverses, and zero, ie. {..., -3,
-2, -1, 0, 1, 2, 3, ...}
• Real Numbers (R): the set of all numbers on the number line; any number that can
be written as a decimal
You can learn more about number systems in the Winter 2021 Math Circles lesson Set
Theory .
Sometimes, we will want to express that an input or output to a function must be an element
of a set. If we have a variable x for example, we might use the symbol ∈ (“is an element
of”) to write x ∈ R, meaning that “the value of x must be in the set of real numbers.” To
further specify the set of numbers that a value must belong to, we can use symbols such as
=, 6=, <, ≤, >, ≥, and ∈
/ (“not an element of”).
Example 3:
“The set of natural numbers less than or equal to ten” can be written as {n ∈ N, n ≤
10} for variable n. It can also be written as {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
“The set of real numbers strictly greater than zero” can be written as {x ∈ R, x > 0}
for variable x.
Overall, it’s worth noting that descriptions of a function’s domain or set don’t always have
to be in mathematical notation. It’s perfectly okay to use words!
3
Domain
The domain of a function is the set of all possible values that can be inputted into a given
function to produce a defined output.
Thinking back to the pie function, the function “ pie” only accepts inputs that are
pie fillings. Thus, the domain is simply {all pie fillings}. For inputs outside of this domain,
there is no rule in the function to produce a defined output.
Example 4:
Let
1 if α = 10.
t(α) =
2 if α = 15.
However, notice that if we try to input any other value of α, the output of t(α) simply
isn’t defined! For example, there is no defined value of t(25) or t(1) or t(0). Thus, the
only possible values of α are 10 and 15, and so the domain of t is {10, 15}.
An important note is that in mathematics, you cannot divide by zero. Any fraction x0 , where
x ∈ R, is undefined. For example, there is no value assigned to 01 ; you simply cannot
perform this calculation, because it doesn’t make any sense!
1
If we have z = 4, then r(z) = r(4) = (4) = 0.25.
1
If we have z = 0.5, then r(z) = r(0.5) = 0.5 = 2.
However, if we have z = 0, then r(z) = r(0) = 10 , which is undefined.
The number zero is not a valid input to r(z), and it is also the only number that is
not a valid input to r(z). You can divide one by every other real number. (Why?)
Thus, that gives us a domain of all real numbers except for zero. We can also express
this domain as {z ∈ R, z 6= 0}.
4
When working with functions that have a variable as a divisor or in the denominator of a
fraction, it is important to remember that you cannot divide a number by zero. An important
step in determining the domain of a function is specifying (and excluding) all input values
that would result in division by zero.
2
Question 3: Let I(x) = x−5
. Determine the domain.
Solution: Since this function has a variable in the denominator of a fraction, we need
to determine what value(s) of x would result in attempted division by zero. The
denominator is (x − 5), so x = 5 would result in a denominator of (5) − 5 = 0.
Range
The range of a function is the set of all possible outputs from a function and domain.
Thinking back to the pie function one last time, given that the domain is {all pie fillings},
we can say that the range is {all pies}.
From Example 5, we know that the domain of t is {10, 15}. With this function and
domain, the only possible outputs are 1 and 2.
Question 4: Let s(p) = p2 . What are the domain and range of s(p)?
Solution: There are no values of p that would cause s(p) to be undefined, so the
domain is simply R.
For any value of p ∈ R, if you square it, it becomes non-negative. In fact, it’s impossible
to have a value of s(p) that is negative! Thus, the range is {all non-negative real
numbers}, or {s(p) ∈ R, s(p) ≥ 0}.
5
Question 5: A submarine is diving into the ocean at a rate of 18 metres per minute,
starting at the ocean surface with a depth of 0m. A submarine that is 90m underwater
would have a depth of −90m. Express the depth of the submarine as a function of
the number of minutes it has spent diving. What are the domain and range of this
function?
Solution: We’ll use D as the function name (to represent “depth”), and t as the
variable name (to represent “time”). At t = 0, the submarine is at the ocean surface,
so D(0) = 0. For each minute, the submarine dives another 18 metres. Thus, we have
the function D(t) = −18t to calculate the submarine’s depth as a function of time.
To find the domain, we consider what values of t are valid. Any non-negative amount
of time makes sense (whereas a negative amount doesn’t), since there is no theoretical
maximum number of minutes that the submarine could spend diving. The value of t
could be any non-negative real number. Thus, we have the domain {t ∈ R, t ≥ 0}.
To find the range, we can then consider what values of D(t) are possible given the
function and domain. Since we have established that t ≥ 0, the value of D(t) cannot
be positive—you would need a negative value of t for D(t) to be positive. Thus, we
have the range {D(t) ∈ R, D(t) ≤ 0}. This makes sense in the context of the questions
as well; you can’t dive in a submarine and end up floating above the water!