🎒 Learn & Play👤 Parents
← Number

⚙️ Function

A function machine

A function machine takes a number in, does something to it, and sends a different number out.

IN → × 5 → − 4 → OUT

Put 7 in: 7 × 5 = 35, then 35 − 4 = 31 comes out.

Do the steps in the order they are written, left to right. This is the one place where you do not think about BODMAS: the machine has already decided the order for you.

Working a machine backwards

If you are told what came out and asked what went in, go back through the machine the other way, undoing each step.

IN → × 4 → + 2 → OUT, and 26 came out.

Going back Working
undo the + 2 26 − 2 = 24
undo the × 4 24 ÷ 4 = 6

So 6 went in. Check it forwards: 6 × 4 = 24, and 24 + 2 = 26 ✔

Top tip: backwards means last step first and opposite signs. It is exactly the same skill as solving an equation, where you undo the outside layer first.

The other kind: scaling an answer

If 9 × m = 72, then 3 × m = ?

m is the same number in both lines. So instead of working m out, look at what happened to the number in front of it.

9 became 3, which is three times smaller. So the answer is three times smaller too: 72 ÷ 3 = 24.

The slow way works as well, and it is a good check: 72 ÷ 9 = 8, so m is 8, and 3 × 8 = 24 ✔

Front number Answer
first line 9 72
second line 3 (÷ 3) 24 (÷ 3)

Whatever you do to the front number, do to the answer. It works upwards too: if 6 × t = 54, then 12 × t is double, so 54 × 2 = 108.

Watch out! Look at how the front number changed, not at the gap between the numbers. Going from 9 to 3 is divide by 3, not “take away 6”, so the answer is divided by 3 as well.

Scaling with fractions

Exactly the same idea, and the fractions make it look harder than it is.

If 4/7 of w = 28, then 1/7 of w = ?

Sevenths are the same in both lines, so ask: how do you get from 4 sevenths to 1 seventh? Divide by 4. So the answer is 28 ÷ 4 = 7.

If 1/3 of p = 12, then 1/6 of p = ?

A sixth is half of a third, so halve the answer: 12 ÷ 2 = 6.

Top tip: if the scaling will not come out neatly, fall back on the slow way: find the whole number first. In the second one, 1/3 of p = 12 means p = 36, and a sixth of 36 is 6. Same answer, a few seconds longer.

🎮 In and outQuestion 1 of 7

⚙️

A machine multiplies by 5, then takes away 4. What comes out when 7 goes in?