Lesson 12.2 · 18 min

Functions

Function machines, writing a function as a rule, and undoing it with inverse operations.

In this lesson you will learn to…

  • Use a function machine to find an output from an input
  • Write a function as an algebraic rule
  • Find the input when you are given the output, using inverse operations
  • Find the inverse of a simple function

What a function actually is

A function is a rule that turns one number into another. Put a number in, get exactly one number out — that “exactly one” is what makes it a function rather than just any old relationship.

You will see functions written in a few ways, all meaning the same thing:

  • A function machine: x→×3→+4→x \to \boxed{\times 3} \to \boxed{+4} \to output
  • A mapping: x↦3x+4x \mapsto 3x + 4
  • An equation: y=3x+4y = 3x + 4

Building the rule from a machine

Read the machine left to right and do to xx exactly what it says, in order.

MachineRule
×3\times 3 then +4+43x+43x + 4
+4+4 then ×3\times 33(x+4)3(x + 4)
−2-2 then ÷5\div 5x−25\dfrac{x - 2}{5}
×2\times 2 then +1+1 then ÷3\div 32x+13\dfrac{2x + 1}{3}

Notice rows 1 and 2. Same two operations, different order, completely different function. Try x=6x = 6: the first gives 22, the second gives 30.

Going backwards with inverse operations

To find the input when you know the output, run the machine in reverse and swap every operation for its opposite:

+↔−×↔÷square↔square root+ \leftrightarrow - \qquad \times \leftrightarrow \div \qquad \text{square} \leftrightarrow \text{square root}

Two things have to be reversed: the operations themselves, and the order they happen in. Forgetting the second is the usual slip.

Why this matters later

Inverse operations are not just a sequences topic. They are exactly what you do when you solve an equation:

4x−5=31⇒4x=36⇒x=94x - 5 = 31 \quad\Rightarrow\quad 4x = 36 \quad\Rightarrow\quad x = 9

That is the same “add 5, then divide by 4” you did on the machine. Solving equations and reversing function machines are the same skill wearing different clothes — which is why getting comfortable here makes the equations topic much easier.

Key rules and formulas

  • A function is a rule

    One input goes in, exactly one output comes out. means "multiply by 3, then add 4".
  • Order matters

    and are different functions. Reading a machine left to right tells you which is which.
  • Inverse operations

    To undo a function, reverse the machine: go right to left, replacing every operation with its inverse.
  • Checking an inverse

    Put a number through the function, then put the answer through your inverse. If you get your original number back, the inverse is right.

Worked examples

Worked example 1

Reading a function machine

A function machine does then . Find the output when the input is 7, and write the function as a rule.

Try it yourself first, then reveal the solution one step at a time.

Worked example 2

Working backwards

For the function , find the input that gives an output of 31.

Try it yourself first, then reveal the solution one step at a time.

Worked example 3

Finding the inverse function

Find the inverse of .

Try it yourself first, then reveal the solution one step at a time.

Practice: functions

8 questions

Eight questions on function machines and inverses, including a matching exercise and a guided solver.
  1. Question 1 of 8Type the answerFoundation
    A function machine does then . What is the output when the input is 7?
  2. Question 2 of 8Algebraic answer
    Write the rule for a machine that does then . Use for the input.

    Type powers with ^ (so n^2 is n squared). Any equivalent form is accepted.

  3. Question 3 of 8Match the pairs
    Match each function machine to its rule.

    Pick an answer, then choose the row it belongs to. You can also drag it.

    • then
    • then
    • then
    • then

  4. Question 4 of 8Type the answer
    For the function , what input gives an output of 31?
  5. Question 5 of 8Complete the table
    Complete the table for the function .
    Input, 035?
    Output21
    Input035
  6. Question 6 of 8Algebraic answerChallenge
    Find the inverse of the function .

    Type powers with ^ (so n^2 is n squared). Any equivalent form is accepted.

  7. Question 7 of 8Step by step
    Work backwards through a two-step machine.
    A machine does then . The output is 40.
    1. Which operation do you undo first?

  8. Question 8 of 8True or false
    and are the same function.