GoalUse a function machine to find outputs for different inputs, including negative numbers and fractions, and explain why a function gives only one output for each input.
New words
function · a rule that gives exactly one output for each inputinput · the number you put into the machineoutput · the number that comes out
Explanation
A function machine takes an input, does one operation after another in the order shown, and gives an output. Always follow the order: ‘multiply by 3 and then subtract 2’ is different from ‘subtract 2 and then multiply by 3’. A table of values shows several inputs and their outputs. With negative inputs, take care with the signs. With fractions, you can write the answer as a decimal or as a mixed number. The key idea of a function is that each input gives only one output. A machine that could give two different outputs for the same input is not a function.
Worked examples
Input
2
1
0
−1
−2
Output
4
1
−2
−5
−8
Machine: × 3 then − 2. Put in 2, 1, 0, −1 and −2. 2 × 3 − 2 = 4; 1 × 3 − 2 = 1; 0 × 3 − 2 = −2; −1 × 3 − 2 = −5; −2 × 3 − 2 = −8. Each input has exactly one output.
Input
6
2
1
−2
Output
4 1/2
3 1/2
3 1/4
2 1/2
Machine: ÷ 4 then + 3. Inputs 6, 2, 1 and −2. 6 ÷ 4 + 3 = 4 1/2; 2 ÷ 4 + 3 = 3 1/2; 1 ÷ 4 + 3 = 3 1/4; −2 ÷ 4 + 3 = 2 1/2. The outputs are not whole numbers, but they are still exactly one value each.
A machine says ‘find a square root, then add 2’ and the input is 16. The square roots of 16 are 4 and −4, so the output could be 6 or −2: two outputs. In this form, it is not a function. (If we only use the positive root, the one on the calculator’s square root key, the machine is a function again.)
Class activity
Machine game. One player is the machine and chooses a secret rule with two steps, such as ‘+ 5 then × 2’. The other player says an input and the machine says the output. After four inputs, the guesser writes the rule. Swap roles. Use negative numbers and decimals too.
Practice
1
Machine: + 5 then × 2. Find the outputs for inputs 3, 0, −5 and 1.5.
The table shows the inputs and outputs of a two-step machine that multiplies and then adds. Find the machine.
Input
0
1
2
3
Output
3
5
7
9
The outputs go up by 2 for each step of 1 in the input, so the first operation is × 2. For input 0 the output is 3, so the second operation is + 3. The machine is × 2 then + 3.
4
A table shows: input 1 gives 4, input 2 gives 6, and input 1 also gives 5. Explain why this cannot come from a function machine.
Input
1
2
1
Output
4
6
5
The input 1 has two different outputs, 4 and 5. A function must give exactly one output for each input.