Function Machines
x

Revision notes for CIE IGCSE Maths Function Machines. Open the guide for explanations and worked examples. Written against the CIE IGCSE Maths (0580) specification, so the content matches what's examinable rather than general Maths background.

Function Machines

What you'll learn

  • What inputs and outputs mean in a function machine.
  • How to follow a two-step rule to find an output.
  • How to work backwards using inverse operations to find an input.
  • How real-life rules, such as temperatures and taxi fares, behave like function machines.

The basic idea

A function machine is a way of showing a rule. You put a number in, the machine performs one or more instructions, and a new number comes out.

Definition

Function machine vocabulary

  • A function machine is a rule that changes a number by following operations in order.
  • The input is the number that goes into the machine.
  • The output is the number that comes out.
  • An operation is an instruction such as add 5, subtract 3, multiply by 4, or divide by 2.

A two-step function machine might multiply by 4, then add 7. If you need to find the input from the output, you reverse the journey and undo each operation.

Function machine showing forward operations and reverse operations

Key Idea

Follow the arrows

In a function machine, the arrows tell you the order. Work from left to right when finding an output, and from right to left when finding an input.

Finding the output

To find an output, start with the input and do each operation in the order shown.

Worked example: two operations forwards

Example

Finding the output

A machine multiplies by 4, then subtracts 7. Find the output when the input is 6.

  1. Start with the input, 6. Do the first operation: multiply by 4.

    6×4=246 \times 4 = 246×4=24
  2. Now use 24 in the second operation: subtract 7.

    24−7=1724 - 7 = 1724−7=17
  3. The output is 17.

Common Mistake

Stopping too early

If a machine has two boxes, you must use both boxes. After the first operation, your answer is only the halfway value, not the final output.

Completing a missing operation

Sometimes one of the boxes is blank. To fill it in, work out what number you have just before the blank box, then compare it with the final output.

Worked example: missing box

Example

Completing a number machine

A machine first adds 10. After that, a missing operation happens. When the input is 8, the output is 5. Find the missing operation.

  1. Put the input through the known operation first.

    8+10=188 + 10 = 188+10=18
  2. The missing operation must change 18 into 5.

  3. Work out the change from 18 to 5.

    18−13=518 - 13 = 518−13=5
  4. The missing operation is subtract 13.

Tip

Look at the number just before the blank

The missing box acts on the number that reaches it, not always on the original input.

Working backwards to find the input

If you are given the output and asked for the input, you need to undo the machine.

Definition

Inverse operations

An inverse operation is an operation that undoes another operation. Add is undone by subtract, subtract is undone by add, multiply is undone by divide, and divide is undone by multiply.

The important part is that you reverse the order as well as changing each operation to its inverse.

For example, if the machine says:

  • multiply by 6
  • then add 2

then working backwards means:

  • subtract 2 first
  • then divide by 6

Worked example: finding the input

Example

Working backwards

A machine multiplies by 6, then adds 2. The output is 44. Find the input.

  1. Start at the output, 44.

  2. Undo the last operation first. The last operation was add 2, so subtract 2.

    44−2=4244 - 2 = 4244−2=42
  3. Undo the first operation. The first operation was multiply by 6, so divide by 6.

    42÷6=742 \div 6 = 742÷6=7
  4. The input is 7.

Common Mistake

Undoing in the wrong order

Do not divide by 6 first in this example. When working backwards, you undo the last box first because that was the final change made to the number.

Machines with division

Division works in the same way as the other operations. Just be especially careful when reversing it: the inverse of divide by 4 is multiply by 4.

Worked example: forwards and backwards

Example

A machine with division

A machine divides by 3, then adds 4.

Find the output when the input is 15. Then find the input when the output is 10.

  1. First find the output for input 15. Divide by 3.

    15÷3=515 \div 3 = 515÷3=5
  2. Then add 4.

    5+4=95 + 4 = 95+4=9
  3. So when the input is 15, the output is 9.

  4. Now work backwards from the output 10. Undo add 4 by subtracting 4.

    10−4=610 - 4 = 610−4=6
  5. Undo divide by 3 by multiplying by 3.

    6×3=186 \times 3 = 186×3=18
  6. So when the output is 10, the input is 18.

Negative inputs

Inputs can be negative. A negative number is a number less than zero, such as -2 or -7.

When multiplying a negative number by a positive number, the result is negative. Then you continue through the machine as usual.

Worked example: negative input

Example

Using a negative input

A machine multiplies by 5, then adds 6. Find the output when the input is -2.

  1. Start with -2 and multiply by 5.

    −2×5=−10-2 \times 5 = -10−2×5=−10
  2. Now add 6.

    −10+6=−4-10 + 6 = -4−10+6=−4
  3. The output is -4.

Tip

Check the direction on a number line

Adding makes a number move to the right on a number line. Subtracting makes it move to the left. This helps when your halfway value is negative.

When the input and output are the same

Sometimes you may be asked to show that there is an input where the output has the same value.

A variable is a letter that stands for a number we do not know yet. An equation says two expressions are equal.

Worked example: same input and output

Example

Showing the input can equal the output

A machine multiplies the input by 4, then subtracts 9. Show that there is a value where the input and output are the same.

  1. Let the input be nnn. If the output is the same as the input, the output is also nnn.

  2. Write the rule as an equation.

    4n−9=n4n - 9 = n4n−9=n
  3. Solve the equation by collecting the nnn terms.

    4n−9=n3n−9=03n=9n=3\begin{aligned} 4n - 9 &= n \\ 3n - 9 &= 0 \\ 3n &= 9 \\ n &= 3 \end{aligned}4n−93n−93nn​=n=0=9=3​
  4. Check the value: input 3 gives 12 after multiplying by 4, then subtracting 9 gives 3.

  5. So input 3 and output 3 are the same value.

Tip

Always check a 'show that' answer

Once you think you have found the input, put it back through the machine. If the output matches, your answer is convincing.

Real-life rules are function machines

A real-life rule can work just like a function machine. A formula is a rule written using letters or symbols.

For example, to change Celsius to Fahrenheit, the rule is:

F=1.8C+32F = 1.8C + 32F=1.8C+32

This means multiply the Celsius temperature by 1.8, then add 32.

Worked example: temperature conversion

Example

Changing temperatures both ways

A temperature is 15°C. Convert it to Fahrenheit. Another temperature is 68°F. Convert it to Celsius.

  1. For 15°C, multiply by 1.8.

    15×1.8=2715 \times 1.8 = 2715×1.8=27
  2. Add 32.

    27+32=5927 + 32 = 5927+32=59
  3. So 15°C is 59°F.

  4. To convert 68°F back to Celsius, work backwards. First subtract 32.

    68−32=3668 - 32 = 3668−32=36
  5. Now undo multiply by 1.8 by dividing by 1.8.

    36÷1.8=2036 \div 1.8 = 2036÷1.8=20
  6. So 68°F is 20°C.

Taxi fares can also be function machines. “£2.50 plus £2.20 per mile” means there is a fixed starting charge of £2.50, then £2.20 is added for each mile.

Worked example: taxi fare rule

Example

Using a taxi fare rule

A taxi company charges £2.50 plus £2.20 per mile.

Find the cost of a 6 mile journey. Then find the distance if the fare is £26.70.

  1. For 6 miles, the per-mile part costs £13.20 because 6 lots of £2.20 is £13.20.

  2. Add the fixed charge of £2.50, giving a total fare of £15.70.

  3. Now work backwards from £26.70. First remove the fixed charge: £26.70 minus £2.50 gives £24.20.

  4. The remaining £24.20 pays for the miles. Since 11 lots of £2.20 is £24.20, the journey was 11 miles.

Exam technique

In the exam

  1. Read the machine from left to right when finding an output.

  2. If finding an input, start with the output and undo the operations in reverse order.

  3. For real-life rules, identify the fixed part first, then the repeated “per mile” or “per degree” part.

Self review

Check yourself

  • If a machine does “multiply by 3, then add 5”, what operations would you use to work backwards?

  • Why is the halfway value important when one box in the machine is missing?

  • How would you check an answer where the input and output are meant to be the same?

Recap questions

Test yourself with 5 quick questions on this guide. Answer them all correctly to complete it.

You've reached the end

Test yourself on this topic, or move on to the next guide.

Practice questionsTake a quick quiz on this topicFlashcardsSelf-test with active recall
Solving One Step EquationsUp next

How was this guide?

Function Machines Revision Guide

  1. IGCSE
  2. /Maths
  3. /Function Machines