
A function is a rule that turns one number into another, written f(x). To find f(a), substitute a for every x. A composite function fg(x) means apply g first, then apply f to the result. The inverse function f⁻¹(x) undoes f: write y = f(x), swap x and y, and rearrange to make y the subject.
Function notation
- f(a): substitute a for every x
- fg(x) = f(g(x)): apply g first, then f
- fg(x) is usually different from gf(x)
- Inverse: write y = f(x), swap x and y, make y the subject
- f⁻¹ undoes f: f⁻¹(f(x)) = x
Function notation
f(x) means “the rule f applied to x”. If f(x) = 4x + 3, then f(−2) means replace x with −2: 4(−2) + 3 = −5. A function can be thought of as a machine: a number goes in, the rule is applied, and a number comes out.
Solving equations with functions
Some questions give the output and ask for the input. If f(x) = 4x + 3 and f(x) = 23, solve 4x + 3 = 23 to get x = 5.
Composite functions
A composite function applies one function and then another. fg(x) means do g first, then put the result into f. With f(x) = x² and g(x) = x − 4, fg(1) = f(g(1)) = f(−3) = 9, but gf(1) = g(f(1)) = g(1) = −3. The order matters, so read the notation carefully.
To find an expression for fg(x), substitute the whole of g(x) into f. With f(x) = 3x + 1 and g(x) = x², fg(x) = 3x² + 1, while gf(x) = (3x + 1)².
Inverse functions
The inverse function f⁻¹(x) reverses f. To find it, write y = f(x), swap x and y, then rearrange to make y the subject. For f(x) = (x + 7)/2: x = (y + 7)/2, so 2x = y + 7 and f⁻¹(x) = 2x − 7. Check: f(3) = 5 and f⁻¹(5) = 3.
Checking an inverse
Applying a function and then its inverse returns the original number. Choose a value, put it through f, then put the result through your f⁻¹; you should get back where you started. This quick check catches most rearranging errors.
Worked examples
Example 1. f(x) = 4x + 3. Work out f(−2).
- Substitute x = −2: 4(−2) + 3.
Answer: −5.
Example 2. f(x) = 4x + 3. Solve f(x) = 23.
- 4x + 3 = 23, so 4x = 20.
Answer: x = 5.
Example 3. f(x) = x² and g(x) = x − 4. Work out fg(1) and gf(1).
- fg(1): g(1) = −3, then f(−3) = 9.
- gf(1): f(1) = 1, then g(1) = −3.
Answer: fg(1) = 9 and gf(1) = −3.
Example 4. f(x) = 3x + 1 and g(x) = x². Find expressions for fg(x) and gf(x).
- fg(x) = f(x²) = 3x² + 1.
- gf(x) = g(3x + 1) = (3x + 1)².
Answer: fg(x) = 3x² + 1; gf(x) = (3x + 1)².
Example 5. f(x) = (x + 7)/2. Find f⁻¹(x).
- Write y = (x + 7)/2 and swap: x = (y + 7)/2.
- 2x = y + 7, so y = 2x − 7.
Answer: f⁻¹(x) = 2x − 7.
Common mistakes
- Applying composite functions in the wrong order. fg(x) means g first, then f.
- Multiplying instead of composing. fg(x) is not f(x) × g(x).
- Forgetting to swap x and y. For an inverse, swap the letters before rearranging.
- Confusing f⁻¹(x) with 1/f(x). The inverse undoes f; it is not the reciprocal.
- Not substituting the whole expression. In fg(x), replace every x in f with the whole of g(x).
How functions are examined
Functions only appear on Higher papers: composite and inverse functions are part of the Higher specification for both GCSE (1MA1) and iGCSE (4MA1). Questions ask you to:
- evaluate f(a) for a given value, including negatives
- solve an equation such as f(x) = 23
- find fg(a), or an expression for fg(x)
- find the inverse function f⁻¹(x)
Try the functions worksheet, which has answers for every part. Composite and inverse questions can also be generated in the GCSE algebra engine.
Finding an inverse uses rearranging formulae. At A-Level, see composite and inverse functions.
Frequently asked questions
What does f(x) mean?
The output of the function f when the input is x.
What does fg(x) mean?
Apply g to x first, then apply f to the result.
How do you find an inverse function?
Write y = f(x), swap x and y, then rearrange to make y the subject.
