Function Machines
Working forwards and backwards through function machines to find inputs, outputs and rules.
What is Function Machines?
A function machine takes an input number, applies one or more operations, and produces an output. In the 11+ exam, you may need to find the output (working forwards), the input (working backwards), or the rule itself.
Working backwards through a function machine uses inverse operations – the same skill you need for solving equations.
Step-by-Step Method
Working forwards: apply operations in order
Start with the input, apply the first operation, then the second, and so on until you reach the output.
Working backwards: use inverse operations in reverse order
Start with the output and undo each operation from right to left. Addition becomes subtraction, multiplication becomes division.
Finding the rule: compare input and output
Try common operations (add, subtract, multiply, divide) to see which one transforms the input to the output.
For two-step machines, test both operations
If one operation does not work alone, try pairs: “multiply then add” or “subtract then multiply”.
Check with all given input/output pairs
Your rule must work for every pair given, not just the first one.
Worked Examples
Input: 5. Operations: x3, then +2. What is the output?
Working
- Start with 5.
- 5 x 3 = 15.
- 15 + 2 = 17.
Output: 20. Operations: x4, then -8. What was the input?
Working
- Start with output 20 and work backwards.
- Undo “-8”: 20 + 8 = 28.
- Undo “x4”: 28 / 4 = 7.
Input 3 gives output 11. Input 5 gives output 17. What is the rule?
Working
- Try “multiply then add”. 3 x ? + ? = 11.
- Try x3: 3×3=9, need +2 to get 11. Check: 5×3=15, 15+2=17. It works!
- The rule is: multiply by 3, then add 2.
Common Mistakes
Applying operations in the wrong order when working backwards.
When working backwards, reverse the ORDER of operations as well as using inverse operations.
Forgetting to use inverse operations when working backwards (e.g. still adding instead of subtracting).
Backwards means undo: addition becomes subtraction, multiplication becomes division.
Finding a rule that works for one pair but not the others.
Always test your rule with every input/output pair given.
Top Tips
- When working backwards, write “undo” above each operation as a reminder to use the inverse.
- Common two-step rules: multiply then add, multiply then subtract, add then multiply.
- If you cannot find the rule, try making a table and looking for the pattern in the differences.
- Function machines are closely linked to equations: if the machine does “x3 +2” and the output is 17, the equation is 3n + 2 = 17.
Ready to practise?
Put these techniques into action with our free practice papers.
Practise Maths Questions