Skip to content
eurekami
Menu

Grades 3 to 7 (Years 4 to 8 in England)

Function machine: guess the rule

This function machine takes a number in, follows a rule and sends a new number out, building an input and output table as you go. Start with a one-step mystery rule, put in 1, 2 and 3, and look for the pattern before you guess.

Loading…

What the function machine does

A function machine is a picture of a rule: a number goes in, the machine does something to it, and a new number comes out. Choose an input from −10 to 20 and press Put it in. Each input and output is added to the table, so patterns build up.

There are three modes. Mystery rule hides the rule; you can choose one-step rules (such as + 7 or × 4), two-step rules (such as × 3, then − 2) or rules with squares. When you think you know it, press I know the rule! and pick from four choices. Some wrong choices fit your first row on purpose, so testing more inputs pays off. My rule lets you build a one- or two-step rule and see it written in algebra. Work backward shows the rule and the output and asks what went in.

Why guess-the-rule games work

Finding a rule from a table is the heart of early algebra: noticing that outputs go up by 3 each time, then checking whether + 3 really works for every input. Typing a prediction before each input turns a guess into a test. Comparing × 2, then + 3 with + 3, then × 2 shows that the order of steps matters, which is the idea behind the order of operations. Work backward introduces inverse operations, the same thinking used to solve equations.

Common mix-ups

  • Checking only one row. 3 goes to 6 for both + 3 and × 2, so test another input before deciding.
  • Looking only at how the outputs change. If outputs go up by 2 when inputs go up by 1, the rule starts with × 2, but there may be a second step.
  • Undoing steps in the same order when working backward. Undo the last step first.
  • Thinking + 3, then × 2 is the same as × 2, then + 3. Try both with an input of 1.

A 10-minute function machine routine

  • Choose Mystery rule with one step. Ask a child to choose the first input.
  • Before each new input, ask for a prediction and type it in.
  • When the class has three rows, press I know the rule! and vote.
  • Switch to Two steps and repeat.
  • End with one Work backward puzzle, asking how the class undid the steps.

Where it fits by grade

  • Grades 3 and 4: identify arithmetic patterns (3.OA.D.9) and generate patterns that follow a given rule (4.OA.C.5).
  • Grade 5: generate two numerical patterns from two rules and compare them (5.OA.B.3).
  • Grades 6 and 7: write expressions with a variable (6.EE.A.2), describe how one quantity depends on another (6.EE.C.9), and solve two-step equations by undoing steps.
  • England: function machines are a common picture in Years 5 and 6 and Key Stage 3. Year 6 uses simple formulae and expresses missing number problems algebraically.

Learning more

Order of operations, negative numbers and solving equations are skills on Eurekami's skill map, and Daily Practice brings them back when they start to fade. Lessons explain each step in plain words, and the AI tutor asks guiding questions when a rule is hard to spot.

Questions people ask

What is a function machine?
A function machine is a way to picture a rule. A number goes in, the rule changes it, and a new number comes out. In algebra, the rule × 2, then + 1 is written as 2n + 1.
How do you work out the rule?
Put in several numbers, ideally ones in order like 1, 2, 3. See how much the output changes each time, guess a rule, and test it on a new input before you decide.
How do you work backward through a function machine?
Start with the output and undo each step in reverse order, using the opposite operation. For × 2, then + 1 with an output of 11, subtract 1 to get 10, then divide by 2 to get 5.
What age are function machines for?
One-step rules suit children from about grade 3. Two-step rules, square rules and working backward suit grades 5 to 7, where they lead into algebra.

More virtual manipulatives

Keep exploring

Math, English and science that click.