Unit 1 · Chapter 1.4

1.4Composition of Functions

Form composite functions (f∘g)(x) = f(g(x)), evaluate compositions algebraically and from tables, and determine the domain of a composite function.

Composition of functions is how complex processes are built from simpler ones. The chain rule in calculus — one of the most used differentiation rules — is entirely based on function composition.

Essential Question

How does composing two functions create a new function, and why does the order in which we apply them matter?

Lesson Overview

Composition of functions means applying one function to the output of another. The notation (f∘g)(x) means "apply g first, then apply f to the result." In other words, (f∘g)(x) = f(g(x)). The function g is called the inner function and f is the outer function. Order matters: f∘g and g∘f are generally different functions. To find the domain of a composite function, you need two conditions: x must be in the domain of g, AND g(x) must be in the domain of f. Any x that violates either condition must be excluded.

Composition Notation

(f ∘ g)(x) = f(g(x))

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

(g ∘ f)(x) = g(f(x))

Read: "g composed with f of x" — different from f∘g!

Domain Rule

Domain of (f∘g) = all x such that:
① x is in the domain of g
② g(x) is in the domain of f
Both conditions must hold simultaneously.

Composition as a Pipeline: (f ∘ g)(x) = f(g(x))

Step 1 — Inner function g

Apply g to x first. The output g(x) becomes the input for f.

Step 2 — Outer function f

Apply f to g(x). Substitute g(x) everywhere you see x in f.

Result

(f∘g)(x) = f(g(x)). Order matters — f∘g ≠ g∘f in general.

Domain of a Composite Function

Worked Examples

Example 1

Let f(x) = 2x + 1 and g(x) = x². Find (f∘g)(x) and (g∘f)(x).

(f∘g)(x) = f(g(x)) = f(x²) — substitute g(x) = x² into f.

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

(g∘f)(x) = g(f(x)) = g(2x + 1) — substitute f(x) = 2x + 1 into g.

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

Answer:(f∘g)(x) = 2x² + 1 and (g∘f)(x) = 4x² + 4x + 1. These are different, confirming that composition is not commutative.
Example 2

Let f(x) = √x and g(x) = x − 4. Find (f∘g)(x) and its domain.

(f∘g)(x) = f(g(x)) = f(x − 4) = √(x − 4)

Domain condition 1: x must be in the domain of g. g(x) = x − 4 is defined for all real numbers.

Domain condition 2: g(x) must be in the domain of f. f requires its input ≥ 0, so x − 4 ≥ 0 → x ≥ 4.

Combining: domain is [4, ∞).

Answer:(f∘g)(x) = √(x − 4), domain [4, ∞).
Example 3

Use the table to evaluate (f∘g)(2) and (g∘f)(3).\nx: 1, 2, 3, 4 | f(x): 5, 3, 1, 7 | g(x): 2, 4, 1, 3

(f∘g)(2): first find g(2) = 4, then find f(4) = 7.

(f∘g)(2) = f(g(2)) = f(4) = 7

(g∘f)(3): first find f(3) = 1, then find g(1) = 2.

(g∘f)(3) = g(f(3)) = g(1) = 2

Answer:(f∘g)(2) = 7 and (g∘f)(3) = 2.
Example 4

Let h(x) = (3x + 2)⁴. Decompose h into f and g so that h(x) = (f∘g)(x).

Look for an inner expression that is substituted into an outer function.

The inner expression is 3x + 2, so let g(x) = 3x + 2.

The outer operation is raising to the 4th power, so let f(x) = x⁴.

Check: (f∘g)(x) = f(g(x)) = f(3x + 2) = (3x + 2)⁴ = h(x). ✓

Answer:g(x) = 3x + 2 (inner) and f(x) = x⁴ (outer). This decomposition is the key step in applying the chain rule in calculus.
Example 5

Let f(x) = 1/(x − 2) and g(x) = x + 5. Find (f∘g)(x) and its domain.

(f∘g)(x) = f(g(x)) = f(x + 5) = 1/((x + 5) − 2) = 1/(x + 3)

Domain condition 1: g(x) = x + 5 is defined for all real x.

Domain condition 2: f requires its input ≠ 2, so x + 5 ≠ 2 → x ≠ −3.

Domain: all real numbers except x = −3, written (−∞, −3) ∪ (−3, ∞).

Answer:(f∘g)(x) = 1/(x + 3), domain (−∞, −3) ∪ (−3, ∞).

Guided Practice

Guided Problem 1

Let f(x) = x + 3 and g(x) = x². Find (f∘g)(x) and (g∘f)(x). Are they equal?

Hint: (f∘g)(x) = f(g(x)) = f(x²). (g∘f)(x) = g(f(x)) = g(x+3). Substitute carefully.

Guided Problem 2

Let f(x) = √x and g(x) = 2x + 8. Find (f∘g)(x) and state its domain.

Hint: (f∘g)(x) = f(g(x)) = √(2x + 8). For the domain, set 2x + 8 ≥ 0 and solve.

Guided Problem 3

Use the table: x: 1,2,3,4 | f(x): 4,1,3,2 | g(x): 3,4,2,1. Evaluate (f∘g)(1) and (g∘f)(2).

Hint: (f∘g)(1) = f(g(1)). Look up g(1) first, then use that value to look up f. Same process for (g∘f)(2).

Guided Problem 4

Decompose h(x) = √(x² − 9) into f and g so that h = f∘g.

Hint: What is the inner expression being substituted? That is g(x). What operation is applied to it? That is f(x).

Guided Problem 5

Let f(x) = 1/x and g(x) = x − 3. Find (f∘g)(x) and state any values excluded from the domain.

Hint: (f∘g)(x) = f(x − 3) = 1/(x − 3). What value of x makes the denominator zero?

Key Vocabulary

Composition of Functions

The operation (f∘g)(x) = f(g(x)). Apply the inner function g first, then apply the outer function f to the result.

Inner Function

In (f∘g)(x) = f(g(x)), the function g is the inner function — it is applied first to the input x.

Outer Function

In (f∘g)(x) = f(g(x)), the function f is the outer function — it is applied second, to the output of g.

Decomposition

Writing a complex function h(x) as a composition h = f∘g by identifying the inner and outer functions. Essential for the chain rule in calculus.

Domain of a Composite

All x values where both conditions hold: x is in the domain of g, AND g(x) is in the domain of f.

Commutative Property

Composition is NOT commutative: f∘g ≠ g∘f in general. Order of application always matters.

Interactive Practice — 5 Questions

1

If f(x) = x + 2 and g(x) = 3x, what is (f∘g)(x)?

2

Given f(x) = x² and g(x) = x + 1, what is (g∘f)(x)?

3

For (f∘g)(x) = f(g(x)), which function is applied first?

4

Let f(x) = √x and g(x) = x − 9. What is the domain of (f∘g)(x)?

5

h(x) = (5x − 3)². If h = f∘g, which is the best choice for g(x)?

Independent Practice

Independent Practice

1

Let f(x) = 2x − 5 and g(x) = x² + 1. Find (f∘g)(x) and (g∘f)(x). Show that they are not equal.

2

Let f(x) = √(x + 1) and g(x) = 3x − 6. Find (f∘g)(x) and state its domain.

3

Use the table: x: 1,2,3,4,5 | f(x): 3,5,1,4,2 | g(x): 4,1,5,2,3. Evaluate (f∘g)(3), (g∘f)(2), and (f∘f)(1).

4

Decompose h(x) = (x² + 4)³ into f and g so that h = f∘g. Verify your answer.

5

Let f(x) = 1/(x + 1) and g(x) = x². Find (f∘g)(x) and state any values excluded from the domain.

⚠️

Common Mistakes

Applying f first in (f∘g)(x) — writing f(g(x)) as 'apply f then g'.

(f∘g)(x) = f(g(x)) means apply g FIRST (inner), then f (outer). The notation reads right-to-left for application order.

Assuming f∘g = g∘f — treating composition as commutative.

Composition is NOT commutative. Always check: (f∘g)(x) and (g∘f)(x) are usually different functions.

Forgetting to check both domain conditions for a composite function.

Domain of f∘g requires: (1) x in domain of g, AND (2) g(x) in domain of f. Both must hold.

Substituting incorrectly — e.g., f(g(x)) = f(x) · g(x) (treating composition as multiplication).

Composition means substitution: replace every x in f with the entire expression g(x). It is NOT multiplication.

💡

Math Tips

📌

(f∘g)(x) = f(g(x)): g goes in first, f wraps around it. Think of it as a pipeline — input → g → f → output.

📌

To find the domain of f∘g: set g(x) in the domain of f and solve. Also check the domain of g itself.

📌

Decomposition tip: the inner function g(x) is usually the expression inside parentheses, under a radical, or in a denominator.

📌

Composition is associative: (f∘g)∘h = f∘(g∘h). But it is NOT commutative: f∘g ≠ g∘f in general.

📌

In calculus, the chain rule says d/dx[f(g(x))] = f'(g(x)) · g'(x). Recognizing f and g in a composition is the first step.