Composite Functions
Evaluating a Composite Function at a Point
If $f(x) = 2x + 1$ and $g(x) = x^2$, find $(f \circ g)(3)$.
Understand the notation: $(f \circ g)(3) = f(g(3))$ = First find $g(3)$, then apply $f$
Evaluate the inner function: $g(3) = 3^2 = 9$ = $g(3) = 9$
Substitute into outer function: $f(g(3)) = f(9) = 2(9) + 1$ = $f(9) = 18 + 1$
Calculate final answer: $18 + 1 = 19$ = $(f \circ g)(3) = 19$
Answer: $(f \circ g)(3) = 19$
Finding a Composite Function Formula
If $f(x) = x - 4$ and $g(x) = 3x$, find $(f \circ g)(x)$.
Write the composition: $(f \circ g)(x) = f(g(x))$ = Replace $x$ in $f$ with $g(x)$
Substitute $g(x)$ into $f$: $f(g(x)) = f(3x)$ = The input to $f$ is $3x$
Apply the rule of $f$: $f(3x) = (3x) - 4$ = Replace $x$ with $3x$ in $f(x) = x - 4$
Simplify: $3x - 4$ = $(f \circ g)(x) = 3x - 4$
Answer: $(f \circ g)(x) = 3x - 4$
Comparing Order of Composition
If $f(x) = x^2$ and $g(x) = x + 5$, find both $(f \circ g)(x)$ and $(g \circ f)(x)$. Are they equal?
Find $(f \circ g)(x)$: $f(g(x)) = f(x + 5) = (x + 5)^2$ = $(f \circ g)(x) = x^2 + 10x + 25$
Find $(g \circ f)(x)$: $g(f(x)) = g(x^2) = x^2 + 5$ = $(g \circ f)(x) = x^2 + 5$
Compare the results: $x^2 + 10x + 25 \neq x^2 + 5$ = The compositions are NOT equal
Verify with a number: At $x = 1$: $(f \circ g)(1) = 36$, $(g \circ f)(1) = 6$ = $36 \neq 6$ confirms they're different
Answer: $(f \circ g)(x) = x^2 + 10x + 25$ and $(g \circ f)(x) = x^2 + 5$. They are NOT equal.
Composition with Three Functions
If $f(x) = x + 1$, $g(x) = 2x$, and $h(x) = x^2$, find $(f \circ g \circ h)(2)$.
Understand the order: $(f \circ g \circ h)(2) = f(g(h(2)))$ = Start with innermost: $h(2)$
Evaluate $h(2)$: $h(2) = 2^2 = 4$ = $h(2) = 4$
Evaluate $g(4)$: $g(4) = 2(4) = 8$ = $g(h(2)) = 8$
Evaluate $f(8)$: $f(8) = 8 + 1 = 9$ = $(f \circ g \circ h)(2) = 9$
Answer: $(f \circ g \circ h)(2) = 9$
Mistake: Confusing $(f \circ g)(x)$ with $f(x) \cdot g(x)$
Why: The circle notation $\circ$ means composition, not multiplication. $(f \circ g)(x) = f(g(x))$, which substitutes $g(x)$ into $f$.
Correct: $(f \circ g)(x)$ means apply $g$ first, then $f$. Multiplication $f(x) \cdot g(x)$ is a completely different operation.
Mistake: Getting the order backwards
Why: In $(f \circ g)(x)$, you might think $f$ comes first because it appears first.
Correct: Read inside out: $(f \circ g)(x) = f(g(x))$ means $g$ is applied first, then $f$.
Mistake: Assuming $(f \circ g)(x) = (g \circ f)(x)$
Why: Unlike multiplication, composition is NOT commutative in general.
Correct: Always check both orders. Usually $(f \circ g)(x) \neq (g \circ f)(x)$.
Unit Conversion Chains
Converting between measurement units often requires composing multiple conversion functions.
To convert miles to meters: first convert miles to kilometers with $g(x) = 1.609x$, then kilometers to meters with $f(x) = 1000x$. So $(f \circ g)(x) = 1609x$ meters.
Computer Programming
Nested function calls in programming are composite functions.
In Python, `len(str(n))` counts the digits of a number. Here $g(n) = \text{str}(n)$ converts to string, and $f(s) = \text{len}(s)$ counts characters.
A composite function $(f \circ g)(x) = f(g(x))$ applies $g$ first, then $f$ to the result
Order matters: $(f \circ g)(x)$ is usually NOT equal to $(g \circ f)(x)$
To evaluate, work from the inside out: first compute the inner function
Composition is different from multiplication: $f \circ g \neq f \cdot g$
Q: How do I remember which function to apply first?
A: Think "inside out." In $f(g(x))$, $g$ is inside, so it's applied first. Then $f$ is applied to that result. The function closest to $x$ goes first.
Q: Can any two functions be composed?
A: The range (outputs) of the inner function must be in the domain (allowed inputs) of the outer function. For example, if $f(x) = \sqrt{x}$ and $g(x) = x - 10$, then $f(g(5))$ is undefined because $g(5) = -5$ and we can't take the square root of a negative number.
Q: Is there a shortcut to find composite functions?
A: Yes! Simply substitute the entire expression for $g(x)$ wherever you see $x$ in $f(x)$. Then simplify the result.
Composite Functions
1 / 12
Composite Functions
Learn how to combine two functions to create a new function using composition.