Speak Maths · Last school years

Functions: machines with an input and an output

A function is a machine: put a number in, get a number out. Six signs describe it, how machines join, and how to run one backwards.

Draft: written by an AI helper and not yet checked by a teacher.

The alphabet

Read each sign aloud, the way it is written under it.

  • Say: f of xMeans: what the machine f gives out when x goes in; not f times x
  • Say: f from A to BMeans: f takes each allowed input in A to an output in B
  • Say: x maps to two xMeans: the rule: input x becomes output 2x
  • Say: g after fMeans: first f, then g, on the result
  • Say: g after f, of x, equals g of f of xMeans: put x in f, then put what comes out into g
  • Say: f inverseMeans: the machine run backwards; the minus one is not a power to divide by

The story: A machine that toasts bread

Subtitles:

Tap a line to see its words.

  1. The toaster is a function f: A holds the minutes you may set, B holds the darkness levels it can give.
  2. Its rule: x minutes maps to darkness level 2x.
  3. We name the rule: f of x equals 2x.
  4. Three minutes gives level 6. Five minutes gives level 10.
  5. A second machine g adds one spoon of jam to each level: g of y is y plus 1.
  6. Toast, then jam, for 3 minutes: g after f at 3 is g of 6, which is 7.
  7. Run the toaster backwards: toast of level 10 needed f inverse of 10, which is 5 minutes.
  8. Likewise f inverse of 6 is 3 minutes.
  9. Careful: one over f of 6 is one twelfth, not 3. The minus one is not a reciprocal.

In words this story is 599 letters long; in symbols, 84.

Read it

What does it say?

Write it

Which notation says this?

The machine f sends every x to three times x.

Put 2 in f first, then put the result in g.

The inverse function of f, at 4.

The machine f halves every input.

g takes natural numbers to natural numbers.

The output of f when 7 goes in.

Each input x becomes x minus one.

Do f first, then h: h after f.

The input that f sends to 20.

Put 5 into g, then put the result into f.

The machine f triples its input: f of x is three x.

g after f, at 2, equals g of f of 2.

Build it

Tap the tiles in order. One tile does not belong.

f of 3 equals 6.

g after f, applied to x.

x maps to x plus one.

f from A to B.

f inverse of ten equals five.

g of f of two.

Challenges

Creative puzzles that use every sign of this chapter. Take your time; there is no clock.

1 The toaster table

A toaster f turns minutes (rows) into darkness levels (columns). Judge each sentence: true or false?

✓
✓
✓

A tick means f turns the row's input into the column's output.

2 Same letters, different machines

Pair each line with what it says.

Tap a line, then its meaning.

3 Which machine first?

With f(x) = 2x and g(y) = y + 1, toast first, then jam, for 3 minutes. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

4 Run it backwards

What does the inverse machine give for 7?

5 Two machines in a row

Put 3 into f, then put the result into g. What comes out?

6 The square-root machine

This machine only accepts 1, 4 and 9. What comes out for 9?

7 Design a machine

A machine doubles every input and then adds one. Write its rule in symbols, naming the machine f.

8 Socks and shoes

Step s puts on socks, step h puts on shoes. “Socks, then shoes” is h ∘ s. Write the rule for undoing both: the inverse of “socks then shoes” is “undo shoes, then undo socks”.

9 The add-four machine

A machine f turns each input (rows) into an output (columns). Judge each sentence: true or false?

✓
✓
✓
✓

A tick means f turns the row’s input into the column’s output.

10 The doubling machine

Machine f doubles. Judge each sentence: true or false?

✓
✓
✓
✓

A tick means f turns the row’s input into the column’s output.

11 Chain or sum?

Pair each line with what it does to x.

Tap a line, then its meaning.

12 Two arrows and a colon

Pair each line with what it says about the doubling machine.

Tap a line, then its meaning.

13 Undo the halving

Machine f halves its input, so its inverse must double. One tile is wrong. Find it, then fix it.

Tap the tile that is wrong.

14 The wrong arrow

f takes natural numbers to natural numbers, and each x goes to x plus 3. One tile is wrong.

Tap the tile that is wrong.

15 Which input?

Which input does f turn into 4?

16 Take one, then square

Which runs first here, f or g? Then work it out.

17 The fence machine

A machine p takes the side s of a square garden and gives the length of fence around it: four sides. Write its rule.

18 Peel, then slice

Step p peels an apple, step s slices it. Write “peel first, then slice” as one combined step.

19 Seven forward, seven back

Machine f adds 7 to every input. Write f and its inverse.

Tell your own

Tell a three-line story about a machine of your own (a rule, one input, one output), in signs only. Then run it backwards.

Kept on this device only.