Definition · CompositionGiven functions f and g, the composite f ∘ g is defined by (f ∘ g)(x) = f(g(x)). Its domain is the set of inputs x in the domain of g for which g(x) lies in the domain of f. The symbol is read "f circle g" or "f after g".
"After" is the reading worth adopting, because it says the order out loud. f ∘ g is f after g: g happens, then f happens to the result. The alternative reading, "f of g", is also correct but is easier to say without thinking about which one moves first.
Computing a composite
Substitution again, exactly as in “Function Notation”, with a whole function in the slot. Take f(x) = 2x + 3 and g(x) = x − 4.
(f o g)(x) = f(g(x)) = f(x - 4)
= 2(x - 4) + 3
= 2x - 8 + 3 = 2x - 5
(g o f)(x) = g(f(x)) = g(2x + 3)
= (2x + 3) - 4
= 2x - 1
at x = 2 g(2) = -2, f(-2) = -1 (f o g)(2) = -1
f(2) = 7, g(7) = 3 (g o f)(2) = 3
Both composites are lines and they are still different functions. The check at x = 2 is worth doing every time a composite is built: evaluate step by step through the two functions, then evaluate the combined formula, and confirm they agree. −1 against −1 catches an order or substitution error immediately.
The domain of a composite
Two conditions, applied in order. The input must be legal for the inner function, and the inner function's output must be legal for the outer one.
f(x) = sqrt(x) g(x) = x - 5
(f o g)(x) = sqrt(x - 5) need x - 5 >= 0 domain [5, inf)
(g o f)(x) = sqrt(x) - 5 need x >= 0 domain [0, inf)
at x = 9: sqrt(9 - 5) = 2 sqrt(9) - 5 = -2
Same two functions, two different domains, two different outputs. In the first, the subtraction happens before the root, so the root restricts which inputs survive. In the second the root goes first and the subtraction cannot cause a failure, so only the root's own condition applies.
The trap: simplifying before finding the domain
Take f(x) = x² and g(x) = √x. The composite simplifies to a formula whose appearance has forgotten the inner function's domain.
(f o g)(x) = f(sqrt(x)) = (sqrt(x))^2 = x
stage 1: g(x) = sqrt(x) needs x >= 0
stage 2: f accepts every output from g
domain of f o g: [0, inf), even though the final formula is x
the other order: (g o f)(x) = sqrt(x^2) = |x|, domain (-inf, inf)
The simplified formula x accepts negative inputs, but the composite does not: g(−1) never produces a real number, so f is never reached. This needs no cancellation or rational-function technique. It follows directly from the two stages: find the domain before simplifying, and carry it beside the simplified rule.