2.5 Composite and inverse functions

2.5 Composite and inverse functions

IB Maths: Analysis and Approaches HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)): apply gg first. Usually f∘g≠g∘ff\circ g\ne g\circ f.
  • The domain of f∘gf\circ g is restricted by the domain of gg and by what ff can accept.
  • The identity function is I(x)=xI(x)=x, and (f∘f−1)(x)=(f−1∘f)(x)=x(f\circ f^{-1})(x)=(f^{-1}\circ f)(x)=x.
  • Find f−1f^{-1} by interchanging xx and yy and rearranging; only one-to-one functions have inverses.
  • If (h∘h)(x)=x(h\circ h)(x)=x then hh is self-inverse.

Composite functions

A composite function applies one function and then another: (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)), with gg first.

A composite function works from the inside out. With f(x)=3x−1f(x)=3x-1 and g(x)=x2+2g(x)=x^2+2: (f∘g)(2)=f(6)=17(f\circ g)(2)=f(6)=17. Algebraically, replace every xx in the outer function by the whole inner expression: (g∘f)(x)=(3x−1)2+2=9x2−6x+3(g\circ f)(x)=(3x-1)^2+2=9x^2-6x+3.

Order matters: (f∘g)(x)=3x2+5(f\circ g)(x)=3x^2+5, a different function. The circle means "one after the other", not multiply.

−1.5−1−0.50.511.55101520253035xy(0, 5)(0, 3)y = 3x² + 5 (f∘g)y = 9x² − 6x + 3 (g∘f)
Order matters: f∘gf\circ g and g∘fg\circ f give different curves.

Worked example

Given f(x)=3x−1f(x)=3x-1 and g(x)=x2+2g(x)=x^2+2, find (f∘g)(x)(f\circ g)(x) and (f∘g)(2)(f\circ g)(2).

With f(x)=2xf(x)=2x and g(x)=x+3g(x)=x+3, what is (f∘g)(1)(f\circ g)(1)?

Domain of a composite

For f(g(x))f(g(x)) to exist, xx must be in the domain of gg and g(x)g(x) must be in the domain of ff.

With f(x)=x+5f(x)=\sqrt{x+5} and g(x)=x2−9g(x)=x^2-9: (f∘g)(x)=x2−4(f\circ g)(x)=\sqrt{x^2-4} needs x2−4≥0x^2-4\ge0, so x≤−2x\le-2 or x≥2x\ge2. And (g∘f)(x)=x−4(g\circ f)(x)=x-4, but only for x≥−5x\ge-5, because xx goes into ff first.

Two functions are the same only if they have the same rule and the same domain. Never read the domain from the simplified rule; carry the restriction from the inner function.

−6−5−4−3−2−10123456-22

For f(x)=xf(x)=\sqrt x and g(x)=x−4g(x)=x-4, what is the domain of f∘gf\circ g?

Composites in context

Processes in stages are composites; the first stage goes on the inside.

Bank A deducts a 15 AED fee and then converts at 0.24 euros per dirham. With f(x)=x−15f(x)=x-15 and g(x)=0.24xg(x)=0.24x this is (g∘f)(x)=0.24x−3.6(g\circ f)(x)=0.24x-3.6.

The other order, (f∘g)(x)=0.24x−15(f\circ g)(x)=0.24x-15, would convert first and then take off 15 euros, a different model. Check the units at each stage.

  1. 1

    Payment

    xx AED

  2. 2

    Fee stage

    f(x)=x−15f(x)=x-15

  3. 3

    Conversion stage

    g(x)=0.24xg(x)=0.24x

  4. 4

    Result

    (g∘f)(x)=0.24x−3.6(g\circ f)(x)=0.24x-3.6

Bank A: fee then conversion

Worked example

Bank A takes off a 15 AED fee, then converts at 0.24 euros per dirham. How many euros does a 500 AED payment give?

With the same ff and gg, what is (f∘g)(100)(f\circ g)(100)?

Identity and self-inverse

A function and its inverse compose to the identity: (f∘f−1)(x)=(f−1∘f)(x)=x(f\circ f^{-1})(x)=(f^{-1}\circ f)(x)=x.

The identity function is I(x)=xI(x)=x. Use the composition to check an inverse: with f(x)=3x−1f(x)=3x-1 and f−1(x)=x+13f^{-1}(x)=\frac{x+1}3, f(f−1(x))=3⋅x+13−1=xf(f^{-1}(x))=3\cdot\frac{x+1}3-1=x.

If (h∘h)(x)=x(h\circ h)(x)=x then hh is self-inverse: h−1=hh^{-1}=h. An example is h(x)=2x+3x−2h(x)=\frac{2x+3}{x-2}, where h(4)=5.5h(4)=5.5 and h(5.5)=4h(5.5)=4. Swapping xx and yy in a point of ff gives a point of f−1f^{-1}.

−4−3−2−11234−4−3−2−11234xy(0, −1)(−1, 0)(1, 2)(2, 1)y = f(x)y = f⁻¹(x)y = x
ff and f−1f^{-1} are reflections in y=xy=x (dashed).

Which function is self-inverse?

Finding an inverse

Interchange xx and yy, then rearrange to make yy the subject.

An inverse exists only when ff is one-to-one. Example: y=0.24x−3.6→x=0.24y−3.6→f−1(x)=x+3.60.24y=0.24x-3.6\to x=0.24y-3.6\to f^{-1}(x)=\frac{x+3.6}{0.24}. The domain of f−1f^{-1} is the range of ff.

In context the inverse answers the reverse question: "how many dirhams give 300 euros?" is (g∘f)−1(300)=1265(g\circ f)^{-1}(300)=1265. Write the final inverse as a function of xx, not yy.

  1. 1

    Write y=f(x)y=f(x)

    Replace f(x)f(x) with yy

  2. 2

    Interchange

    Swap xx and yy

  3. 3

    Rearrange

    Make yy the subject

  4. 4

    Write f−1(x)f^{-1}(x)

    Give it as a function of xx

Finding an inverse function

Worked example

Find the inverse of f(x)=5−2x3f(x)=\frac{5-2x}3.

What is the inverse of f(x)=2x−6f(x)=2x-6?

Try an exam question

Let f(x)=3x−1f(x)=3x-1 and g(x)=x2+2g(x)=x^2+2. (a) Find (f∘g)(x)(f\circ g)(x). (b) Find f−1(x)f^{-1}(x).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find (f∘g)(2)(f \circ g)(2).

1 mark, marked against the mark scheme

Revision notes