Function Composition and Inverse Functions

Compose functions f(g(x)), find and verify inverse functions f⁻¹(x).

advancedalgebrafunctionscompositioninversehigh-schoolUpdated 2026-02-01

Function Composition

Composition: Apply one function to the result of another

Notation: (f ∘ g)(x) = f(g(x))

Read as: "f of g of x" or "f composed with g"

Process: Evaluate inside function first (g), then outside function (f)

Example 1: Basic Composition

Given: f(x) = 2x + 1 and g(x) = x²

Find (f ∘ g)(3):

Step 1: Find g(3)

g(3) = 3² = 9

Step 2: Find f(9)

f(9) = 2(9) + 1 = 19

Answer: (f ∘ g)(3) = 19

Example 2: Composition Formula

Given: f(x) = 3x - 2 and g(x) = x + 5

Find f(g(x)):

Substitute g(x) into f:

f(g(x)) = f(x + 5)
        = 3(x + 5) - 2
        = 3x + 15 - 2
        = 3x + 13

Answer: f(g(x)) = 3x + 13

Order Matters!

Generally: f(g(x)) g(f(x))

Example: Showing Different Results

f(x) = x² and g(x) = x + 1

Find f(g(x)):

f(g(x)) = f(x + 1) = (x + 1)² = x² + 2x + 1

Find g(f(x)):

g(f(x)) = g(x²) = x² + 1

Different! x² + 2x + 1 ≠ x² + 1

Evaluating Compositions

With specific values

Example: Given Values

f(2) = 7, g(2) = 5, g(7) = 3

Find f(g(2)):

g(2) = 5  (given)
f(5) = ? (not given, cannot solve)

Find g(f(2)):

f(2) = 7  (given)
g(7) = 3  (given)

Answer: g(f(2)) = 3

Decomposing Functions

Writing a function as composition of simpler functions

Example: Decompose h(x) = (2x + 1)³

Let:

  • g(x) = 2x + 1 (inside)
  • f(x) = x³ (outside)

Then: h(x) = f(g(x))

Check:

f(g(x)) = f(2x + 1) = (2x + 1)³ ✓

Inverse Functions

Inverse function: "Undoes" what original function does

Notation: f⁻¹(x) (read "f inverse of x")

Property: If f(a) = b, then f⁻¹(b) = a

Important: f⁻¹(x) does NOT mean 1/f(x)

Example: Understanding Inverses

If f(x) = 2x:

  • f(3) = 6 (multiply by 2)
  • f⁻¹(6) = 3 (divide by 2, undo multiplication)

So f⁻¹(x) = x/2

Finding Inverse Functions

Steps:

  1. Replace f(x) with y
  2. Swap x and y
  3. Solve for y
  4. Replace y with f⁻¹(x)

Example 1: Linear Function

Find inverse of f(x) = 3x + 2

Step 1: y = 3x + 2

Step 2: x = 3y + 2 (swap)

Step 3: Solve for y

x - 2 = 3y
y = (x - 2)/3

Step 4: f⁻¹(x) = (x - 2)/3

Example 2: With Fractions

Find inverse of f(x) = (x + 5)/2

Replace: y = (x + 5)/2

Swap: x = (y + 5)/2

Solve:

2x = y + 5
y = 2x - 5

Answer: f⁻¹(x) = 2x - 5

Example 3: Square Root

Find inverse of f(x) = x² (where x ≥ 0)

Replace: y = x²

Swap: x = y²

Solve: y = ±√x

Restrict: Since original had x ≥ 0, and we need function, take positive

Answer: f⁻¹(x) = √x

Verifying Inverses

Two functions are inverses if:

  • f(f⁻¹(x)) = x
  • f⁻¹(f(x)) = x

Both compositions must equal x!

Example: Verify Inverses

f(x) = 2x + 1 and g(x) = (x - 1)/2

Check f(g(x)):

f(g(x)) = f((x - 1)/2)
        = 2((x - 1)/2) + 1
        = (x - 1) + 1
        = x ✓

Check g(f(x)):

g(f(x)) = g(2x + 1)
        = ((2x + 1) - 1)/2
        = 2x/2
        = x ✓

Both equal x: They are inverses!

Domain and Range of Inverses

Key relationship:

  • Domain of f = Range of f⁻¹
  • Range of f = Domain of f⁻¹

Example: Domain and Range

f(x) = √x

  • Domain of f: x ≥ 0
  • Range of f: y ≥ 0

f⁻¹(x) =

  • Domain of f⁻¹: x ≥ 0 (same as range of f)
  • Range of f⁻¹: y ≥ 0 (same as domain of f)

Graphing Inverses

Graph of f⁻¹ is reflection of f over line y = x

To graph inverse:

  1. Graph original function
  2. Draw line y = x
  3. Reflect each point over y = x

Point (a, b) on f → Point (b, a) on f⁻¹

Example: Points on Inverse

If f contains (2, 5), then f⁻¹ contains (5, 2)

If f contains (-1, 3), then f⁻¹ contains (3, -1)

One-to-One Functions

One-to-one: Each output comes from exactly one input

Only one-to-one functions have inverses

Horizontal Line Test: If any horizontal line crosses graph more than once, not one-to-one

Example: Not One-to-One

f(x) = (all x-values)

  • f(2) = 4 and f(-2) = 4
  • Two inputs give same output
  • Not one-to-one, no inverse (without restriction)

Real-World Applications

Temperature conversion: F = (9/5)C + 32 and C = (5/9)(F - 32)

Currency exchange: Convert dollars to euros and back

Encoding/Decoding: Cryptography uses inverse functions

Physics: Converting between units (distance, speed, time)

Example: Temperature Conversion

Fahrenheit to Celsius:

C = (5/9)(F - 32)

This is the inverse of:

F = (9/5)C + 32

Verify at freezing point:

  • F = 32: C = (5/9)(32 - 32) = 0 ✓
  • C = 0: F = (9/5)(0) + 32 = 32 ✓

Special Compositions with Inverses

f(f⁻¹(x)) = x always (where defined)

f⁻¹(f(x)) = x always (where defined)

Example: Using Inverse Property

If f(x) = 3x - 7, find f⁻¹(f(10))

Using property:

f⁻¹(f(10)) = 10

No calculation needed!

Practice

If f(x) = 2x and g(x) = x + 3, find f(g(5))

Find the inverse of f(x) = 4x - 8

If f and g are inverses and f(3) = 7, what is g(7)?

Which property verifies inverses: f(x) = 2x + 1 and g(x) = (x-1)/2?