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.
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 | -1 | 0 | 1 | 2 |
---|---|---|---|---|
y | -2 | 0 | 2 | 4 |
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.
The pairs of values in the table represent a relation between x and y.
x | -8 | -7 | -6 | -3 | 2 | 7 | 9 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|
y | 8 | 13 | -18 | -16 | -15 | -2 | -4 | 11 | -9 |
Do they represent a function?
Oprah makes scarves to sell at the market. It costs her \$2 to produce each one, and she sells them for \$5.
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.
Is this relation a function?
The relation is a function if for every x-value, there is exactly one y-value.
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.
Determine whether the following graph describes a function or a relation.
While all functions are relations, not all relations are functions.
The vertical line test for functions: