topic badge

3.03 Identifying functions

Introduction

We've previously learned that a relation is a relationship between sets of information. In a relation it's possible that multiple values could be assigned to a single value, so there's not one clear answer.

We'll now look at a type of relationship where each input only corresponds to a single output.

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.

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).

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. Do you notice how the value of our input (the number of boba teas) always produces exactly one output (cost)? This is an example of a function.

Let's look at another example. Say we have the expression y=2x. Let's construct a table of values to record the results. Based on the equation we can find the y-value by multiplying the x-value by 2.

x-1012
y-2024

See how each x-value is associated with only one y-value? This means this data displays 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 yields one value of y for each x value (or one output for every input) then it is a function.

Examples

Example 1

The pairs of values in the table represent a relation between x and y.

x-8-7-6-3279910
y813-18-16-15-2-411-9

Do they represent a function?

Worked Solution
Create a strategy

The relation is a function if for every x-value, there is exactly one y-value.

Apply the idea

The x-value of 9 yields the y-values of -4 and 11. So, the points do not represent a function.

Example 2

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}\times \$5

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

\displaystyle \text{Profit for 1 scarf}\displaystyle =\displaystyle 1\times 5 - 1\times 2Substitute the number of scarves
\displaystyle =\displaystyle \$3Evaluate
\displaystyle \text{Profit for 2 scarves}\displaystyle =\displaystyle 2\times 5 - 2\times 2Substitute the number of scarves
\displaystyle =\displaystyle \$6Evaluate
\displaystyle \text{Profit for 3 scarves}\displaystyle =\displaystyle 3\times 5 - 3\times 2Substitute the number of scarves
\displaystyle =\displaystyle \$9Evaluate
\displaystyle \text{Profit for 4 scarves}\displaystyle =\displaystyle 4\times 5 - 4\times 2Substitute the number of scarves
\displaystyle =\displaystyle \$12Evaluate
\displaystyle \text{Profit for 5 scarves}\displaystyle =\displaystyle 5\times 5 - 5\times 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 for every x-value, there is exactly one y-value.

The vertical line test

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

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.

Here is an example of a relation that is not a function. See how when the blue vertical line is drawn in, it crossed the graph in two places?

Make sure to check the entire graph. In other words, functions have to pass the vertical line test at every point. If it fails in even one spot then it is not a function.

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

Examples

Example 3

Determine whether the following graph describes a function or a relation.

-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.

Idea summary

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

The vertical line test for functions:

-5
-4
-3
-2
-1
1
2
3
4
5
x
-5
-4
-3
-2
-1
1
2
3
4
5
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.15a

Determine whether a given relation is a function

What is Mathspace

About Mathspace