A function machine shows the relationship between two variables, the input and the output.

Here is a function machine:

Input → × 3 → + 2 → Output

In this function we multiply the input by 3, then we add 2 to give us the output.

If we put 5 into the function machine:

5 × 3 = 15

15 + 2 = 17

The output is 17

**Example 1: Here is a function machine.**

Input → × 5 → − 6 → Output

**a) Work out the output when the input is 8b) Work out the input when the output is 49**

For part **a** we need to put 8 into the function machine.

8 × 5 = 40

40 − 6 = 34

The output is 34

For part **b** the output is 49

We can work backwards, doing the opposite of each operation.

The opposite function is called the inverse function.

The opposite of taking 6 away is adding 6

The opposite of multiplying by 5 is dividing by 5

49 + 6 = 55

55 ÷ 5 = 11

An input of 11 out give an output of 49

**Example 2: Here is a function machine.**

Input → ÷ 2 → + 7 → Output

**a) Work out the output when the input is -4b) Work out the input when the output is 20**

For part **a** we are putting -4 into the function machine.

-4 ÷ 2 = -2

-2 + 7 = 5

The output is 5

For part **b** the output is 20

We can use the opposite function.

The opposite of adding 7 is taking away 7

The opposite of dividing by 2 is multiplying by 2

20 - 7 = 13

13 × 2 = 26

An input of 26 out give an output of 20

**Try these:**

Here is a function machine:

Here is a function machine:

GCSE

Learn GCSE MathsEdexcel Exam Papers

OCR Exam Papers

AQA Exam Papers

Eduqas Exam Papers

Edexcel IGCSE Maths

GCSE Statistics

A Level

Learn A Level MathsEdexcel A Level Papers

AQA A Level Papers

OCR A Level Papers

OCR MEI A Level Papers

Old Spec A Level

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © Maths Genie. Maths Genie Limited is a company registered in England and Wales with company number 14341280. Registered Office: 143 Lynwood, Folkestone, Kent, CT19 5DF.