Composite and Inverse Functions
Combining functions and finding their inverses
SPEC 2.8 • FUNCTIONS
Composite Functions
Definition
A composite function is formed when one function is applied to the result of another function.
If we have functions f and g, we can create composite functions:
fg(x)
Apply g first, then apply f to the result
fg(x) = f(g(x))
gf(x)
Apply f first, then apply g to the result
gf(x) = g(f(x))
Critical
Order matters! In general, fg(x) ≠ gf(x). The function closest to x is applied first.
Understanding the Notation
Think of composite functions as a "function machine":
Process for fg(x)
x → [g] → g(x) → [f] → f(g(x)) = fg(x)
Memory Aid
In fg(x), read right-to-left: "g of x, then f of that"
The function closest to x is applied first.
Special Notation
f²(x) means f(f(x)) — apply f twice
f³(x) means f(f(f(x))) — apply f three times
01Worked Example
Given f(x) = 2x + 3 and g(x) = x − 1, find:
(a) fg(x) (b) gf(x) (c) f²(x)
(a)
fg(x) = f(g(x)) = f(x − 1) = 2(x − 1) + 3 = 2x − 2 + 3 = 2x + 1
(b)
gf(x) = g(f(x)) = g(2x + 3) = (2x + 3) − 1 = 2x + 2
(c)
f²(x) = f(f(x)) = f(2x + 3) = 2(2x + 3) + 3 = 4x + 6 + 3 = 4x + 9
Note: fg(x) = 2x + 1 and gf(x) = 2x + 2 are different!
Worked Example02
Given f(x) = x² and g(x) = 3x − 2, find fg(x) and evaluate fg(2).
1
Find fg(x): fg(x) = f(g(x)) = f(3x − 2) = (3x − 2)²
2
Expand: fg(x) = (3x − 2)² = 9x² − 12x + 4
3
Evaluate fg(2): Either substitute into fg(x) or step-by-step:
•
Method 1: fg(2) = 9(4) − 12(2) + 4 = 36 − 24 + 4 = 16
•
Method 2: g(2) = 3(2) − 2 = 4, then f(4) = 4² = 16 ✓
Domain of Composite Functions
Rule
For fg(x) to be defined:
x must be in the domain of g
g(x) must be in the domain of f
Example
If f(x) = √x (domain x ≥ 0) and g(x) = x − 3
For fg(x) = √(x − 3): need x − 3 ≥ 0, so domain: x ≥ 3
Watch Out
When functions have restricted domains, carefully check that the output of the first function lies within the domain of the second.
Worked Example03
f(x) = √(x − 2), x ≥ 2 and g(x) = x². Find the domain of fg.
1
fg(x) = f(g(x)) = f(x²) = √(x² − 2)
2
For fg to be defined, we need g(x) in domain of f.
3
Domain of f is x ≥ 2, so need g(x) = x² ≥ 2
4
Solving x² ≥ 2: x ≤ −√2 or x ≥ √2
5
Domain of fg: x ≤ −√2 or x ≥ √2
Inverse Functions
Definition
The inverse function f⁻¹ "undoes" what f does. If f(a) = b, then f⁻¹(b) = a
Method to Find f⁻¹(x)
Step 1: Write y = f(x)
Step 2: Swap x and y
Step 3: Rearrange to make y the subject
Step 4: Write f⁻¹(x) = ...
Key Properties
ff⁻¹(x) = f⁻¹f(x) = x
Domain of f⁻¹ = Range of f
Range of f⁻¹ = Domain of f
Warning
The −1 means "inverse", NOT "reciprocal"!
Worked Example04
Find the inverse of f(x) = 3x − 5.
1
Write y = 3x − 5
2
Swap x and y: x = 3y − 5
3
Rearrange for y: x + 5 = 3y, so y = (x + 5)/3
4
Therefore: f⁻¹(x) = (x + 5)/3
Check: f(2) = 3(2) − 5 = 1, and f⁻¹(1) = (1 + 5)/3 = 2 ✓
Worked Example05
Find the inverse of f(x) = (x + 4)/2.
1
Write y = (x + 4)/2
2
Swap x and y: x = (y + 4)/2
3
Rearrange: 2x = y + 4, so y = 2x − 4
4
Therefore: f⁻¹(x) = 2x − 4
Verify: ff⁻¹(x) = f(2x − 4) = ((2x − 4) + 4)/2 = 2x/2 = x ✓
Domain and Range of Inverses
Key Relationships
Domain of f⁻¹ = Range of f
Range of f⁻¹ = Domain of f
Why?
If f takes inputs from set A and produces outputs in set B:
f: A → B
Then f⁻¹ reverses this — it takes inputs from B and produces outputs in A:
f⁻¹: B → A
Example
If f(x) = x², x ≥ 0
Domain of f: x ≥ 0
Range of f: y ≥ 0
Then for f⁻¹(x) = √x:
Domain of f⁻¹: x ≥ 0 ✓
Range of f⁻¹: y ≥ 0 ✓
For Quadratics
Always state the domain restriction. The range of the original function becomes the domain of the inverse.
Worked Example06
f(x) = x² − 6x + 5, x ≥ 3. Find f⁻¹(x) and state its domain and range.
1
Complete the square: f(x) = (x − 3)² − 9 + 5 = (x − 3)² − 4
2
Find range of f: When x ≥ 3, (x − 3)² ≥ 0, so f(x) ≥ −4. Range: y ≥ −4
3
Write y = (x − 3)² − 4, swap: x = (y − 3)² − 4
4
Rearrange: x + 4 = (y − 3)², so y − 3 = ±√(x + 4)
5
Since x ≥ 3 (right branch), use positive root: y = 3 + √(x + 4)
•
f⁻¹(x) = 3 + √(x + 4)
6
Domain of f⁻¹ = Range of f = x ≥ −4
7
Range of f⁻¹ = Domain of f = y ≥ 3
Worked Example07
Find the inverse of f(x) = (2x + 1)/(x − 3), x ≠ 3.
1
Write y = (2x + 1)/(x − 3), swap: x = (2y + 1)/(y − 3)
2
Multiply: x(y − 3) = 2y + 1
3
Expand: xy − 3x = 2y + 1
4
Collect y terms: xy − 2y = 3x + 1
5
Factorise: y(x − 2) = 3x + 1
6
Therefore: f⁻¹(x) = (3x + 1)/(x − 2), x ≠ 2
Graphical Relationship
Key Result
The graph of y = f⁻¹(x) is the reflection of y = f(x) in the line y = x.
Why Reflection?
If (a, b) is on f, then f(a) = b
So f⁻¹(b) = a, meaning (b, a) is on f⁻¹
Example: (1, 3) on f ↔ (3, 1) on f⁻¹
Intersection
f and f⁻¹ always intersect on the line y = x
To find: solve f(x) = x
Finding Where f(x) = f⁻¹(x)
Key Insight
Since f and f⁻¹ intersect on the line y = x, to find where f(x) = f⁻¹(x), simply solve:
Why This Works
At intersection points of f and f⁻¹, both equal the same y-value.
These points lie on y = x, so the y-value equals the x-value.
Therefore f(x) = x at these points.
Much Easier!
Instead of finding f⁻¹(x) then solving f(x) = f⁻¹(x) (complex algebra), just solve f(x) = x directly.
Worked Example08
Find the x-coordinate where f(x) = f⁻¹(x) for f(x) = 2x − 3.
1
To find where f(x) = f⁻¹(x), solve f(x) = x
2
2x − 3 = x
3
2x − x = 3
4
x = 3
•
Answer: x = 3
Verify: f(3) = 2(3) − 3 = 3, so the point is (3, 3) which lies on y = x ✓
Practice
Question 1: Given f(x) = x + 5 and g(x) = 2x − 1, find fg(x) and gf(x).
fg(x) = f(g(x)) = f(2x − 1) = (2x − 1) + 5 = 2x + 4
gf(x) = g(f(x)) = g(x + 5) = 2(x + 5) − 1 = 2x + 10 − 1 = 2x + 9
Practice
Question 2: Find the inverse of f(x) = 4x + 7.
y = 4x + 7
Swap: x = 4y + 7
Rearrange: x − 7 = 4y
y = (x − 7)/4
f⁻¹(x) = (x − 7)/4
Practice
Question 3: Find where f(x) = f⁻¹(x) for f(x) = 3x + 4.
Solve f(x) = x:
3x + 4 = x
3x − x = −4
2x = −4
x = −2
At x = −2, both f(x) and f⁻¹(x) equal −2.
Summary
Key Results
ConceptKey Point
fg(x)= f(g(x)) — apply g first, then f
Orderfg(x) ≠ gf(x) in general
Finding f⁻¹Swap x and y, rearrange for y
Domain/RangeDom(f⁻¹) = Range(f), Range(f⁻¹) = Dom(f)
Graphf⁻¹ is reflection of f in y = x
f(x) = f⁻¹(x)Solve f(x) = x (much easier!)
Exam Skills
Always check order carefully for composites
For quadratic inverses, note the domain restriction
To find f(x) = f⁻¹(x), just solve f(x) = x
Next: Composite Functions