Mistake Master
Composition: which function goes first?
Composition chains two functions: the output of one becomes the input of the other. All the power, building complicated functions from simple parts, and all the danger, live in one question: which function acts first? The notation answers it precisely, and this topic makes that answer automatic.
§1
Inside acts first.
▸
The expression $f(g(x))$, also written $(f \circ g)(x)$, is read from the inside out: g acts on x first, and f acts on whatever g produced. The parentheses are the instruction: x is handed to g because x sits inside g's parentheses, and g's output is handed to f because $g(x)$ sits inside f's.
The circle notation trips readers because f is written first but acts second. Do not read left to right; read nearest-to-x first. In $(f \circ g)(x)$ the function touching x is g. If it helps, pronounce $f \circ g$ as "f after g."
§2
Composing from a table.
▸
Numeric composition is two lookups in the stated order. Suppose the table gives:
x: 1, 2, 3, 4 · f(x): 3, 1, 4, 2 · g(x): 2, 3, 4, 1
To find $f(g(2))$: first the inside, $g(2) = 3$. Then feed that output to f: $f(3) = 4$. So $f(g(2)) = 4$. Now reverse the order: $g(f(2))$ starts with $f(2) = 1$, then $g(1) = 2$. Different answer, same table. Write the intermediate value down every time; almost every composition error is a skipped middle step or the two lookups done in the wrong order.
§3
Composing formulas, and why order matters.
▸
With rules instead of tables, composition is substitution: $f(g(x))$ means "wherever f's rule says x, write in all of $g(x)$." For $f(x) = x^2$ and $g(x) = x + 3$:
- $f(g(x)) = (x + 3)^2$: add 3 first, then square.
- $g(f(x)) = x^2 + 3$: square first, then add 3.
At x = 2 these give 25 and 7. Composition does not commute: $f \circ g$ and $g \circ f$ are different functions except by coincidence. And keep composition separate from multiplication: $f(g(x))$ is not $f(x) \cdot g(x)$; nothing here is a product.
§4
The domain rides along.
▸
An input survives $f(g(x))$ only if it clears two gates: x must be in g's domain, and the output $g(x)$ must land in f's domain. For $f(x) = \sqrt{x}$ and $g(x) = x - 4$, the composition $f(g(x)) = \sqrt{x - 4}$ needs $x - 4 \ge 0$, so the domain is $x \ge 4$, not the $x \ge 0$ that f alone would suggest. The inner function repositions which inputs are legal.
§5
Taking compositions apart.
▸
Decomposition reverses the build: seeing $h(x) = (3x - 1)^5$ as $f(g(x))$ with inner $g(x) = 3x - 1$ and outer $f(x) = x^5$. The test is mental execution: what would you compute first if you plugged in a number? That first computation is the inner function.
One special part: the identity function $I(x) = x$ passes its input through unchanged, so $f(I(x)) = f(x)$ and $I(f(x)) = f(x)$ for every f. It is composition's do-nothing element, the way 0 is for addition and 1 is for multiplication, and it becomes the star of the next topic: a function composed with its inverse yields exactly this identity.
§6
Skill Check.
▸
Ten scenarios. Pick the chips that match your answer, then check. A scenario marks complete the first time every part is right. Progress saves on this device.