14.1 The idea of a function — Learn
Prerequisites: substituting values into expressions from Section 10.2, and the order of operations from Section 1.4.
Objectives: say what a function is; name the input and the output of a rule; find the output for a given input; decide whether a rule is a function; write down the domain and the range.
By the end of this section, you can say what a function is and decide whether a rule is a function.
A rule with one answer
A function is a rule that takes each input and gives exactly one output.
Think of a vending machine. You press a button, and you get one item. You cannot press one button and get two different items. The button is the input and the item is the output.
Many everyday rules are functions.
- The cost of petrol depends on the number of litres.
- The number of minutes in some hours depends on the number of hours.
- The temperature in degrees Fahrenheit depends on the temperature in degrees Celsius.
Each of these rules gives one answer for each input. That is what makes it a function.
Function machines
It helps to picture a function as a machine. You drop an input in at one end, the machine applies its rule, and an output comes out at the other end.
The machine double, then add 1 works like this.
| Input | Double it | Add 1 | Output |
|---|---|---|---|
| 1 | 2 | 3 | 3 |
| 2 | 4 | 5 | 5 |
| 3 | 6 | 7 | 7 |
| 4 | 8 | 9 | 9 |
The input 3 gives the output 7. It cannot give any other output, because the rule is fixed. This machine is a function.
Input, output, domain and range
Four words describe the two sets of numbers in a function.
- The input is the number you choose. It is the number you put into the machine.
- The output is the number the rule gives back.
- The domain is the set of all the inputs the function allows.
- The range is the set of all the outputs the function produces.
A function that doubles each whole number from 1 to 5 has domain and range .
The co-domain is the wider set of numbers the outputs come from. For that doubling function the co-domain is the whole numbers. The range sits inside the co-domain.
One output for each input
The rule matters, not the number of outputs in total. Two different inputs may share one output, and the rule is still a function.
The machine square the input gives 9 for the input 3, and it also gives 9 for the input . Both inputs have one output each, so squaring is a function.
Now turn the rule around. Start with the output 9 and ask which input produced it. The answer is 3 or . One input has two answers, so this reverse rule is not a function.
A rule is not a function when a single input gives two or more different outputs. The square root rule does this. The square root of 9 is written as 3 or , so it has two answers for one input.
Functions in a table
A table shows a function when every input appears once.
| Input | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| Output | 4 | 10 | 16 | 22 |
Each input has one output, so the table shows a function.
A table is not a function when one input has two outputs.
| Input | 4 | 4 | 5 |
|---|---|---|---|
| Output | 8 | 10 | 13 |
The input 4 appears twice, with the outputs 8 and 10. That is not a function.
The garden bed
The chapter problem gives a rule. The width of the bed is metres, and the area is
For a width of 2 m the fenced length is 8 m, so the area is . For a width of 4 m the fenced length is 4 m, so the area is .
Both widths give 16 square metres. That is allowed. Each width still has exactly one area, so the area is a function of the width.
The reverse rule is not a function. The area 16 comes from a width of 2 m or a width of 4 m, so one input would have two outputs.
Progress check
Return to the chapter problem. The garden bed has width metres and area square metres.
- Find the area when the width is 1 m.
- Find the area when the width is 5 m.
- Do the two widths give one area each? Explain why the area is a function of the width.
In Section 14.2 you will write this rule in function notation and use it to find a width.
You should now be able to
- say what a function is, in terms of inputs and outputs;
- find the output for a given input;
- name the domain, the range and the co-domain of a simple function;
- decide whether a table or a rule is a function, and explain your decision;
- explain why the area of the garden bed is a function of its width.