Function machines · Grade 7

In Grade 7 you get fluent with: finding the input or the rule; two-step function machines; tables of input and output values.

A flow diagram (also called a function machine) takes an input number, does a rule to it and gives an output number. If you know any two of the input, the rule and the output, you can find the third.

Key facts

  • Input → rule → output: do the rule to the input to get the output.
  • A rule can have two steps, like × 3 then + 1. Do the steps in order, from left to right.
  • To find the input, work backwards from the output: undo each step with the inverse operation, last step first.
  • The inverse of + is −, and the inverse of × is ÷.
  • To find a rule, look at how each input changes into its output. Check the rule works for every pair.
  • A table of values lists inputs and their outputs. The rule must work for every column.

Worked examples

Example 1

The rule is × 3 then + 2. The input is 5. What is the output?

Answer: 17

Example 2

The rule is × 3 then + 2. The output is 23. What was the input?

Answer: 7

Example 3

A function machine turns 1 into 3, 2 into 6 and 4 into 12. What is the rule?

Answer: × 3

Example 4

Complete the table for the rule × 2 then + 1. What output goes with the input 6?

Answer: 13

Other years