A function changes one value into another. It consists of an input value, the function itself, and an output value. The function describes how the input is changed to the output. For example, a function may be add 3:
if the input is 4
the function is add 3, so 4 + 3
to make the output 7.
This can be written as a table to show multiple input values. Note that the function always stays the same. This process is mapping the input values to the output values.
Input | Add 3 | Output |
1 | 1 + 3 | 4 |
2 | 2 + 3 | 5 |
3 | 3 + 3 | 6 |
4 | 4 + 3 | 7 |
5 | 5 + 3 | 8 |
Functions may have more than one stage: for example, multiply by 2, then add 4 has two stages. If the input was 3, then:
input 3 → x 2 (=6) → + 4 (=10) → output 10.
One function is defined as add 7. A second function is defined as add 3.
What would be the single equivalent function?
Adding 7 to a number then adding 3 is the equivalent of adding 10.
Answer: Add 10.
A function is defined as add 2, then multiply by 5. If the input is 7, what is the output?
Input 7 → + 2 (= 9) → x 5 (= 45) → output 45
Answer: 45
See also Substituting into Expressions