Skip to content

Functions in maths: notation, composite functions and inverse functions

TutorAura guide · Updated

A function is a rule that turns each input into exactly one output. Write f(x)=3x+2f(x) = 3x + 2, and f(4)f(4) means "put 4 into the rule": 3×4+2=143 \times 4 + 2 = 14. Function notation is just a compact way of writing "the machine that triples and adds two", and once you're comfortable with it, two further ideas follow: composite functions (one machine feeding another) and inverse functions (the machine run backwards). This guide covers all three with the examples exams use.

Key takeaways

  • f(x) is the output of the rule f for the input x; f(4) means substitute 4.
  • fg(x) means do g first, then f: substitute g(x) into f.
  • To find the inverse, write y = f(x), swap x and y, rearrange for y.
  • A function and its inverse undo each other: f⁻¹(f(x)) = x.

Function notation

f(x)=3x+2f(x) = 3x + 2 names the function ff and says what it does to any input xx. Then:

  • f(4)=3(4)+2=14f(4) = 3(4) + 2 = 14
  • f(−1)=3(−1)+2=−1f(-1) = 3(-1) + 2 = -1
  • f(a)=3a+2f(a) = 3a + 2
  • f(2x)=3(2x)+2=6x+2f(2x) = 3(2x) + 2 = 6x + 2

f(x)f(x) is not ff multiplied by xx. It's "f of x", the output of ff at xx. Other letters work the same way: g(x)g(x), h(t)h(t).

Solving f(x)=11f(x) = 11 means finding the input that gives 11: 3x+2=113x + 2 = 11, so x=3x = 3.

Domain and range

The domain is the set of inputs a function accepts; the range is the set of outputs it produces.

For f(x)=xf(x) = \sqrt{x} the domain is x≥0x \geq 0 (you can't square root a negative) and the range is f(x)≥0f(x) \geq 0. For g(x)=1x−2g(x) = \dfrac{1}{x - 2} the domain excludes x=2x = 2 (division by zero). For h(x)=x2h(x) = x^2 with all real inputs, the range is h(x)≥0h(x) \geq 0.

Exam questions often give a restricted domain and ask for the range: for f(x)=2x+1f(x) = 2x + 1 with 0≤x≤50 \leq x \leq 5, the range is 1≤f(x)≤111 \leq f(x) \leq 11.

Composite functions

A composite function applies one function, then another. fg(x)fg(x), also written f(g(x))f(g(x)), means do g first, then put the result into f.

With f(x)=3x+2f(x) = 3x + 2 and g(x)=x2g(x) = x^2:

fg(x)=f(x2)=3x2+2gf(x)=g(3x+2)=(3x+2)2fg(x) = f(x^2) = 3x^2 + 2 \qquad gf(x) = g(3x + 2) = (3x + 2)^2

These are different functions: fg(2)=14fg(2) = 14 but gf(2)=64gf(2) = 64. Read composites from the inside (right) outwards, and replace every xx in the outer function with the whole inner expression, brackets included.

ff(x)ff(x) means apply ff twice: f(3x+2)=3(3x+2)+2=9x+8f(3x + 2) = 3(3x + 2) + 2 = 9x + 8.

Inverse functions

The inverse f−1(x)f^{-1}(x) undoes ff: if f(4)=14f(4) = 14, then f−1(14)=4f^{-1}(14) = 4. To find it:

  1. Write y=f(x)y = f(x).
  2. Swap xx and yy.
  3. Rearrange to make yy the subject.
  4. Write the result as f−1(x)f^{-1}(x).

For f(x)=3x+2f(x) = 3x + 2: y=3x+2→x=3y+2→y=x−23y = 3x + 2 \rightarrow x = 3y + 2 \rightarrow y = \dfrac{x - 2}{3}, so f−1(x)=x−23f^{-1}(x) = \dfrac{x - 2}{3}.

Check: f−1(14)=14−23=4f^{-1}(14) = \dfrac{14 - 2}{3} = 4 ✓.

For g(x)=5x+1g(x) = \dfrac{5}{x + 1}: x=5y+1→y+1=5x→g−1(x)=5x−1x = \dfrac{5}{y + 1} \rightarrow y + 1 = \dfrac{5}{x} \rightarrow g^{-1}(x) = \dfrac{5}{x} - 1.

The graph of f−1f^{-1} is the reflection of the graph of ff in the line y=xy = x. Only one-to-one functions have inverses; x2x^2 needs its domain restricted (to x≥0x \geq 0, say) before it does.

Common mistakes

  • Treating f(x)f(x) as a product and "cancelling" the xx.
  • Doing the functions in the wrong order in a composite: fgfg is g first.
  • Forgetting brackets when substituting an expression: g(3x+2)=(3x+2)2g(3x + 2) = (3x + 2)^2, not 3x2+23x^2 + 2.
  • Confusing f−1(x)f^{-1}(x) with 1f(x)\dfrac{1}{f(x)}. The inverse is a different idea from the reciprocal.

Practice questions

f(x)=2x−5f(x) = 2x - 5 and g(x)=x2+1g(x) = x^2 + 1.

  1. Find f(7)f(7) and g(−3)g(-3).
  2. Solve f(x)=9f(x) = 9.
  3. Find fg(x)fg(x) and gf(x)gf(x).
  4. Find f−1(x)f^{-1}(x).
  5. Find fg(2)fg(2).

Answers: 1. 99 and 1010. 2. x=7x = 7. 3. fg(x)=2x2−3fg(x) = 2x^2 - 3; gf(x)=(2x−5)2+1gf(x) = (2x - 5)^2 + 1. 4. f−1(x)=x+52f^{-1}(x) = \dfrac{x + 5}{2}. 5. fg(2)=2(4)−3=5fg(2) = 2(4) - 3 = 5.

More practice in our functions questions.

Frequently asked questions

What does f(x) mean?

The output of the function f when the input is x. It's read 'f of x' and is not f multiplied by x.

What is the difference between fg(x) and gf(x)?

The order. fg(x) applies g first, then f; gf(x) applies f first, then g. They usually give different results.

How do you find an inverse function?

Write y = f(x), swap x and y, rearrange to make y the subject, and call the result f⁻¹(x). Check it by putting an output back in and getting the original input.

Sources

  1. GCSE mathematics: subject content and assessment objectives. Department for Education.
  2. Cambridge IGCSE Mathematics 0580 syllabus. Cambridge International.
  3. Cambridge International AS & A Level Mathematics 9709. Cambridge International.