A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Composition of Functions

College Depth 69 in the knowledge graph I know this Set as goal
8,363topics build on this
302prerequisites beneath it
See this on the map →
Function Notation ReviewStep FunctionsAdjoint FunctorsCategories and Morphisms+10 more
functions composition substitution

Core Idea

The composition of f and g, written (f o g)(x) = f(g(x)), means applying g first, then applying f to the result. Composition is not commutative: f(g(x)) is generally different from g(f(x)). The domain of f o g is all x in the domain of g such that g(x) is in the domain of f. Composition is the foundation for understanding inverse functions, the chain rule in calculus, and function decomposition.

How It's Best Learned

Start by evaluating compositions at specific values: if f(x) = x2 and g(x) = x+1, find f(g(3)) step by step. Then find the composition formula f(g(x)). Practice both f(g(x)) and g(f(x)) to demonstrate non-commutativity. Discuss domain restrictions. Decompose complex functions into compositions of simpler ones.

Common Misconceptions

Explainer

Function notation like f(x) means "apply rule f to input x and get an output." Composition of functions takes this one step further: the output of one function becomes the input of another. When you write f(g(x)), you are chaining two rules together — g processes x first, then f processes whatever g produced.

A concrete example makes this tangible. Let g(x) = x + 1 (add one) and f(x) = x² (square). Then f(g(3)) means: first apply g to 3 — you get 4 — then apply f to 4 — you get 16. The notation tells you the order: the innermost function goes first. Always work from inside out. If you applied f first you would get f(3) = 9, then g(9) = 10, which is g(f(3)) — an entirely different computation.

This non-commutativity — f(g(x)) ≠ g(f(x)) in general — is the most important property to internalize. In arithmetic, 3 + 4 = 4 + 3 and 3 × 4 = 4 × 3. Function composition breaks this symmetry. Think of it like getting dressed: socks then shoes gives a very different result from shoes then socks, even though the individual steps are the same.

To find the composed formula f(g(x)) in general, substitute the entire expression for g(x) wherever x appears in f. With f(x) = 2x + 1 and g(x) = x², write f(g(x)) = 2(x²) + 1 = 2x² + 1. Notice that f(x) · g(x) = (2x+1)(x²) = 2x³ + x² — a completely different expression. Composition is substitution, not multiplication.

Composition is the hidden structure inside many formulas you will encounter. In calculus, the chain rule exists precisely to differentiate composed functions. When you see a complex expression like sin(x²) or e3x+1, you are looking at a composition — one function wrapped inside another. Learning to decompose and recompose functions is a foundational skill for everything that follows.

Practice Questions 3 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Making 10 as an Addition StrategyAddition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts Through 10Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineOpposites and Additive InversesAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesLiteral EquationsSlope-Intercept FormPoint-Slope FormWriting Linear EquationsParallel and Perpendicular Line SlopesGraphing Linear EquationsPiecewise FunctionsStep FunctionsComposition of Functions

Longest path: 70 steps · 302 total prerequisite topics

Prerequisites (2)

Leads To (12)