Skip to main content

What is a function machine?

function machine
Function machines are versatile tools in the teaching of mathematics, helping children understand and explore a wide range of mathematical concepts in a fun and engaging way. From basic operations in Key Stage 1 to more complex functions in Upper Key Stage 2, function machines can help play a crucial role in developing children's mathematical understanding and skills.

What is a function machine?

A function machine is a visual aid often used in maths lessons to demonstrate and simplify the concept of functions in mathematics. You can think of it as a magical box that takes an input, performs a specific operation on it, and then produces an output. When we talk about operations in maths, we just mean addition, subtraction, division and multiplication. The function machine is an excellent way to introduce children to the idea that a single operation or a set of operations can transform a number into another number.

How does a function machine work?

Visualise a machine with two openings—one for the input and the other for the output. If we feed a number into the machine, it is ‘processed’ by the operation (this is the function) and the result appears in the output box. For instance, let's consider a function machine that adds 5 to any number that is fed into it. If we input the number 3, the machine will add 5 to 3, and the output will be 8. Here is a visual representation of this:

image of a basic function machine

What does a function machine look like?

Function machines may be presented to children during lessons like this:

function machine example

They can also be presented in the form of a worksheet or sometimes on a laminated card where numbers can be recorded. There are a wide range of these available as interactive games online, which can help children to practise their skills. Function machines can also be used to introduce the concept of 'inverse operations'. For instance, if a function machine adds 3 to an input number, the inverse operation would be to subtract 3 to get back to the original number.

Function machines in KS1

Children are usually introduced to the idea of a function machine in Key Stage 1, as they are first getting to grips with basic addition and subtraction. For example, a function machine might add 2 to any number inputted. If a child inputs the number 3, the machine will add 2 to 3, and the output will be 5. This visual and interactive approach helps children understand how numbers can be transformed through mathematical operations.

Function machines in lower KS2

As children progress to Lower Key Stage 2, function machines become more complex, often involving multiple operations or larger numbers. This helps children develop their mental arithmetic skills and understand more complex mathematical concepts. For example, a function machine might first multiply an input number by 3 and then subtract 2. If a child inputs the number 4, the machine will first multiply 4 by 3 to get 12, and then subtract 2 to give an output of 10. This could be displayed like this:

Function machine for KS2

As children progress through Years 3 and 4, function machines can also help with the concept of 'order of operations', demonstrating that the order in which operations are performed can affect the outcome. A great way to explain and reinforce this with children, even those in Lower Key Stage 2, can be to get them to think of a function machine as a little robot that follows very specific instructions to change a number.

The order in which the robot does these things can make a big difference to the final number it gives us. Let's say our robot is told to multiply a number by 3 and then add 5. If we give it the number 2, it will first triple it to make 6, and then add 5 to get 11.

But what if the robot is told to do those steps in the opposite order? This time, it adds 5 to the number 2 to make 7, and then triples that to get 21. So, the same robot, doing the same two things, but in a different order, can give us a very different result. This is why the order of operations is so important in maths. It's like a recipe - if you do the steps in the wrong order, you might not get the result you want!

Function machines in upper KS2

As children progress into Upper Key Stage 2 (Years 5 and 6) function machines are used to explore more advanced mathematical concepts, such as fractions, decimals and percentages. For example, a function machine might multiply an input number by a fraction (such as ½ ) or convert an input number into a percentage. Here are two visual representations of these function machines:

function machines for upper KS2

In the first function machine, the input is 8 and the function is multiplication by 1/2 (which is the same as halving). So, when we input 8 into the machine, it halves 8, resulting in an output of 4. In the second function machine, the input is 0.5 (which is a decimal) and the function is conversion to a percentage. So, when we input 0.5 into the machine, it converts 0.5 to 50%, resulting in an output of 50%.

Function machines can also be used to introduce algebraic thinking, with the function machine performing operations based on a given rule or formula. Here is an example of a function machine used to introduce algebraic thinking:

function machine for KS2 percentage

In this function machine, the input is a variable 'a' and the function is '4a+2'. This means that whatever value 'a' takes, the machine will multiply it by 4 and then add 2 to get the output.

Function machines can also be used to solve problems and puzzles, encouraging children to think logically and strategically. For example, if a child knows the input and output of a function machine but not the operation, they can use their mathematical knowledge and reasoning skills to figure out the missing operation. For example:
 

function machines algebra

In this function machine, the input is 5 and the output is 15, but the   function (operation) is unknown. The child needs to figure out what operation transforms 5 into 15. In this case, the operation is multiplication by 3.

Can function machines help with the Year 4 Multiplication Check?

Whilst not a traditional method of learning the times tables, a function machine can be a fun way for children to practise key facts especially in the run up to the Year 4 Multiplication Check. A function machine could help them to check the inverse e.g. a function machine could be set to multiply any input number by 3. The child can then input various numbers and practise their 3 times table.

Can function machines help with Year 6 SATs?

You also find that function machines often appear in the Y6 SATs as they can be a great way of testing children’s ability to identify and use different mathematical operations. These might be presented as a visual function machine or a written problem. Here are some examples:

Function Machine Problem:

Consider a function machine that multiplies a number by 3 and then subtracts 2.

Question: If the input is 7, what is the output?

Function Machine Problem with Fractions:

A function machine multiplies an input by 1/2 and then adds 3.

Question: If the input is 8, what is the output?

Function Machine Problem with Decimals:

A function machine divides an input by 10 and then subtracts 0.5.

Question: If the input is 20, what is the output?

Function Machine Problem with Algebra:

A function machine multiplies an input by a and then adds b. If the input is 4 and the output is 14, and you know that a = 2, what is the value of b?

Give your child a headstart

Give your child a headstart

  • FREE articles & expert information
  • FREE resources & activities
  • FREE homework help
By proceeding you agree to our terms and conditions. For information on how we use your data, see our privacy policy. You will receive emails from us but can opt out at any time.