Method: forwards for the output
When you see an input number and the machine, apply each operation in turn.
- Write the input.
- Apply the first operation and write the result.
- Apply the next operation to that result.
- The final result is the output.
Paper Together: sit a paper in a room with your friends.See how it works
This page sets out the method for function machines in the order you would use it, then walks through the full lesson explanation. For three complete worked examples with the slips that cost marks, see the Function machines topic page.
When you see an input number and the machine, apply each operation in turn.
When you see the output and need the input, reverse the machine.
The input is the number you start with.
The output is the number after every step.
Do the steps from left to right, as drawn.
× 2 then + 3 is not the same as + 3 then × 2.
Input 5, × 2, + 3 gives 13.
Write the middle number so you can check it.
To undo + 3 then × 2, divide by 2 and then subtract 3.
The inverse runs the steps backwards and uses the opposite operations.
If the input is n, × 3 then − 1 gives 3n − 1.
That expression is the rule of the machine.
Put the output back through the inverse.
You should land on the input.
Write the input, then the result after each box, with an arrow between them. For an input of 6 through "multiply by 3" then "subtract 4", the line is 6arrow 18arrow 14. Showing the middle value is the method, not a waste of space. It is also the easiest place to spot that you multiplied 6 by 4 instead of by 3.
Keep the order of the boxes. "Multiply by 3 then subtract 4" is not the same machine as "subtract 4 then multiply by 3". On an input of 6 the first gives 14 and the second gives 6. If the output looks far too big or far too small, check which box you used first before you redo the arithmetic.
Method: 1. Record the input and the value after each box, with an arrow between the values. 2. An input of 6 through multiply by 3 then subtract 4 is written 6arrow 18arrow 14. 3. Leave the middle value visible. It is part of the method.
Draw the inverse under each arrow before you calculate. A machine that multiplies by 4 and then adds 5 is undone by subtracting 5 and then dividing by 4. From an output of 29: 29-5=24, then 24÷ 4=6. The input is 6. Run 6 forwards as a check: 6× 4=24, 24+5=29. Ten seconds of checking catches a reversed inverse.
A negative output is not a signal to stop. The same inverse steps work. If the machine is "subtract 8 then multiply by 3" and the output is -6, divide by 3 first to get -2, then add 8 to get 6. The input is 6. Check: 6-8=-2 and -2× 3=-6. Write each inverse on its own line so a sign does not get absorbed into the next operation.
Method: 1. Write the inverse of each box before you calculate. 2. Undo multiply by 4 then add 5 by subtracting 5 first and dividing by 4 second. 3. From an output of 29, work out 29-5=24 and then 24÷ 4=6.
When the input is x, write the expression after every box. "Add 3, then multiply by 2, then subtract 7" becomes xarrow x+3arrow 2(x+3)arrow 2(x+3)-7. Expand only at the end if you need a simplified form: 2x+6-7=2x-1. The bracket is doing real work. Writing x+3× 2-7 multiplies only the 3.
Once you have the expression, an output becomes an equation. If 2x-1=17, then 2x=18 and x=9. That input should survive a forwards check: 9+3=12, 12× 2=24, 24-7=17. The algebra and the machine are the same story. If they disagree, the bracket or the inverse order is the place to look.
Method: 1. Use x as the input and write a fresh expression after every box. 2. Add 3, multiply by 2, then subtract 7 runs xarrow x+3arrow 2(x+3)arrow 2(x+3)-7. 3. Expand only at the end if a simplified form is needed: 2x+6-7=2x-1.
Exam machines are not always two boxes with positive numbers. You may be given an input such as -4, a machine with three boxes, or a machine that divides. The rule never changes: apply the boxes one at a time from left to right, and write the number after each box. For the machine "multiply by 2, then subtract 10" and input -4 you get -8 and then -18.
Take care with signs. Multiplying a negative by a positive gives a negative, and subtracting a positive makes a negative number more negative. Writing the value after every box gives you a method mark even if one box goes wrong. Draw the machine as a row of boxes with arrows, or list the steps as -4to-8to-18, so you can see the order at a glance.
Method: 1. Write the input at the start of a row. 2. Apply the first box and write the new value, then the second box, and so on. 3. Keep track of negative signs on every line. 4. Read the last value as the output and check the order of the boxes against the question.
Tip: The order of the boxes matters. Add then multiply gives a different answer from multiply then add.
To find an input from an output you undo the machine. Start at the output, go through the boxes in reverse order and use the opposite operation in each. For "multiply by 3, then subtract 5" the inverse is "add 5, then divide by 3". An output of 22 becomes 27 and then 9, so the input is 9.
The order is where marks go. If you divide by 3 before adding 5 you will get a wrong input. Always check by putting your answer back into the original machine: 9×3=27 and 27-5=22. This forward check takes a few seconds and works for every function machine question. Write it as a line of working so a method mark is safe.
Method: 1. List the boxes in order, then write them backwards. 2. Change each operation to its opposite: add and subtract, multiply and divide. 3. Start at the output and apply the opposites in the new order. 4. Put the input you found back through the original machine to check.
A harder question gives you two input and output pairs and asks you to complete the machine. For a machine "multiply by square then add square", suppose input 3 gives 17 and input 6 gives 32. When the input goes up by 3 the output goes up by 15, so each increase of 1 in the input adds 5 to the output. That means the multiplier is 5.
Now find the adding number. With input 3: 3×5=15 and the output is 17, so you add 2. Check with the other pair: 6×5=30 and 30+2=32. When both pairs work, the rule is correct. If you cannot see the multiplier, divide the change in output by the change in input. The second box is then found from either pair.
Method: 1. Work out how much the input changes and how much the output changes. 2. Divide the change in output by the change in input to find the multiplier. 3. Use one pair to find what is added or subtracted. 4. Check the rule on the other pair.
Instead of a number, an exam question often says "work out a formula for d in terms of c". Treat c like any input and write the output after each box. For the machine "add 5, then multiply by 2" the output is 2(c+5), because the multiplying applies to the whole sum. Expand it to get 2c+10 if the question wants the simplest form.
A formula can be used both ways. If the output is known, solve for the input. If d=2c+10 and d=26 then 2c=16 and c=8. Always write the left-hand side such as d= in a formula. Two machines can be compared by finding the output of each for the same input, or by writing both as formulae and comparing the numbers.
Method: 1. Write the input letter in the first box. 2. Write the expression after each box, using brackets when an addition or subtraction comes before a multiplication. 3. Expand and collect like terms if the question says simplest form. 4. Test the formula with a small number and the machine.
AQA-style and Edexcel-style questions. Yumio is not affiliated with, endorsed by or connected to AQA, Pearson Edexcel or any other exam board.