Function Composition and Inverses - Complete Interactive Lesson
Part 1: Function Composition
🔗 Function Composition
Part 1 of 7 — Function Composition
What Is Composition?
The composition of f and g, written (f∘g)(x), means "f of g of x":
(f∘g)(x)=f(g(x))
Think of it as a pipeline: input x flows into g first, then the output flows into f.
Example
If f(x)=x2 and g(x)=x+3:
(f∘g)(x)=f(g(x))=f(x+3)=(x+3)2
(g∘f)(x)=g(f(x))=g(x2)=x2+3
⚠️ Order matters!f∘g=g∘f in general.
📝 More Examples
Example 1
f(x)=2x+1,g(x)=x2−4
(f∘g)(x)=2(x2−4)+1=2x2−7
(g∘f)(x)=(2x+1)2−4=4x2+4x−3
Example 2: Evaluating at a Point
f(x)=x,g(x)=3x+1
(f∘g)(5)=f(g(5))=f(16)=4
Example 3: Three Functions
f(x)=x2,g(x)=x+1,h(x)=2x
(f∘g∘h)(x)=f(g(h(x)))=f(g(2x))=f(2x+1)=(2x+1)2
Decomposition
Express h(x)=3x+7 as a composition: let f(x)=x,g(x)=3x+7. Then h=f∘g.
🔍 Domain of a Composition
The domain of f∘g requires:
x must be in the domain of g
g(x) must be in the domain of f
Example
f(x)=x,g(x)=4−x2
(f∘g)(x)=4−x2
Domain: 4−x2≥0⟹−2≤x≤2
Another Example
f(x)=x1,g(x)=x−3
(f∘g)(x)=x−31
Domain: x=3 (so g(x)=0, which is not in domain of f).
Composition Quiz 🎯
Composition Practice 🧮
Let f(x)=2x−1,g(x)=x+5.
1)(f∘g)(3) = ?
2)(g∘f)(3) = ?
3)(f∘f)(2) = ?
Composition Concepts 🔽
Exit Quiz ✅
Part 2: Inverse Functions
🔄 Inverse Functions
Part 2 of 7 — Inverse Functions
What Is an Inverse?
f−1undoesf. If f(a)=b, then f−1(b)=a.
f(f−1(x))=xandf−1(f(x))=x
Key Properties
Domain of f−1 = Range of f
Range of f−1 = Domain of f
The graph of f−1 is the reflection of f across the line y=x
When Does f−1 Exist?
f must be one-to-one (each output comes from exactly one input).
One-to-one → passes the Horizontal Line Test
Not one-to-one → no inverse (unless we restrict the domain)
📝 Finding Inverse Functions
Algorithm
Replace f(x) with y
Swap x and y
Solve for y
Write f−1(x)=y
Example 1: f(x)=3x−7
y=3x−7 → x=3y−7 → x+7=3y → y=3x+7
f−1(x)=3x+7
Verify: f(f−1(x))=3⋅3x+7−7=x+7−7=x ✓
Example 2: f(x)=x2+1,x≥0
x=y2+1⟹y=x−1
f−1(x)=x−1,x≥1
📊 The Horizontal Line Test
A function is one-to-one exactly when no horizontal line meets its graph more than once. In the figure above, y=4 meets y=x2 at two points, (−2,4) and (2,4), so two inputs share an output and there is no inverse function. Restricting the domain to x≥0 removes the left half, and every horizontal line now meets the graph at most once.
Function
One-to-one?
Inverse exists?
f(x)=2x+3
Yes
Yes
f(x)=x2 (all reals)
No
No (without restriction)
f(x)=x3
Yes
Yes (f−1(x)=3x)
f(x)=(x−1)2 (all reals)
No
No (restrict to x≥1)
f(x)=ex
Yes
Yes (f−1(x)=lnx)
Restricting Domains
f(x)=x2 on x≥0: now one-to-one!
f−1(x)=x (the principal square root)
Inverse Functions Quiz 🎯
Finding Inverses 🧮
1)f(x)=4x−3. Find f−1(9):
2)f(x)=2x+1. Find f−1(x)=ax+b. What is a?
3) Same function: What is b?
Inverse Concepts 🔽
Exit Quiz ✅
Part 3: Inverses of Common Functions
🧮 Inverses of Common Functions
Part 3 of 7 — Inverses of Common Functions
Inverse Pairs
Function f(x)
Inverse f−1(x)
Domain restriction
x2
x
domain of x2 restricted to x≥0
x3
3x
All reals
ex
lnx
x>0 for ln
10x
log10x
x>0 for log
ax
logax
x>0 for loga
x1
x1
x=0 (its own inverse)
mx+b, m=0
mx−b
All reals
💡 The graph of each inverse is the reflection of the original function over y=x.
If f is one-to-one, we can read f−1 from the table by swapping input/output:
x
f(x)
1
3
2
5
3
1
4
2
So f−1(3)=1,f−1(5)=2,f−1(1)=3,f−1(2)=4.
Verifying One-to-One from a Table
Check: does any output appear more than once? If yes, f is NOT one-to-one.
Composition Chains from Tables
(f∘f)(1): f(1)=3, then f(3)=1. So (f∘f)(1)=1.
⚠️ If an inner output is not in the table, the composition is undefined from the table alone. With the table above, (f∘g)(5) needs f(5), which is not listed.
📈 Composition with Graphs
To find (f∘g)(a) from graphs:
Go to x=a on the graph of g → read g(a)
Go to x=g(a) on the graph of f → read f(g(a))
Graph of f−1
Reflect the graph of f across y=x.
Key observations:
If f passes through (2,5), then f−1 passes through (5,2)
Increasing functions have increasing inverses
x-intercepts of f become y-intercepts of f−1
A graph has an inverse function only if it passes the horizontal line test
Aside: where a graph crosses the line y=x, f(a)=a, so the function and its inverse share that point.
Use the graphs above. 📈 Read each inner value from its graph first, then feed it into the outer graph.
Part 5 of 7 — Piecewise & Absolute Value Compositions
Composing with Piecewise Functions
If f(x)={x+2x2x<0x≥0 and g(x)=x−1:
(f∘g)(3)=f(g(3))=f(2)=22=4 (since 2≥0)
(f∘g)(−2)=f(g(−2))=f(−3)=−3+2=−1 (since −3<0)
Composing with Absolute Value
∣f(x)∣ takes the output and makes it nonnegative.
f(∣x∣) takes the input and makes it nonnegative first.
These are different! For f(x)=x−3 (see the figure above):
∣f(x)∣=∣x−3∣ (V-shape with vertex at (3,0))
f(∣x∣)=∣x∣−3 (V-shape with vertex at (0,−3), shifted down 3)
📝 Transformations Are Compositions
Every transformation from earlier in the course is a composition with a simple linear function.
Transformation
As a composition
Inner or outer?
f(x)+k (vertical shift)
g(f(x)) with g(x)=x+k
g is outer
f(x+h) (horizontal shift)
f(g(x)) with g(x)=x+h
g is inner
k⋅f(x) (vertical dilation)
g(f(x)) with g(x)=kx
g is outer
f(kx) (horizontal dilation)
f(g(x)) with g(x)=kx
g is inner
Outer = vertical, inner = horizontal. That is the same inside/outside rule you used for transformations.
Order Matters
Composition is not commutative. With f(x)=x2 and g(x)=x+3:
f(g(x))=(x+3)2, a horizontal shift left 3
g(f(x))=x2+3, a vertical shift up 3
The Identity Function
The function i(x)=x changes nothing: f(i(x))=i(f(x))=f(x). It plays the role for composition that 0 plays for addition and 1 plays for multiplication.
🔧 Decomposition Strategies
Breaking a complex function into simpler pieces:
Decomposing a Composite Function
Complex Function
Inner g(x)
Outer f(u)
x2+1
x2+1
u
(3x−5)7
3x−5
u7
2x2
x2
2u
e−x2
−x2
eu
x2+41
x2+4
u1
💡 Decomposing a function this way tells you its domain (the inner output must be a legal input for the outer function) and the order for building an inverse: undo the outer layer first.
Transformations & Decomposition Quiz 🎯
Piecewise Composition Practice 🧮
Let f(x)={x+2x2x<0x≥0 and g(x)=x−1.
1)(f∘g)(0) = ?
2)(f∘g)(5) = ?
3)(g∘f)(−4) = ?
Decomposition Concepts 🔽
Exit Quiz ✅
Part 6: Verifying Inverses & Algebraic Techniques
📐 Verifying Inverses & Algebraic Techniques
Part 6 of 7 — Verifying Inverses & Algebraic Techniques
How to Verify Two Functions Are Inverses
If f and g are inverses, BOTH must hold:
f(g(x))=xANDg(f(x))=x
⚠️ Verifying only ONE direction is not enough! You need both.
Example: Are f(x)=3x−6 and g(x)=3x+6 inverses?
Check 1: f(g(x))=3⋅3x+6−6=x+6−6=x ✓
Check 2: g(f(x))=3(3x−6)+6=33x=x ✓
Both hold → yes, they are inverses!
🔧 Algebraic Techniques for Finding Inverses
Technique 1: Quadratic Inverses
f(x)=x2−4x+7,x≥2
Complete the square: f(x)=(x−2)2+3
Swap: x=(y−2)2+3
(y−2)2=x−3
y=2+x−3 (positive root, since the inverse's outputs are the original inputs, y≥2); domain x≥3
Technique 2: Implicit Solving
f(x)=x2−1x2+1,x>1
x=y2−1y2+1⟹x(y2−1)=y2+1⟹xy2−x=y2+1
y2(x−1)=x+1⟹y2=x−1x+1⟹y=x−1x+1,x>1
🔗 Composition & Inverse Connections
Self-Inverse Functions (Involutions)
Some functions are their own inverse: f(f(x))=x.
Examples:
f(x)=x1: f(f(x))=1/x1=x ✓
f(x)=−x: f(f(x))=−(−x)=x ✓
f(x)=5−x: f(f(x))=5−(5−x)=x ✓
Composition of Inverses
If h=f∘g, then h−1=g−1∘f−1
💡 The inverse of a composition reverses the order — like undoing layers. Remove the outer layer first!
Verification & Techniques Quiz 🎯
Verification Practice 🧮
f(x)=2x+5,g(x)=2x−5
1)f(g(10)) = ?
2)g(f(10)) = ?
3) Are they inverses? (Enter "yes" or "no")
Advanced Inverse Concepts 🔽
Exit Quiz ✅
Part 7: Composition & Inverses — Full Synthesis
🎯 Composition & Inverses — Full Synthesis
Part 7 of 7 — Composition & Inverses — Full Synthesis
Master Summary
Concept
Key Formula
Composition
(f∘g)(x)=f(g(x))
Inverse
f(f−1(x))=f−1(f(x))=x
Finding inverse
Swap x,y and solve
One-to-one test
Horizontal Line Test
Self-inverse
f(f(x))=x
Inverse of composition
(f∘g)−1=g−1∘f−1
Essential Inverse Pairs
xn↔nx (x≥0 when n is even), ex↔lnx, ax↔logax, mx+b↔mx−b