Educerie · IB Diploma · Mathematics: analysis and approaches
IB Mathematics AA 2.5 · SL and HL
Composite and inverse functions
What happens when the output of one function becomes the input of another, and how do you build, by algebra, the function that undoes a function?
What you will learn
Understand that (f ∘ g)(x) = f(g(x)) means g acts first, and that the order changes the result.
Know that only a one-to-one function has an inverse, whose domain is the range of f.
Understand the identity function and that f(f⁻¹(x)) = f⁻¹(f(x)) = x, with f⁻¹ the reflection of f in y = x.
HL Know how to restrict a domain so an inverse exists, and what makes a function self-inverse.
You must be able to
Find and simplify a composite function, and evaluate it at a number in the right order.
Find f⁻¹(x) by algebra, including for a rational or restricted quadratic function, and state its domain.
Solve an equation involving a composite function, keeping every valid root.
Sketch the graph of f⁻¹ as the reflection of f in y = x, with key points swapped.
Find unknown constants from composite information, or explain why a composite or inverse does not exist.
HL Find the largest domain on which a function has an inverse, and show that a function is self-inverse.
In the exam. Paper 1 Section A, very often, as "find (f∘g)(x)", "find f−1(x)" or "solve (f∘g)(x)=k", typically 5 to 7 marks over three parts. It also opens Section B questions, where later parts sketch f and f−1, and the chain rule in 5.6 is built on these chains. Paper 2 uses them in conversion and pricing contexts. The command words are mostly Find and Write down, with a steady supply of Show that, Sketch and State.
1Composite functions
Figure 1 shows a composite as two machines in a row, for f(x)=2x+1 and g(x)=x2.
Figure 1 · f ∘ g means g first, then f
(f∘g)(x)=f(g(x)): g acts first, then f. Read it as a bracket, from the inside out.
At a number. Do the inner function, write the middle value down, then do the outer one.
(f∘g)(3)=f(g(3))g(3)=9inside firstf(9)=2(9)+1=19
As an expression. Put the whole inner function, in brackets, wherever the outer function has an x.
Check: g(x)=3x+1, so f(g(2))=f(7)=27 and g(f(1))=g(3)=10.
Finding a missing function
Suppose g and (g∘f)(x) are known and f is linear. Write f(x)=ax+b, expand, and equate coefficients.
Let g(x)=x2−6x and (g∘f)(x)=4x2−8x−5.
(ax+b)2−6(ax+b)=a2x2+(2ab−6a)x+b2−6ba2=4so a=2 or a=−2b2−6b=−5(b−1)(b−5)=0, so b=1 or b=52ab−6a=−8a(b−3)=−4: decides which pairs survive
Of the four pairs, only a=2,b=1 and a=−2,b=5 satisfy the middle equation. There are two functions, f(x)=2x+1 and f(x)=5−2x.
2Domain, range and taking a composite apart
The output of g becomes the input of f. So it must be a number f is allowed to take. For x to be in the domain of f∘g, two things must hold:
x is in the domain of g.
g(x) is in the domain of f.
Let f(x)=x1 (x=0) and g(x)=2x−5.
(f∘g)(x)=2x−51. The inner result 2x−5 must not be 0, so the domain is x=25.
(g∘f)(x)=x2−5. Now f goes first and needs x=0. Domain x=0.
Simplifying can hide a restriction
Take p(x)=x2 and q(x)=5−x. Then (p∘q)(x)=(5−x)2=5−x, which looks fine for every x. But q needs x≤5.
State the domain from the original functions, before simplifying.
Range
Find it last, from the outputs of the inner function that actually reach the outer one.
Example: f(x)=x and g(x)=6−x2. The domain of f∘g needs 6−x2≥0, so −6≤x≤6.
The inner output runs from 0 up to 6. So 6−x2 runs from 0 to 6, and the range is 0≤y≤6.
Why a composite does not exist at a point
Here g(3)=−3, outside the domain of , so (f∘g)(3) does not exist.
The reason to write: the inner output lies outside the domain of the outer function.
Taking a composite apart
m(x)=x2+1 is "square, add 1, then take the root". So m=f∘g, with inner g(x)=x2+1 and outer f(x)=x.
The chain rule in 5.6 starts from exactly this.
In context
A car uses 0.07 litres per kilometre, and fuel costs 1.80 euros a litre. Let g(d)=0.07d (distance to litres) and f(L)=1.8L (litres to euros).
The composite (f∘g)(d)=0.126d turns distance straight into cost, so 200 km costs 25.20 euros. The units force the order: f expects litres, so g runs first.
3The identity function and what an inverse really is
The identity function changes nothing: I(x)=x. Composing with it changes no function. Its graph is the line y=x.
(f∘f−1)(x)=(f−1∘f)(x)=x
That is the definition of an inverse as algebra. It doubles as a check: compose your answer with f and simplify. If you do not get x, the inverse is wrong. For f(x)=32x−5 the inverse is f−1(x)=23x+5, and
An inverse must send each output back to exactly one input. So f needs to be one-to-one = no two inputs share an output. If two do, f is many-to-one and has no inverse.
On a graph, no horizontal line may meet the curve twice (the horizontal line test from 2.2).
The standard reason to give is a pair of inputs with the same output.
Example: f(x)=x2−4x has f(1)=f(3)=−3. So it is many-to-one on R and f−1 does not exist.
5Finding the inverse by algebra
The inverse undoes the steps of f in reverse order. Figure 3 shows it for f(x)=4x−7. f multiplies by 4 and then subtracts 7, so f−1 adds 7 and then divides by 4.
Figure 3 · The inverse undoes each step in reverse order
For longer functions use algebra:
To find f−1(x): write y=f(x), swap x and y, then make y the subject.
Swapping is the algebra of reflecting in y=x: every point (a,b) becomes (b,a). You may rearrange first and swap last, but never skip the swap.
Domain of f−1 = range of f. Range of f−1 = domain of f.
Example 1 · linear.f(x)=4x−7.
x=4y−7swapy=4x+7f−1(x)=4x+7
Example 2 · rational.f(x)=x−12x+3, x=1. The move to learn: collect every y term on one side and factorise y out.
x=y−12y+3swapx(y−1)=2y+3clear the denominatorxy−2y=x+3every y term on the lefty(x−2)=x+3factorisef−1(x)=x−2x+3,x=2
The range of f is every real number except 2 (its horizontal asymptote). So the domain of f−1 is x=2, matching the denominator.
Figure 4 shows the reflection. f has asymptotes x=1 and y=2, and f−1 has x=2 and y=1.
Figure 4 · The inverse swaps the asymptotes
Example 3 · a restricted quadratic.f(x)=(x−3)2+1, x≥3. The square root brings a ±, and the domain of f chooses.
x=(y−3)2+1swapy−3=±x−1y=3+x−1range of f−1 is y≥3, so take +f−1(x)=3+x−1,x≥1
The vertex (3,1) gives the range of f as f(x)≥1, which is the domain of f−1. The minus root would give values below 3.
Figure 5 draws both graphs. They meet on y=x, where f(x)=x:
(x−3)2+1=xx2−7x+10=0x=5x=2 lies outside x≥3
Figure 5 · A restricted quadratic and its inverse
For an increasing function, f and f−1 can only meet on y=x. So solving f(x)=x finds every intersection.
If it has no real roots (a negative discriminant, for a quadratic), the graphs do not meet.
Example 4 · exponential and root
f(x)=5x+2. Swap: x=5y+2, so 5y=x−2 and y=log5(x−2). Since 5x>0, the range of f is f(x)>2. So f−1(x)=log5(x−2), x>2.
A root works the same way. Take f(x)=2x−3, x≥1.5. Swap to x=2y−3, then square: x2=2y−3. So f−1(x)=2x2+3.
Its domain is x≥0, the range of f, though the formula would accept any x.
Sketching f−1
Draw f and y=x (dashed). Swap the coordinates of every key point: intercepts, end-points of a restricted graph, turning points. An asymptote y=c becomes x=c.
Use equal scales on both axes so the two curves look like mirror images.
6Restricting a domain (HL)
When f is not one-to-one, cut the domain at a turning point.
Example: g(x)=x2+6x=(x+3)2−9 has its vertex at x=−3, and g(−5)=g(−1)=−5 shows the clash. On x≥−3 the function is increasing, so it has an inverse.
The least k for which g has an inverse on x≥k is k=−3.
The left half works equally: the greatest k for which it has an inverse on x≤k is also −3.
For a function that is not a quadratic, sketch it and use the turning points. For x≥k use the one with the largest x-coordinate. For x≤k use the one with the smallest.
Example: the cubic h(x)=x3−3x2−24x has turning points at x=−2 and x=4. Read them off a GDC sketch, or, once you have met differentiation, from h′(x)=3(x+2)(x−4). It has an inverse on x≥4 (least k=4) and on x≤−2 (greatest k=−2).
For a reason, say the function is one-to-one up to the turning point and fails the horizontal line test beyond it. At SL the restriction is given to you, as in Example 3.
7Self-inverse functions (HL)
A function is self-inverse if f−1(x)=f(x), which is the same as f(f(x))=x. Its graph is symmetric in y=x.
The identity is self-inverse.
f(x)=c−x for any constant c is self-inverse.
f(x)=xk is self-inverse.
A line f(x)=mx+c is self-inverse only for m=−1 or for the identity, since f(f(x))=m2x+mc+c.
To show it for any other function, work out f(f(x)) and simplify to x. Take f(x)=x−55x−2, x=5.