Composition of
Functions
Learn how to combine two functions into one by feeding the output of one function as the input of another: the powerful idea behind \( (f \circ g)(x) \).
What Is Function Composition?
Function composition is the process of applying one function to the result of another. If you have two functions \( f \) and \( g \), the composition \( (f \circ g)(x) \) means: first evaluate \( g(x) \), then plug that result into \( f \).
Think of it like a pipeline: the input \( x \) flows through \( g \) first, and its output flows into \( f \). The final output is the composition.
The Function Machine Model
Why Does Composition Matter?
The Formal Definition
Domain of \( f \circ g \)
Composition vs Multiplication
| Composition \( (f \circ g)(x) \) | Multiplication \( (f \cdot g)(x) \) | |
|---|---|---|
| Meaning | \( f\!\bigl(g(x)\bigr) \) | \( f(x) \cdot g(x) \) |
| Operation | Substitute \( g(x) \) into \( f \) | Multiply the two outputs |
| Commutative? | No: \( f \circ g \neq g \circ f \) in general | Yes: \( f \cdot g = g \cdot f \) |
| Example | \( f(x)=x^2,\; g(x)=x+1 \): result is \( (x+1)^2 \) | Result is \( x^2(x+1) \) |
Order Matters
Composition is not commutative. Let's see why with \( f(x) = x^2 \) and \( g(x) = x + 3 \):
= \( x^2 + 6x + 9 \)
How to Evaluate a Composition
Example 1: Linear + Quadratic
Let \( f(x) = 2x + 1 \) and \( g(x) = x^2 - 4 \). Find \( (f \circ g)(x) \).
Example 2: Evaluating at a Point
Using \( f(x) = 3x - 5 \) and \( g(x) = x^2 + 2 \), evaluate \( (f \circ g)(3) \).
Example 3: Domain Restriction
Let \( f(x) = \sqrt{x} \) and \( g(x) = 5 - x \). Find \( (f \circ g)(x) \) and its domain.
Example 4: Composition from a Table
| \( x \) | \( f(x) \) | \( g(x) \) |
|---|---|---|
| 1 | 3 | 2 |
| 2 | 5 | 4 |
| 3 | 1 | 1 |
| 4 | 2 | 3 |
Find \( (f \circ g)(2) \): Step 1: \( g(2) = 4 \). Step 2: \( f(4) = 2 \). So \( (f \circ g)(2) = \) 2.
Decomposing a Composite Function
Sometimes you need to work backwards: given a complex function \( h(x) \), find simpler \( f \) and \( g \) so that \( h = f \circ g \). This is called decomposition.
(the "inside" expression)
(the operation applied to it)
Common Mistakes to Avoid
Summary of Key Ideas
| Concept | Details |
|---|---|
| Notation | \( (f \circ g)(x) = f(g(x)) \) |
| Read as | "\( f \) of \( g \) of \( x \)" |
| Inner function | \( g \): evaluated first |
| Outer function | \( f \): applied to \( g(x) \) |
| Commutative? | No: \( f \circ g \neq g \circ f \) in general |
| Domain rule | \( x \in \text{dom}(g) \) and \( g(x) \in \text{dom}(f) \) |
| Decomposition | Break \( h(x) \) into outer \( f \) and inner \( g \) |
Question 1 of 5
If \( f(x) = 2x + 3 \) and \( g(x) = x^2 \), what is \( (f \circ g)(4) \)?
Question 2 of 5
If \( f(x) = x - 1 \) and \( g(x) = 3x + 2 \), what is \( (f \circ g)(x) \)?
Question 3 of 5
What is the domain of \( (f \circ g)(x) \) if \( f(x) = \sqrt{x} \) and \( g(x) = x - 7 \)?
Question 4 of 5
If \( h(x) = (2x - 5)^3 \), which decomposition gives \( h = f \circ g \)?
Question 5 of 5
Given the table below, what is \( (g \circ f)(2) \)?
| \( x \) | \( f(x) \) | \( g(x) \) |
|---|---|---|
| 1 | 4 | 3 |
| 2 | 1 | 5 |
| 3 | 2 | 1 |
| 4 | 5 | 2 |
| 5 | 3 | 4 |