Skip to content
🎯⭐ INTERACTIVE LESSON

Function Composition & Inverses

Learn step-by-step with interactive practice!

Function Composition & Inverses - Complete Interactive Lesson

Part 1: Function Composition

🔗 Function Composition

Part 1 of 7

What Is Composition?

The composition of ff and gg, written (f∘g)(x)(f \circ g)(x), means "ff of gg of xx":

(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))

Think of it as a pipeline: input xx flows into gg first, then the output flows into ff.

Example

If f(x)=x2f(x) = x^2 and g(x)=x+3g(x) = x+3:

(f∘g)(x)=f(g(x))=f(x+3)=(x+3)2(f \circ g)(x) = f(g(x)) = f(x+3) = (x+3)^2

(g∘f)(x)=g(f(x))=g(x2)=x2+3(g \circ f)(x) = g(f(x)) = g(x^2) = x^2+3

⚠️ Order matters! f∘g≠g∘ff \circ g \neq g \circ f in general.

📝 More Examples

Example 1

f(x)=2x+1,g(x)=x2−4f(x)=2x+1, g(x)=x^2-4

(f∘g)(x)=2(x2−4)+1=2x2−7(f \circ g)(x) = 2(x^2-4)+1 = 2x^2-7

(g∘f)(x)=(2x+1)2−4=4x2+4x−3(g \circ f)(x) = (2x+1)^2-4 = 4x^2+4x-3

Example 2: Evaluating at a Point

f(x)=x,g(x)=3x+1f(x)=\sqrt{x}, g(x)=3x+1

(f∘g)(5)=f(g(5))=f(16)=4(f \circ g)(5) = f(g(5)) = f(16) = 4

Example 3: Three Functions

f(x)=x2,g(x)=x+1,h(x)=2xf(x)=x^2, g(x)=x+1, h(x)=2x

(f∘g∘h)(x)=f(g(h(x)))=f(g(2x))=f(2x+1)=(2x+1)2(f \circ g \circ h)(x) = f(g(h(x))) = f(g(2x)) = f(2x+1) = (2x+1)^2

Decomposition

Express h(x)=3x+7h(x) = \sqrt{3x+7} as a composition: let f(x)=x,g(x)=3x+7f(x) = \sqrt{x}, g(x) = 3x+7. Then h=f∘gh = f \circ g.

🔍 Domain of a Composition

The domain of f∘gf \circ g requires:

  1. xx must be in the domain of gg
  2. g(x)g(x) must be in the domain of ff

Example

f(x)=x,g(x)=4−x2f(x) = \sqrt{x}, g(x) = 4-x^2

(f∘g)(x)=4−x2(f \circ g)(x) = \sqrt{4-x^2}

Domain: 4−x2≥0  ⟹  −2≤x≤24-x^2 \geq 0 \implies -2 \leq x \leq 2

Another Example

f(x)=1x,g(x)=x−3f(x) = \frac{1}{x}, g(x) = x-3

(f∘g)(x)=1x−3(f \circ g)(x) = \frac{1}{x-3}

Domain: x≠3x \neq 3 (so g(x)≠0g(x) \neq 0, which is not in domain of ff).

Composition Quiz 🎯

Composition Practice 🧮

Let f(x)=2x−1,g(x)=x+5f(x)=2x-1, g(x)=x+5.

1) (f∘g)(3)(f \circ g)(3) = ?

2) (g∘f)(3)(g \circ f)(3) = ?

3) (f∘f)(2)(f \circ f)(2) = ?

Composition Concepts 🔽

Exit Quiz ✅

Part 2: Domain of Compositions

🔄 Inverse Functions

Part 2 of 7

What Is an Inverse?

f−1f^{-1} undoes ff. If f(a)=bf(a)=b, then f−1(b)=af^{-1}(b)=a.

f(f−1(x))=xandf−1(f(x))=xf(f^{-1}(x)) = x \quad \text{and} \quad f^{-1}(f(x)) = x

Key Properties

  • Domain of f−1f^{-1} = Range of ff
  • Range of f−1f^{-1} = Domain of ff
  • The graph of f−1f^{-1} is the reflection of ff across the line y=xy = x

When Does f−1f^{-1} Exist?

ff 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

  1. Replace f(x)f(x) with yy
  2. Swap xx and yy
  3. Solve for yy
  4. Write f−1(x)=yf^{-1}(x) = y

Example 1: f(x)=3x−7f(x) = 3x - 7

y=3x−7y = 3x-7 → x=3y−7x = 3y-7 → x+7=3yx+7 = 3y → y=x+73y = \frac{x+7}{3}

f−1(x)=x+73f^{-1}(x) = \frac{x+7}{3}

Verify: f(f−1(x))=3⋅x+73−7=x+7−7=xf(f^{-1}(x)) = 3\cdot\frac{x+7}{3}-7 = x+7-7 = x ✓

Example 2: f(x)=x2+1,x≥0f(x) = x^2+1, x \geq 0

x=y2+1  ⟹  y=x−1x = y^2+1 \implies y = \sqrt{x-1}

f−1(x)=x−1,x≥1f^{-1}(x) = \sqrt{x-1}, \quad x \geq 1

📊 The Horizontal Line Test

FunctionOne-to-one?Inverse exists?
f(x)=2x+3f(x) = 2x+3YesYes
f(x)=x2f(x) = x^2 (all reals)NoNo (without restriction)
f(x)=x3f(x) = x^3YesYes (f−1(x)=x3f^{-1}(x) = \sqrt[3]{x})
f(x)=sin⁡xf(x) = \sin x (all reals)NoNo (restrict to [−π/2,π/2][-\pi/2, \pi/2])
f(x)=exf(x) = e^xYesYes (f−1(x)=ln⁡xf^{-1}(x) = \ln x)

Restricting Domains

f(x)=x2f(x) = x^2 on x≥0x \geq 0: now one-to-one!

f−1(x)=xf^{-1}(x) = \sqrt{x} (the principal square root)

💡 When we write sin⁡−1x\sin^{-1}x, we use the restricted domain [−π/2,π/2][-\pi/2, \pi/2].

Inverse Functions Quiz 🎯

Finding Inverses 🧮

1) f(x)=4x−3f(x) = 4x - 3. Find f−1(9)f^{-1}(9):

2) f(x)=x+12f(x) = \frac{x+1}{2}. Find f−1(x)=ax+bf^{-1}(x) = ax + b. What is aa?

3) Same function: What is bb?

Inverse Concepts 🔽

Exit Quiz ✅

Part 3: Inverse Functions

🧮 Inverses of Common Functions

Part 3 of 7

Inverse Pairs

Function f(x)f(x)Inverse f−1(x)f^{-1}(x)Domain restriction
x2x^2x\sqrt{x}x≥0x \geq 0 for both
x3x^3x3\sqrt[3]{x}All reals
exe^xln⁡x\ln xx>0x > 0 for ln⁡\ln
10x10^xlog⁡10x\log_{10} xx>0x > 0 for log⁡\log
axa^xlog⁡ax\log_a xx>0x > 0 for log⁡a\log_a
sin⁡x\sin xsin⁡−1x\sin^{-1} x[−π/2,π/2][-\pi/2, \pi/2], [−1,1][-1,1]
cos⁡x\cos xcos⁡−1x\cos^{-1} x[0,π][0, \pi], [−1,1][-1,1]
tan⁡x\tan xtan⁡−1x\tan^{-1} x(−π/2,π/2)(-\pi/2, \pi/2)

💡 The graph of each inverse is the reflection of the original function over y=xy = x.

📝 Exponential & Logarithmic Inverses

Why ln⁡\ln and exe^x are inverses

eln⁡x=x(x>0)e^{\ln x} = x \quad (x > 0)

ln⁡(ex)=x(all x)\ln(e^x) = x \quad (\text{all } x)

Solving with Inverses

Solve e2x=15e^{2x} = 15:

ln⁡(e2x)=ln⁡15\ln(e^{2x}) = \ln 15

2x=ln⁡152x = \ln 15

x=ln⁡152≈1.354x = \frac{\ln 15}{2} \approx 1.354

Solve log⁡2(x−3)=5\log_2(x-3) = 5:

x−3=25=32x-3 = 2^5 = 32

x=35x = 35

Key Identities

  • log⁡a(ax)=x\log_a(a^x) = x
  • alog⁡ax=xa^{\log_a x} = x

🔀 Inverses of Rational Functions

Example: f(x)=2x+1x−3f(x) = \frac{2x+1}{x-3}

Swap and solve:

x=2y+1y−3x = \frac{2y+1}{y-3}

x(y−3)=2y+1x(y-3) = 2y+1

xy−3x=2y+1xy - 3x = 2y + 1

xy−2y=3x+1xy - 2y = 3x + 1

y(x−2)=3x+1y(x-2) = 3x+1

f−1(x)=3x+1x−2f^{-1}(x) = \frac{3x+1}{x-2}

Verification: f(f−1(x))f(f^{-1}(x)):

f(3x+1x−2)=2⋅3x+1x−2+13x+1x−2−3=6x+2+x−2x−23x+1−3x+6x−2=7x7=xf\left(\frac{3x+1}{x-2}\right) = \frac{2 \cdot \frac{3x+1}{x-2}+1}{\frac{3x+1}{x-2}-3} = \frac{\frac{6x+2+x-2}{x-2}}{\frac{3x+1-3x+6}{x-2}} = \frac{7x}{7} = x ✓

Inverse Pairs Quiz 🎯

Inverse Calculations 🧮

1) Solve ex=20e^x = 20: x=ln⁡(x = \ln(?)). Enter the number.

2) Solve log⁡3x=4\log_3 x = 4: xx = ?

3) If f(x)=5x−3f(x) = 5x-3, then f−1(12)f^{-1}(12) = ?

Inverse Pairs Concepts 🔽

Exit Quiz ✅

Part 4: Finding Inverses

📊 Composition with Tables & Graphs

Part 4 of 7

Reading from Tables

Given tables of ff and gg:

xxf(x)f(x)g(x)g(x)
132
254
311
423
545

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

g(2)=4g(2) = 4, then f(4)=2f(4) = 2. So (f∘g)(2)=2(f \circ g)(2) = 2.

Find (g∘f)(3)(g \circ f)(3):

f(3)=1f(3) = 1, then g(1)=2g(1) = 2. So (g∘f)(3)=2(g \circ f)(3) = 2.

📝 Inverse from Tables

If ff is one-to-one, we can read f−1f^{-1} from the table by swapping input/output:

xxf(x)f(x)
13
25
31
42

So f−1(3)=1,f−1(5)=2,f−1(1)=3,f−1(2)=4f^{-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, ff is NOT one-to-one.

Composition Chains from Tables

(f∘f)(1)(f \circ f)(1): f(1)=3f(1) = 3, then f(3)=1f(3) = 1. So (f∘f)(1)=1(f \circ f)(1) = 1.

This means 11 and 33 form a 2-cycle under ff.

📈 Composition with Graphs

To find (f∘g)(a)(f \circ g)(a) from graphs:

  1. Go to x=ax = a on the graph of gg → read g(a)g(a)
  2. Go to x=g(a)x = g(a) on the graph of ff → read f(g(a))f(g(a))

Graph of f−1f^{-1}

Reflect the graph of ff across y=xy = x.

Key observations:

  • If ff passes through (2,5)(2, 5), then f−1f^{-1} passes through (5,2)(5, 2)
  • Increasing functions have increasing inverses
  • xx-intercepts of ff become yy-intercepts of f−1f^{-1}

Fixed Points

A fixed point is where f(x)=xf(x) = x (the graph crosses y=xy = x).

At fixed points: f(a)=a=f−1(a)f(a) = a = f^{-1}(a). Both the function and its inverse share this point!

Tables & Graphs Quiz 🎯

Use this table:

xx1234
f(x)f(x)4123
g(x)g(x)2341

Table Practice 🧮

Use: f(1)=3,f(2)=5,f(3)=7,f(4)=9f(1)=3, f(2)=5, f(3)=7, f(4)=9

1) (f∘f−1)(7)(f \circ f^{-1})(7) = ?

2) f−1(9)f^{-1}(9) = ?

3) f−1(f−1(7))f^{-1}(f^{-1}(7)) = ? (Hint: find f−1(7)f^{-1}(7) first, then apply f−1f^{-1} again)

Graph & Table Concepts 🔽

Exit Quiz ✅

Part 5: Verifying Inverses

🧩 Piecewise & Absolute Value Compositions

Part 5 of 7

Composing with Piecewise Functions

If f(x)={x+2x<0x2x≥0f(x) = \begin{cases} x+2 & x < 0 \\ x^2 & x \geq 0 \end{cases} and g(x)=x−1g(x) = x-1:

(f∘g)(3)=f(g(3))=f(2)=22=4(f \circ g)(3) = f(g(3)) = f(2) = 2^2 = 4 (since 2≥02 \geq 0)

(f∘g)(−2)=f(g(−2))=f(−3)=−3+2=−1(f \circ g)(-2) = f(g(-2)) = f(-3) = -3+2 = -1 (since −3<0-3 < 0)

Composing with Absolute Value

∣f(x)∣|f(x)| takes the output and makes it positive.

f(∣x∣)f(|x|) takes the input and makes it positive first.

These are different! For f(x)=x−3f(x) = x - 3:

  • ∣f(x)∣=∣x−3∣|f(x)| = |x-3| (V-shape at x=3x=3)
  • f(∣x∣)=∣x∣−3f(|x|) = |x|-3 (V-shape at x=0x=0, shifted down 33)

📝 Function Operations Review

Arithmetic Operations

  • (f+g)(x)=f(x)+g(x)(f+g)(x) = f(x)+g(x)
  • (f−g)(x)=f(x)−g(x)(f-g)(x) = f(x)-g(x)
  • (fg)(x)=f(x)⋅g(x)(fg)(x) = f(x) \cdot g(x)
  • (f/g)(x)=f(x)/g(x),g(x)≠0(f/g)(x) = f(x)/g(x), \quad g(x) \neq 0

Example

f(x)=x2,g(x)=2x+1f(x) = x^2, g(x) = 2x+1

(f+g)(x)=x2+2x+1=(x+1)2(f+g)(x) = x^2+2x+1 = (x+1)^2

(fg)(x)=x2(2x+1)=2x3+x2(fg)(x) = x^2(2x+1) = 2x^3+x^2

(f/g)(x)=x22x+1,x≠−12(f/g)(x) = \frac{x^2}{2x+1}, \quad x \neq -\frac{1}{2}

Domains of Combined Functions

dom(f+g)=dom(f)∩dom(g)\text{dom}(f+g) = \text{dom}(f) \cap \text{dom}(g)

dom(f/g)=dom(f)∩dom(g)∖{x:g(x)=0}\text{dom}(f/g) = \text{dom}(f) \cap \text{dom}(g) \setminus \{x: g(x)=0\}

🔧 Decomposition Strategies

Breaking a complex function into simpler pieces:

Chain Decomposition (for Calculus)

Complex FunctionInner g(x)g(x)Outer f(u)f(u)
x2+1\sqrt{x^2+1}x2+1x^2+1u\sqrt{u}
(3x−5)7(3x-5)^73x−53x-5u7u^7
sin⁡(x2)\sin(x^2)x2x^2sin⁡u\sin u
e−x2e^{-x^2}−x2-x^2eue^u
ln⁡(cos⁡x)\ln(\cos x)cos⁡x\cos xln⁡u\ln u

💡 This decomposition is the foundation of the Chain Rule in calculus: ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x).

Operations & Decomposition Quiz 🎯

Operations Practice 🧮

f(x)=x+3,g(x)=2xf(x) = x+3, g(x) = 2x

1) (f+g)(4)(f+g)(4) = ?

2) (f⋅g)(2)(f \cdot g)(2) = ?

3) (f/g)(6)(f/g)(6) = ? (Enter as a fraction like "3/4")

Decomposition Concepts 🔽

Exit Quiz ✅

Part 6: Problem-Solving Workshop

📐 Verifying Inverses & Algebraic Techniques

Part 6 of 7

How to Verify Two Functions Are Inverses

If ff and gg are inverses, BOTH must hold:

f(g(x))=xANDg(f(x))=xf(g(x)) = x \quad \text{AND} \quad g(f(x)) = x

⚠️ Verifying only ONE direction is not enough! You need both.

Example: Are f(x)=3x−6f(x) = 3x-6 and g(x)=x+63g(x) = \frac{x+6}{3} inverses?

Check 1: f(g(x))=3⋅x+63−6=x+6−6=xf(g(x)) = 3\cdot\frac{x+6}{3}-6 = x+6-6 = x ✓

Check 2: g(f(x))=(3x−6)+63=3x3=xg(f(x)) = \frac{(3x-6)+6}{3} = \frac{3x}{3} = x ✓

Both hold → yes, they are inverses!

🔧 Algebraic Techniques for Finding Inverses

Technique 1: Quadratic Inverses

f(x)=x2−4x+7,x≥2f(x) = x^2 - 4x + 7, x \geq 2

Complete the square: f(x)=(x−2)2+3f(x) = (x-2)^2+3

Swap: x=(y−2)2+3x = (y-2)^2+3

(y−2)2=x−3(y-2)^2 = x-3

y=2+x−3y = 2+\sqrt{x-3} (positive root, since x≥2x \geq 2)

Technique 2: Implicit Solving

f(x)=x2+1x2−1,x>1f(x) = \frac{x^2+1}{x^2-1}, x > 1

x=y2+1y2−1  ⟹  x(y2−1)=y2+1  ⟹  xy2−x=y2+1x = \frac{y^2+1}{y^2-1} \implies x(y^2-1) = y^2+1 \implies xy^2-x = y^2+1

y2(x−1)=x+1  ⟹  y2=x+1x−1  ⟹  y=x+1x−1y^2(x-1) = x+1 \implies y^2 = \frac{x+1}{x-1} \implies y = \sqrt{\frac{x+1}{x-1}}

🔗 Composition & Inverse Connections

Self-Inverse Functions (Involutions)

Some functions are their own inverse: f(f(x))=xf(f(x)) = x.

Examples:

  • f(x)=1xf(x) = \frac{1}{x}: f(f(x))=11/x=xf(f(x)) = \frac{1}{1/x} = x ✓
  • f(x)=−xf(x) = -x: f(f(x))=−(−x)=xf(f(x)) = -(-x) = x ✓
  • f(x)=a−x1+axf(x) = \frac{a-x}{1+ax} for certain aa

Composition of Inverses

If h=f∘gh = f \circ g, then h−1=g−1∘f−1h^{-1} = g^{-1} \circ f^{-1}

💡 The inverse of a composition reverses the order — like undoing layers. Remove the outer layer first!

Derivative Preview

The slope of f−1f^{-1} at a point is the reciprocal of the slope of ff:

If f′(a)=mf'(a) = m, then (f−1)′(f(a))=1m(f^{-1})'(f(a)) = \frac{1}{m}

Verification & Techniques Quiz 🎯

Verification Practice 🧮

f(x)=2x+5,g(x)=x−52f(x)=2x+5, g(x)=\frac{x-5}{2}

1) f(g(10))f(g(10)) = ?

2) g(f(10))g(f(10)) = ?

3) Are they inverses? (Enter "yes" or "no")

Advanced Inverse Concepts 🔽

Exit Quiz ✅

Part 7: Review & Applications

🎯 Composition & Inverses — Full Synthesis

Part 7 of 7

Master Summary

ConceptKey Formula
Composition(f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))
Inversef(f−1(x))=f−1(f(x))=xf(f^{-1}(x)) = f^{-1}(f(x)) = x
Finding inverseSwap x,yx,y and solve
One-to-one testHorizontal Line Test
Self-inversef(f(x))=xf(f(x)) = x
Inverse of composition(f∘g)−1=g−1∘f−1(f \circ g)^{-1} = g^{-1} \circ f^{-1}

Essential Inverse Pairs

xn↔xnx^n \leftrightarrow \sqrt[n]{x}, ex↔ln⁡xe^x \leftrightarrow \ln x, ax↔log⁡axa^x \leftrightarrow \log_a x, sin⁡x↔sin⁡−1x\sin x \leftrightarrow \sin^{-1}x (restricted)

🗺️ Problem-Solving Strategies

Composition

  1. Identify inner and outer functions
  2. Substitute the inner into the outer
  3. Simplify
  4. Check domain restrictions

Finding Inverses

  1. Check one-to-one (HLT or algebraic)
  2. Write y=f(x)y = f(x), swap xx and yy
  3. Solve for yy
  4. Verify with f(f−1(x))=xf(f^{-1}(x)) = x

Decomposition (for Calculus prep)

  • Identify the "last operation" → outer function
  • Everything inside → inner function
  • Practice: h(x)=esin⁡(x2)→h(x) = e^{\sin(x^2)} \to outer eue^u, middle sin⁡v\sin v, inner x2x^2

📝 Mixed Practice

Problem 1

f(x)=x+1x−1f(x) = \frac{x+1}{x-1}. Show ff is its own inverse.

f(f(x))=x+1x−1+1x+1x−1−1=x+1+x−1x−1x+1−x+1x−1=2x2=xf(f(x)) = \frac{\frac{x+1}{x-1}+1}{\frac{x+1}{x-1}-1} = \frac{\frac{x+1+x-1}{x-1}}{\frac{x+1-x+1}{x-1}} = \frac{2x}{2} = x ✓

Problem 2

f(x)=2x,g(x)=x2f(x) = 2^x, g(x) = x^2. Find (f∘g)(3)(f \circ g)(3):

g(3)=9,f(9)=29=512g(3)=9, f(9)=2^9=512

Problem 3

Find f−1(x)f^{-1}(x) for f(x)=ln⁡(x−3)+2f(x) = \ln(x-3)+2:

x=ln⁡(y−3)+2  ⟹  x−2=ln⁡(y−3)  ⟹  y−3=ex−2x = \ln(y-3)+2 \implies x-2 = \ln(y-3) \implies y-3 = e^{x-2}

f−1(x)=ex−2+3f^{-1}(x) = e^{x-2}+3

Synthesis Quiz 🎯

Mixed Calculations 🧮

1) f(x)=3x+1,g(x)=x2f(x)=3x+1, g(x)=x^2. Find (g∘f)(−1)(g \circ f)(-1):

2) f(x)=ln⁡xf(x)=\ln x. Find f−1(0)f^{-1}(0):

3) If f(2)=7f(2) = 7 and f(5)=2f(5) = 2, find (f∘f−1)(7)(f \circ f^{-1})(7):

Master Concepts 🔽

Final Exit Quiz ✅