GCSE Maths / Edexcel

Function machines

Follow an input-output rule and reverse it using inverse operations.

AlgebraFoundationGrades 2 to 5Skill

Curriculum path: GCSE Maths > Edexcel > Algebra > Function machines

Pearson Edexcel GCSE Maths Algebra A7: interpret simple expressions as functions with inputs and outputs.

Revision notes

Theory, examples, and quick checks.

Keep the method short, then practise straight away. This note is written for GCSE Maths Edexcel students who need clear working and reliable method marks.

Theory

A function machine starts with an input, follows one or more operations, and gives an output. For example, 'multiply by 3, then add 2' sends input 4 to output 14.

The order matters. 'Multiply by 3 then add 2' is 3x + 2. 'Add 2 then multiply by 3' is 3(x + 2), which is different.

To work backwards from an output, undo the operations in reverse order. For 3x + 2 = 17, first subtract 2, then divide by 3 to get x = 5.

A letter can describe any input. If the rule is double then subtract 1, the output is 2x - 1. This connects function machines to forming expressions and solving equations.

Check your answer by putting the recovered input through the original machine. If it does not produce the given output, revisit the order of operations.

Key ruleTo reverse a two-step machine, undo the last operation first.

Worked examples

Find an output

Input 6 goes through '× 4, then - 3'. What is the output?

  1. 6 × 4 = 24.
  2. 24 - 3 = 21.

Answer: 21

Write the rule

Write the output for input x through '+ 5, then × 2'.

  1. First form x + 5.
  2. Multiply the whole result by 2.

Answer: 2(x + 5)

Work backwards

The rule is '× 3, then + 4' and the output is 22. Find the input.

  1. Undo + 4: 22 - 4 = 18.
  2. Undo × 3: 18 ÷ 3 = 6.
  3. Check: 3 × 6 + 4 = 22.

Answer: 6

Common mistakes

  • Changing the order of the operations.
  • Undoing multiplication before the final addition.
  • Writing 2x + 5 when the whole x + 5 is doubled.

Quick exercise

Try these before moving to the exam-style questions.

  1. Input 3 goes through '× 2, then + 5'. What is the output?
  2. Input 4 goes through '+ 3, then × 2'. What is the output?
  3. A rule is '× 5, then - 2'. What is the output for input 2?
  4. A rule is '× 2, then + 1'. The output is 9. What is the input?
  5. Write '× 3, then + 4' as an expression for input x.
Exam-style questions

Practise the same skill at three levels.

These are original GCSE-style questions with mark schemes, common wrong answers, and AI marking guidance so feedback stays close to exam expectations.

Basic GCSE styleFoundationNon-calculator2 marks

A machine multiplies the input by 4 and then subtracts 5. Find its output when the input is 3.

functions
Standard exam styleFoundationNon-calculator3 marks

A machine adds 2 to input x and then multiplies the result by 3. Write an expression for the output and find it when x = 5.

functionsbrackets
ChallengeFoundation and HigherNon-calculator3 marks

A machine doubles an input and adds 7. Its output is 25. Find the input and show the reverse operations.

inverse operations