Composite functions
In fg(x), apply g first and then apply f.
Read the lesson: Composite functions
Composition substitutes an entire output into the next function. Brackets keep the substituted expression intact. In general fg and gf differ; composition is not ordinary multiplication.
The domain requires x to belong to g’s domain and g(x) to belong to f’s domain. A simplified formula may conceal one of these requirements. Track the restrictions through the two operations before simplifying.
Worked example
Given f(x) = x² + 1 and g(x) = 2x − 3, find fg(x).
- Start with g(x) = 2x − 3.
- Substitute into f: f(g(x)) = (2x − 3)² + 1.
- Expand 4x² − 12x + 9 + 1.
Answer: 4x² − 12x + 10
Revise first: Expanding and factorising.
Check the inner output before using the outer rule
In fg(x), g acts first. The input must belong to the domain of g, and its output must belong to the domain of f. A simplified formula can conceal a restriction inherited from either step. State the convention for composition if the notation could be misunderstood.
A logarithm after a quadratic
Let and . Then , requiring x²−1 > 0. Its domain is x < −1 or x > 1.
Reversing the order
instead has domain x > 0. At x = e it equals zero. At x = 0 neither order is available, for different reasons.
A mistake worth checking
The expressions fg and gf generally differ. Matching the same two function names does not make the order interchangeable.
For and , is fg the identity on all real numbers?
Its rule simplifies to x, but both stages require x ≠ 0. It is the identity only on the nonzero reals.
Try this before opening the working
For and , give the domains of fg and gf.
Compare your reasoning
fg(x) = √(2−x) needs x ≤ 2. gf(x) = 2−√x needs x ≥ 0.
Practise composite functions
Course mapping
These specification references show where the topic occurs. The questions cover only some parts of each topic.
- 8365 · core · 2.4: Composite functions
- 9FM0 · core · Assumed A-level Mathematics knowledge: Composite functions
- 7367 · core · Assumed A-level Mathematics knowledge: Composite functions
- H245 · core · Assumed A-level Mathematics knowledge: Composite functions
- H645 · core · Assumed A-level Mathematics knowledge: Composite functions
- 7M20 · core · A2.3: Composite functions
Next practice: Domain and range, Inverse functions.