Functions
Function composition
ALEKS placement
(f ∘ g)(x) means run g first, then feed its output into f.
Try it here
Write one line at a time, as on paper.
If f(x) = x − 2 and g(x) = 2x, find f(g(-4)).
Goal: The answer is a single number.
- givenf(x) = x-2,\quad g(x) = 2x
What this covers
- Work from the inside out.
- Substitute the entire inner expression into every x of the outer rule.
- Simplify only after the substitution is complete.
- Order matters: f(g(x)) rarely equals g(f(x)).
- Keep inputs that the inner function accepts and whose outputs the outer function also accepts.
Worked example
If f(x) = 2x + 1 and g(x) = x², find f(g(3)).
- g(3)=32The inner function runs first. Replace its input with three before squaring.
- g(3)=9Square the input to find the inner function's output.
- f(g(3))=f(9)Replace the whole inner function value with its output, nine.
- f(9)=2⋅9+1Use nine as the input to the outer rule: double that input, then add one.
- f(9)=19Evaluate the outer rule to finish the composition.
For f(x) = 2x + 1 and g(x) = x², compare f(g(x)) with g(f(x)).
- f(g(x))=2(x2)+1For f after g, put the output x² into the input slot of f.
- f(g(x))=2x2+1The outer rule doubles the whole inner output, then adds one.
- g(f(x))=(2x+1)2For g after f, square the entire output of f, not just its first term.
- g(f(x))=4x2+4x+1Expanding the binomial shows why reversing the order changes the result.
A common mistake
From g(3)=9
“f(g(3)) means put g(3) into f, not multiply f(3) by g(3). g(3) = 9, so f(g(3)) = f(9) = 2 · 9 + 1 = 19. Multiplying gives f(3) · g(3) = 7 · 9 = 63.”
Practice composition free
No account or email needed.
Where this fits
Before this
After this
More in Functions
Guides
Common questions
Function composition: what is the main idea?
(f ∘ g)(x) means run g first, then feed its output into f. Work from the inside out. Substitute the entire inner expression into every x of the outer rule. Simplify only after the substitution is complete. Order matters: f(g(x)) rarely equals g(f(x)). Keep inputs that the inner function accepts and whose outputs the outer function also accepts.
Function composition: what is the most common mistake?
f(g(x)) is not f(x)·g(x). Composition substitutes; it does not multiply. For example, Lemma flags this one: f(g(3)) means put g(3) into f, not multiply f(3) by g(3). g(3) = 9, so f(g(3)) = f(9) = 2 · 9 + 1 = 19. Multiplying gives f(3) · g(3) = 7 · 9 = 63.
Function composition: ALEKS, TEAS or both?
ALEKS placement only; it is not part of Lemma’s TEAS course. Lemma’s ALEKS plan includes it from a 61 target score upward.