Composite functions
Feed the output of one machine straight into a second machine and you get a new machine — that is a composite function, the algebraic idea of "a function of a function." In ISC Class 12, composite functions sit inside Unit 1, Relations and Functions, right after one-one/onto classification and invertibility. They matter for two concrete reasons. First, forming and finding its domain is a standard Section-A skill in its own right. Second, composition is the tool used to check that a guessed formula really is the inverse of a given function: you compose it both ways and see whether you land back on the identity function. This article builds the definition, the domain rule, the order-matters warning, and the inverse-checking method — all fully algebraic, with no calculus needed until the chain rule appears later.
The composite chains two functions so that acts first and acts on its output, is defined only where lands inside the domain of , and generally satisfies .
The core idea
Composition takes two functions and glues them into one, in a fixed order.
Definition. Given and , the composite function is
where: is the inner function applied first, is the outer function applied to 's result, and are the domain, intermediate set, and final codomain. Reading the symbol right to left matches the order of operations: in , acts on before acts on .
Domain of a composite. Even when and each look defined "everywhere," the glued function can fail somewhere in between, because must be a legal input to :
where: the right-hand condition is checked in two stages — first must be allowed into at all, and second the output must be allowed into . Dropping the second check is the single most common domain error in this topic.
Order matters. In general ; composition is not commutative, and frequently only one of the two orders is even defined (if the output set of one function does not match the input set the other expects). Composition is, however, associative: , so a three-function chain can be written unambiguously as with no brackets needed.
Composition and inverses. If is a bijection with inverse , composing with its own inverse — in either order — collapses back to doing nothing at all:
where: the left identity undoes then , the right identity undoes then , and both must hold simultaneously for to be a genuine inverse. This pair of identities is exactly how an algebraic guess for an inverse gets verified.
The definition says nothing by itself about where the composite is defined — that requires tracking two domains at once, since a value that is legal for can still be illegal for once it becomes 's input, and this two-stage check is the step students skip most often. Work it out for functions with genuine restrictions rather than the all-real-numbers case, and the reasoning generalises to any pair of functions.
Step 1. Fix the functions and their own domains. Let , so needs , giving domain. Let , so needs , giving domain.
Step 2. Form the composite algebraically. Substituting into : . This expression is the candidate rule, but its domain is not simply "domain" — it must respect 's restriction too.
Step 3. Apply the two-stage domain check. First, must be a legal input to , so . Second, the output must be a legal input to , meaning . Squaring, , so .
Step 4. Combine both conditions into the composite's domain. domain — every works except , where the denominator of would vanish. This excluded point is invisible if you only look at 's domain ; it only appears once you trace what outputs through 's restriction, which is the entire point of the two-stage rule.
Worked example
Let and , both with domain . Find and , evaluate each at , and confirm the two orders give different functions.
Step 1. Form by substituting into : .
Step 2. Form by substituting into : .
Step 3. Evaluate both at : , and .
Step 4. Compare. Since , , confirming algebraically that — order genuinely matters here, not just in principle.
Competitive stretch
Now use composition to check an inverse: let and the candidate inverse . Compute , and . Both compositions return , so is confirmed — this two-way check is the standard algebraic method for verifying an inverse.
Common traps
- Substituting in the wrong order: means " first, then ," i.e. — many students compute instead when asked for .
- Ignoring the second domain check: a composite can be undefined for some even when and each look fine individually — always verify lands inside domain, not just that lands inside domain.
- Assuming by default — equality is the rare exception, confirmed only by direct computation, never assumed.
- Checking only one of or and declaring — a rigorous verification needs both directions checked.
Ask the tutor: If forming , nailing its domain, or verifying an inverse via composition is tripping you up, ask the AI tutor for a fresh pair of functions to practise on.
Why do we need to check the domain of g composed with f separately, isn't the domain of f enough?
Because becomes the input to , and may reject values that happily produces. A classic case: is fine for all , but if has a denominator that vanishes at one particular output value of , that single must be excluded from the composite even though it was perfectly legal for alone. Always trace the output of through 's restrictions before declaring the composite's domain.
How is checking an inverse by composition different from just swapping x and y to find the inverse?
Swapping and (and solving) is how you find a candidate formula for ; composing is how you prove that candidate is correct. If for every in the domain and for every in the range, both identities hold and is confirmed as . Skipping this check risks accepting an algebra slip as if it were a verified inverse — examiners specifically reward showing both compositions.
Why does order matter in composition when it does not matter in ordinary multiplication?
Because and generally build entirely different rules, not just reorder the same operation. Multiplication combines two numbers symmetrically, but composition feeds the entire output of one function into another as a fresh input, and squaring-then-doubling is rarely the same as doubling-then-squaring. The worked example above shows this concretely: while for the same two functions, so the two orders are simply different objects.