---
title: "What Is a Composite Function?"
url: https://www.learningloftinstitute.com/glossary/composite-function
source: Learning Loft Institute
language: en
updated: 2026-08-21
section: "Glossary › What Is a Composite Function?"
---
# What Is a Composite Function?
> **Answer.** A composite function applies one function to the result of another. In fg(x) the function closest to the x acts first, so g then f. With f(x) = 2x + 1 and g(x) = x², fg(2) = f(4) = 9 while gf(2) = g(5) = 25. Order changes the answer.
## Key facts
| | |
| --- | --- |
| Definition | A function formed by feeding the output of one function into another, written fg(x), which means apply g first and then f. |
| Where students meet it | Grade 10 mathematics, on GCSE Higher tier and on the Extended papers of Cambridge IGCSE 0580, usually in the same question as inverse functions. |
| Also known as | Function of a function |
## Work from the inside out
fg(x) is shorthand for f(g(x)), and once you write the longer version the order stops being a matter of memory. The x is inside g's brackets, so g gets hold of it first, and f is left waiting outside for the result.
With numbers this is comfortable. With algebra the same rule produces a general expression: fg(x) means substitute x² wherever x appears in f, giving 2x² + 1, while gf(x) means substitute 2x + 1 into g, giving (2x + 1)², which expands to 4x² + 4x + 1. Checking either against the numerical answer is a good habit — substituting x = 2 into 2x² + 1 gives 9, as it should.
## The order is the whole question
Papers set fg and gf on the same pair of functions deliberately, because the difference between them is the thing being tested. Multiplication does not care about order and students carry that expectation into composition, where it does not hold.
It would be equally wrong to conclude that the two are always different. Compose a function with its own inverse and the order stops mattering: both ff⁻¹(x) and f⁻¹f(x) return x, which is what being an inverse means. The honest statement is that composition is not guaranteed to be reversible, so you check rather than assume.
## The notation you will meet
British papers write fg(x). International and American texts often write f∘g(x), with a small raised circle, and some write f(g(x)) in full. All three mean the same thing and all three have g acting first, so the reading rule transfers unchanged.
Two further pieces of shorthand are worth recognising. ff(x) means apply f twice, and it is sometimes written f²(x) — which does not mean [f(x)]², a genuinely different quantity. And composite functions inherit restrictions: fg(x) can only accept an input that g accepts and whose output f will then accept, which is why a question may ask for the domain of a composite separately.
## Questions
### Which function comes first in fg(x)?
g does. The notation is short for f(g(x)), and the function written closest to the x is the one that gets the input first. Reading left to right and applying f first is the single most common error in this topic, and it usually produces an answer that is wrong rather than nearly right.
### Is fg(x) the same as f(x) multiplied by g(x)?
No. fg(x) means the output of g fed into f. With f(x) = 2x + 1 and g(x) = x², fg(2) = 9, while f(2) × g(2) = 5 × 4 = 20. The letters sitting next to each other look like multiplication, which is why the longer form f(g(x)) is worth writing out.
### What does ff(x) mean?
Apply f, then apply f again to the result. For f(x) = 2x + 1, ff(3) = f(7) = 15. Written algebraically, ff(x) = 2(2x + 1) + 1 = 4x + 3. Some books write this as f²(x), which is not the same as squaring the output — that would be [f(x)]².
### How do you find fg(x) as an expression?
Substitute the whole of g's rule wherever x appears in f. With f(x) = 2x + 1 and g(x) = x², replacing x with x² gives fg(x) = 2x² + 1. Keeping g's expression in brackets while you substitute prevents the errors that appear when f involves squaring or subtraction.
## Sources
1. Cambridge IGCSE Mathematics (0580) — Cambridge Assessment International Education. https://www.cambridgeinternational.org/programmes-and-qualifications/cambridge-igcse-mathematics-0580/ (accessed 2026-08-21)
---
Published by Learning Loft Institute, Lahore, Pakistan. Canonical HTML: https://www.learningloftinstitute.com/glossary/composite-function. Site brief for models: https://www.learningloftinstitute.com/llms.txt.
