Composite and Inverse Functions
How to combine functions in the correct order, undo them with inverses, and use domain restrictions to choose the right result.
Apply the inside function first
fg(x) means f(g(x)): apply g first, then put its output into f. It does not mean f(x)\times g(x). In general, fg(x) and gf(x) are different.
The first function must accept the input, and its output must be allowed by the next function. Check domains before combining rules.
Worked example 1
f(x)=4x-1 and g(x)=x^2+2. Find fg(-2) and gf(-2)
-
Your turn. For fg(-2), first work out g(-2)=(-2)^2+2
g(-2)=6
- Then f(6)=4(6)-1=23
- For the other order, f(-2)=-9, then g(-9)=(-9)^2+2=83
- Answer: fg(-2)=23 and gf(-2)=83
Explore the order of two functions
Try it: compare the chains at x=2 and x=0. Equal outputs for one input do not prove that two function rules are identical.
Worked example 2
f(x)=3x+2 and g(x)=5-x. Find expressions for fg(x) and gf(x)
- fg(x)=3(5-x)+2=15-3x+2
-
Your turn. Combine the constant terms. What is 15+2?
fg(x)=17-3x
- gf(x)=5-(3x+2)=5-3x-2
- Answer: fg(x)=17-3x and gf(x)=3-3x
Worked example 3
f(x)=2x-5 and g(x)=x^2+1. Solve fg(x)=15
- Form the composite: fg(x)=2(x^2+1)-5=2x^2-3
- 2x^2-3=15 gives 2x^2=18, so x^2=9
-
Your turn. Enter both solutions of x^2=9
x=-3 or x=3
- Answer: x=-3 or x=3. Both give g(x)=10 and then f(10)=15
An inverse undoes a function
f^{-1}(x) is the inverse function, not 1/f(x). Write y=f(x), rearrange to make x the subject, then replace the output variable by x in the inverse rule.
The inverse swaps the original domain and range. An inverse function needs each output to come from just one input; a domain restriction can make that possible.
Worked example 4
Find f^{-1}(x) for f(x)=\frac{3x-7}{5}
- Write y=\frac{3x-7}{5}. Multiply by 5: 5y=3x-7
- Add 7: 3x=5y+7. Then divide by 3
-
Your turn. Write the inverse rule, using x as its input.
f^{-1}(x)=\frac{5x+7}{3}
- Answer: f^{-1}(x)=\frac{5x+7}{3}. For example, f(4)=1 and f^{-1}(1)=4
Worked example 5
f(x)=(x+2)^2+5 for x\ge-2. Find its inverse and the inverse domain.
-
Your turn. What is the smallest output of the original function?
The original range is f(x)\ge5
- Write y=(x+2)^2+5, so (x+2)^2=y-5. Since x\ge-2, we know x+2\ge0
- Take the non-negative root: x+2=\sqrt{y-5}, then x=\sqrt{y-5}-2
- Answer: f^{-1}(x)=\sqrt{x-5}-2, with domain x\ge5. A plus-or-minus answer would not be a single inverse function.
Worked example 6
Find the inverse of f(x)=\frac{2x+7}{x-3}, where x\ne3. State the excluded input of the inverse.
- y(x-3)=2x+7, so xy-3y=2x+7
- Collect the x terms: xy-2x=3y+7, then x(y-2)=3y+7
-
Your turn. Divide by y-2, then write the inverse rule using input x
f^{-1}(x)=\frac{3x+7}{x-2}
- Answer: f^{-1}(x)=\frac{3x+7}{x-2}, for x\ne2. The original function never outputs 2: that would require 2x+7=2x-6
Common mistakes
- Applying the outside function first. For f(g(x)), apply g first, then f.
- Multiplying instead of composing. Composition feeds one function’s output into the next function.
- Replacing only part of an input. Substitute the whole expression, using brackets.
- Treating an inverse as a reciprocal. An inverse reverses a function; it does not mean one divided by the function.
- Keeping domain and range unchanged. The original domain becomes the inverse’s range, and vice versa.
- Keeping both inverse square-root branches. Use the original domain to select the correct branch.
Now try it: Composite and Inverse Functions practice questions
More on this topic: Composite and Inverse Functions worksheet with full solutions