topic badge

3.02 Identify functions

Functions

A function is a special type of relation where each input only has one output. Functions are a way of connecting input values to their corresponding output values.

A function machine with the input arrow on the left leading to the word function in a box with an output arrow on the right

For example, if we think about placing an order for boba teas, the number of boba teas we order (the input) affects the amount we have to pay (the output).

A graphic with three rows. The first row has one boba tea with a right facing arrow pointing to 3 US dollars, the second row with 2 boba teas with a right facing arrow pointing to 6  US dollars, and the third row with thre boba teas with a right facing arrow pointing to  9 US dollars.

\, \\Let's say each boba tea costs \$3. If we bought one boba tea, it would cost \$3, if we bought two boba teas, it would cost \$6 and so on.

Notice how the value of the input (the number of boba teas) always produces exactly one output (cost)?

This is an example of a function.

 A graphic with three rows. The first row has one boba tea with a right facing arrow pointing to 3 US dollars, the second row with 2 boba teas with a one right facing arrow pointing to 6  US dollars and another right facing arrow pointing to 10 US dollars, and the third row with 3 boba teas with a right facing arrow pointing to  9 US dollars.

\, \\However, if our friend also ordered 2 boba teas, but was charged \$10 while we paid \$6, we may be confused and assume that the cash register miscalculated the price.

This is not a function.

A set of 4 function machines representing -2x. They show input values of -1, 0, 1, and 2, and show outputs of 2, 0, -2, and -4. The inside of the function machine should show the operations that occur.

\, \\Another way to look at functions is to look at how inputs map to their output values. The function machine shown represents the relationship y=-2x.

Each input going into the machine is multiplied by -2 and exits the machine as the output, or y-value.

If we put four input values of -1,\,0,\,1,\, and 2, into the machine, it gives four output values of 2,\,0,\,-2,\, and -4.

Notice how each x-value is associated with only one y-value. This means y=-2x is a function.

If you can write a relationship between x and y then we can see that there is a relation. However, if this relationship only gives one value of y for each x-value (or one output for every input) then it is a function.

x-328-15-2
y-138-23-1

This table represents a relation that is a function since each input is only assigned one output. Notice that the output 3 repeats, but the relation is still a function since the inputs are unique.

x-123-1-3-2
y-13-3-431

This table represents a relation but not a function since the input -1 is paired with two outputs of -1 and -4.

Sets of ordered pairs can also show whether or not a relation is a function. The following set of ordered pairs is a function since one input matches to one output:

\left\{\left(-4,-1\right),\left(-2,0\right),\left(0,1\right),\left(2,0\right),\left(3,-2\right),\left(4,3\right)\right\}

This set of ordered pairs is not a function since the inputs of -4 and 2 each repeat with different outputs.

\left\{\left(-4,-1\right),\left(-4,3\right),\left(0,1\right),\left(2,2\right),\left(2,-2\right),\left(4,0\right)\right\}

Graphs can also show one input (x-value) paired with one output (y-value ). By graphing the previous set of ordered pairs, we see the graph of a function and the graph not representing a function.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Function
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Not a function

Examples

Example 1

Determine whether each situation represents a function.

a

The radius of a circle and its circumference.

Worked Solution
Create a strategy

A relation is a function if each input matches to one output.

Apply the idea

The circumference of a circle given the radius is given by 2\pi r. A circle with a specific radius (input) will not have more than one circumference (ouput).

The relationship of a circle's radius and its circumference is a function.

b

Time studied by students in a class and grade on a test.

Worked Solution
Create a strategy

A relation represents a function if each input matches with only one output. A relation is not a function if an input can pair with more than one output.

Apply the idea

Two students can study the same amount of time (input) but get different scores on a test (outputs).

This situation does not represent a function.

c

Age of a town's population compared to height.

Worked Solution
Apply the idea

Two people the same age (input) could be different heights (output). This relation is not a function.

Reflect and check

A relation that is not a function can become a function with additional constraints. If we limited the relation to one person's age and their height, the relation would become a function.

d

The temperature reading on a home's thermostat at a particular time of day.

Worked Solution
Apply the idea

Each moment in time will have a single temperature reading, so the relation is a function.

Reflect and check

Even though the thermostat may register the same temperature at multiple times during the day this is still a function because each time is associated with a single temperature.

Example 2

Determine if each relation is a function.

a
x-8-7-6-3279910
y813-18-16-15-2-411-9
Worked Solution
Create a strategy

The relation is a function if each unique x-value pairs with one y-value.

Apply the idea

We see from the table that the x-value of 9 is paired with two different output values.

A horizontal x/y table with the pairs (-8,8),(-7,13),(-6,-18),(-3,-16),(2,-15),(7,-2),(9,-4),(9,11),(10,-9) and circles around the (9,-4) and (9,11) pair

So, the points do not represent a function.

b
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

A relation is a function if each element in the domain only maps to one element in the range.

Apply the idea

The ordered pairs represented by the graph are

\left\{\left(-1,-3\right),\left(2,-3\right),\left(0,2\right),\left(-3,0\right),\left(1,-1\right),\left(4,-1\right)\right\}

Since all of the domain values are different, the relation is a function.

c

\left\{\left(-1,1\right),\left(3,3\right),\left(2,-1\right),\left(7,1\right)\right\}

Worked Solution
Apply the idea

Each x-coordinate is paired with only one y-coordinate. This means that the set of ordered pairs is a function.

Example 3

Oprah makes scarves to sell at the market. It costs her \$2 to produce each one, and she sells them for \$5.

a

Complete the graph of the points representing the relation between the number of scarves she manages to sell and her total profit for when 1, 2, 3, 4 and 5 scarves are sold. The first point has been plotted for you.

1
2
3
4
5
\text{Quantity}
2
4
6
8
10
12
14
16
18
\text{Profit}
Worked Solution
Create a strategy

The total profit can be found using the formula:

\text{Total profit}= \text{Total revenue}-\text{Total cost}

Apply the idea

\text{Total revenue}=\text{Number of scarves sold}\cdot \$5

\text{Total cost}=\text{Number of scarves sold}\cdot \$2

\displaystyle \text{Profit for 1 scarf}\displaystyle =\displaystyle 1\cdot 5 - 1\cdot 2Substitute the number of scarves
\displaystyle =\displaystyle \$3Evaluate
\displaystyle \text{Profit for 2 scarves}\displaystyle =\displaystyle 2\cdot 5 - 2\cdot 2Substitute the number of scarves
\displaystyle =\displaystyle \$6Evaluate
\displaystyle \text{Profit for 3 scarves}\displaystyle =\displaystyle 3\cdot 5 - 3\cdot 2Substitute the number of scarves
\displaystyle =\displaystyle \$9Evaluate
\displaystyle \text{Profit for 4 scarves}\displaystyle =\displaystyle 4\cdot 5 - 4\cdot 2Substitute the number of scarves
\displaystyle =\displaystyle \$12Evaluate
\displaystyle \text{Profit for 5 scarves}\displaystyle =\displaystyle 5\cdot 5 - 5\cdot 2Substitute the number of scarves
\displaystyle =\displaystyle \$15Evaluate

Plot the pairs of values found.

1
2
3
4
5
\text{Quantity}
2
4
6
8
10
12
14
16
18
\text{Profit}
b

Is this relation a function?

Worked Solution
Create a strategy

This relation is a function if for every quantity sold, there is exactly one total profit.

Apply the idea

Checking each pair of values in the graph, each quantities sold is associated with only one total profit so this relation does represent a function.

Idea summary

The relation is a function if each x-value input, or domain, is paired with exactly one y-value output, or range.

The vertical line test

Exploration

Move the slider until the vertical line crosses the entire graph.

Press the 'Try another' button to try a new graph.

Loading interactive...
  1. What similarities did you notice in the graphs that were labeled as functions?

  2. How did the vertical line help you determine which graphs represented functions?

  3. Would a horizontal line be useful in determining if a relation is a function?

Sometimes it is easier to investigate the graph of a relation to determine whether or not it is a function. When looking at a graph, if you can draw a vertical line anywhere so that it crosses the graph of the relation in more than one place, then it is not a function.

Vertical line test

The graph of a relation is a function if a vertical line intersects the graph of a relation at exactly one point across the entire graph.

Here are two examples of relations being checked with the vertical line test. A function is said to "pass the vertical line test" while a relation that is not a function "fails the vertical line test."

-7
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
7
x
-7
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
7
y
Fails the vertical line test (is not a function)
-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Passes the vertical line test (is a function)

One pair of points is enough to decide that a relation is not a function, but it is not enough to decide that a relation is a function. We must keep checking points on the graph until it either fails the test or we have checked for all x-values.

When classifying, remember that every function is a relation, but not every relation is a function.

Examples

Example 4

Determine whether or not the graph describes a function.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

Draw a vertical line through the points in the graph and check if it only crosses one point at a time

Apply the idea
-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
y

Each vertical line passes through one point at a time, so the graph is a function.

Example 5

Use the vertical line test to justify whether the table shown is a function.

x-24-12-3-21
y15-435-14
Worked Solution
Create a strategy

Graph the points on the coordinate plane and determine if a vertical line passes through more than one point of the relation.

Apply the idea

After graphing the points and using a vertical line to check for points that share an x-value, we see

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
5
y

Since the vertical line passes through both \left(-2,1\right) and \left(-2,-1\right), the relation is not a function.

Idea summary

While all functions are relations, not all relations are functions.

The vertical line test for functions:

-7
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
7
x
-7
-6
-5
-4
-3
-2
-1
1
2
3
4
5
6
7
y

When looking at a graph, if you can draw a vertical line anywhere so that it crosses the graph of the relation in more than one place, then it is not a function.

Outcomes

8.PFA.2

The student will determine whether a given relation is a function and determine the domain and range of a function.

8.PFA.2a

Determine whether a relation, represented by a set of ordered pairs, a table, or a graph of discrete points is a function. Sets are limited to no more than 10 ordered pairs.

What is Mathspace

About Mathspace