X Tables
Algebra Readiness

Function machines

Put numbers through a rule and predict outputs.

Quick answer

A function machine is a tool that takes a number in, applies a rule, and gives you a new number out. You can use it to figure out what the rule is or to predict what number will come out.

Learning outcome

By the end of this page, you will understand how function machines work and be able to use them to solve simple problems with rules and numbers.

  • You can put a number into a function machine and find the output.
  • You can guess what rule a function machine is using.
  • You can use function machines to solve puzzles and real-life problems.
  • You can explain how function machines help with thinking like a mathematician.

Why this matters

Function machines are a fun way to learn about rules and patterns. They help you think like a mathematician by finding what happens when you change something. You use function machines when you cook (following a recipe), play games (figuring out how to score points), or even when you're trying to solve puzzles. They help you get ready for algebra, where you’ll use letters and symbols instead of just numbers.

How it works

Think of a function machine like a magic box. You put a number in, it follows a rule, and then a new number comes out. The rule is always the same, so if you put in the same number, you get the same result.

  1. First, you put a number into the machine.
  2. Then, the machine uses a rule (like "add 3" or "multiply by 2") on that number.
  3. Finally, a new number comes out.

For example, if the rule is "add 5", and you put in 3, the machine gives you 8. That’s because 3 + 5 = 8.

Examples you can see

Let’s look at a few examples of function machines in action.

Input Rule Output
4 Add 2 6
7 Multiply by 3 21
10 Subtract 4 6

You can also use function machines to work backwards. If you know the output and the rule, you can figure out what number went in.

For example, if the rule is "multiply by 2" and the output is 12, the input must have been 6 because 6 × 2 = 12.

Try it as a mini adventure

Imagine you’re a detective solving a mystery! You find a strange machine in a secret cave. It has a slot for numbers and a door that opens to show the result. You try putting in 5 and get 10. You try 3 and get 6. What rule is the machine using?

Let’s play together!

  1. First time: You put in 5, and the output is 10.
  2. Second time: You put in 3, and the output is 6.
  3. Third time: You put in 8, and the output is ?
  4. Fourth time: You put in 1, and the output is ?

Can you guess the rule and find the missing outputs?

Common mistakes

  • Mistake: Thinking that if you get 10 from putting in 5, the rule is "add 5".
    Why it happens: Confusing the input and output numbers.
    Fix: Remember that the rule changes the input to get the output. If 5 + 5 = 10, the rule is "add 5".
  • Mistake: Forgetting that the rule stays the same every time.
    Why it happens: Not paying attention to how the machine works.
    Fix: Try the same number in again to check if you get the same result.
  • Mistake: Guessing the rule too quickly without trying more numbers.
    Why it happens: Wanting to be fast instead of careful.
    Fix: Try at least 3 different numbers to be sure about the rule.

Parent and carer guide

As a parent or carer, you can help by:

  • Playing with your child using function machines at home. Use small numbers and simple rules like "add 2" or "multiply by 2".
  • Encouraging your child to explain their thinking when they solve a problem.
  • Letting them try to guess the rule first, then check if they're right.
  • Not worrying if they make mistakes – that’s how they learn!
  • Connecting function machines to everyday life: like counting how many cookies you get if you bake 3 trays with 4 cookies each.

Remember: Function machines are about patterns and rules, not just math facts. Encourage your child to think about why a rule works and what it means.

Practice questions

  1. If the rule is "add 7" and the input is 9, what is the output?
    Answer: 16
  2. If the rule is "multiply by 4" and the input is 6, what is the output?
    Answer: 24
  3. If the rule is "subtract 3" and the output is 12, what was the input?
    Answer: 15
  4. If the rule is "divide by 2" and the input is 18, what is the output?
    Answer: 9
  5. If the rule is "multiply by 5" and the output is 35, what was the input?
    Answer: 7

FAQ

What is a function machine?
A function machine is a simple idea that takes a number in, uses a rule to change it, and gives you a new number out.

Can function machines have more than one rule?
Yes! You can have a function machine that does one rule, or even two rules in a row. For example, a machine might add 2, then multiply by 3.

Why do we learn about function machines?
Function machines help us get ready for algebra. They teach us how rules work and how to think about numbers in new ways.

How can I make a function machine at home?
You can draw a box and write the rule inside it. Then, write a number in and see what comes out. You can also use a calculator to try different rules.

Are function machines only for maths?
No! You can use function machines to solve puzzles, play games, and even plan how to bake cookies or build with LEGO.