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 Functions→→Adjoint 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 Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Literal Equations → Slope-Intercept Form → Point-Slope Form → Writing Linear Equations → Parallel and Perpendicular Line Slopes → Graphing Linear Equations → Piecewise Functions → Step Functions → Composition of Functions

Longest path: 70 steps · 302 total prerequisite topics

Prerequisites (2)

Leads To (12)