Functions
Function machines
A takes an input, does operations to it in order, and gives an output.
- To go forwards, do the operations in order.
- To go backwards, do the inverse operations in reverse order.
Example: a machine does input → × 3 → − 4 → output. Find the output for an input of 5, and the input for an output of 20.
- Forwards: 5 × 3 = 15, then 15 − 4 = 11
- Backwards from 20: undo − 4 by adding 4: 24
- Undo × 3 by dividing by 3: 8
With an input of x, the output is 3x − 4. A function machine can turn words into an expression.
Key terms
Function notation (Higher tier only)
is a function's output for an input of x. If f(x) = 3x − 4, then f(5) means "put 5 in": f(5) = 3 × 5 − 4 = 11.
- To evaluate f(a), substitute a for x.
- To f(x) = k, form the equation and solve for x.
Example: f(x) = x² + 1. Find f(−3), and solve f(x) = 26.
- f(−3) = (−3)² + 1 = 9 + 1 = 10
- x² + 1 = 26
- x² = 25
- x = 5 or x = −5
Composite functions (Higher tier only)
A applies one function after another. fg(x) means "do g first, then f": f(g(x)).
- Work out the inner function, g, first.
- Put its answer (or expression) into f.
Example: f(x) = 3x − 4 and g(x) = x². Find fg(2), gf(2) and fg(x).
- fg(2): g(2) = 4, then f(4) = 3 × 4 − 4 = 8
- gf(2): f(2) = 2, then g(2) = 4
- fg(x) = f(x²) = 3x² − 4
Common mistake
fg(x) means g first, even though f is written first. fg(2) and gf(2) are usually different.
Key terms
Inverse functions (Higher tier only)
The f⁻¹(x) undoes f: if f(5) = 11, then f⁻¹(11) = 5.
- Write y = f(x).
- Rearrange to make x the subject.
- Swap y for x: that gives f⁻¹(x).
Example: f(x) = 3x − 4. Find f⁻¹(x).
- y = 3x − 4
- y + 4 = 3x, so x = (y + 4)/3
- f⁻¹(x) = (x + 4)/3
Check: f⁻¹(11) = 15/3 = 5, and f(5) = 11.
Harder example: f(x) = (2x + 1)/5. Find f⁻¹(x).
- y = (2x + 1)/5, so 5y = 2x + 1
- 5y − 1 = 2x, so x = (5y − 1)/2
- f⁻¹(x) = (5x − 1)/2