SECTION 1
Historical Context & Motivation
Mathematics has always been about building complex ideas out of simpler pieces. Long before anyone wrote down the formal definition of function composition, mathematicians were already chaining processes together — converting units, then scaling results, then rounding to useful values. The idea of feeding the output of one function directly into another is so natural that it appears in almost every branch of mathematics and science.
The formal language of functions took centuries to develop. Early mathematicians worked with specific formulas and geometric constructions rather than the abstract concept of a function as a rule that maps inputs to outputs. As algebra matured, so did the need to express how two processes could be combined into a single, more powerful operation.
1694 • Leibniz Introduces 'Function'
1837 • Dirichlet's Modern Definition
1870s • Set Theory and Mappings
1930s • Composition in Abstract Algebra
Today • Modeling and Computing
The key question that function composition answers is this: when you have two separate processes, how do you combine them into a single process? Whether you're converting Celsius to Fahrenheit and then rounding, or modeling how a discount is applied after tax, composition gives you a clean, algebraic way to chain these steps together.
SECTION 2
Core Principles & Definitions
At its heart, function composition means applying one function to the result of another. If you have two functions, f and g, the composition (f ∘ g)(x) means you first evaluate g(x), then feed that result into f. The small circle symbol ∘ is read as "composed with" or simply "of." So f ∘ g is "f of g."
Notation
Order Matters
Domain Restrictions
Associativity
Identity Function
KEY TAKEAWAY
SECTION 3
Visual Explanation — The Composition Machine
Notice the critical detail: even though we write f first in (f ∘ g)(x), the function g actually acts on x first. You read the notation from right to left, just as you would evaluate f(g(x)) by starting from the innermost parentheses and working outward. This is one of the most common sources of mistakes in composition problems, so always ask yourself: which function acts first?
SECTION 4
Mathematical Framework
Let's formalize the definition and then explore the key algebraic skills you need for composition on the IB exam.
DEFINITION OF COMPOSITION
g is the inner function (applied first), and f is the outer function (applied second). The domain of f ∘ g consists of all x in the domain of g such that g(x) is in the domain of f.
FINDING THE COMPOSED EXPRESSION
Replace every x in the formula for f with the entire expression for g(x). This substitution technique is the core algebraic move.
NON-COMMUTATIVITY
Compare: (f ∘ g)(x) = 2x² + 1 but (g ∘ f)(x) = (2x + 1)² = 4x² + 4x + 1. These are clearly different, confirming that order matters.
DOMAIN OF A COMPOSITION
Start with all x-values that g can accept, then remove any for which g(x) falls outside the domain of f. For example, if f(x) = √x and g(x) = x − 5, then (f ∘ g)(x) = √(x − 5), and you need x − 5 ≥ 0, so x ≥ 5.
IB Exam Tip
SECTION 5
Modeling with Compositions
One of the most powerful applications of composition is modeling multi-step real-world processes. Whenever a quantity depends on a second quantity, which itself depends on a third, composition lets you express the entire chain as a single function. The IB syllabus at SL 2.9 specifically asks you to build and interpret such models.
This example illustrates a common IB pattern: you're given two functions that each model one step of a process, and you need to compose them to model the entire process. The key is identifying which variable links the two steps — here, the radius is the output of the first function and the input of the second. Whenever you see a chain of dependencies like "time affects radius, and radius affects area," think composition.
| t (hours) | r(t) = 3t + 1 (metres) | (A ∘ r)(t) = π(3t + 1)² (m²) |
|---|---|---|
| 0 | 1 | π ≈ 3.14 |
| 1 | 4 | 16π ≈ 50.3 |
| 2 | 7 | 49π ≈ 153.9 |
| 3 | 10 | 100π ≈ 314.2 |
| 5 | 16 | 256π ≈ 804.2 |
Table of values for the oil spill composition model
SECTION 6
Worked Example
Let's work through a complete IB-style composition problem step by step.
Finding and Evaluating Compositions
- 1
Step 1 — State the Given Functions
Let f(x) = 3x − 2 and g(x) = x² + 1. We need to find: (a) (f ∘ g)(x), (b) (g ∘ f)(x), and (c) (f ∘ g)(−2). - 2
Step 2 — Find (f ∘ g)(x)
By definition, (f ∘ g)(x) = f(g(x)). The inner function is g, so we first compute g(x) = x² + 1. Now substitute this entire expression into f in place of its input variable: f(x² + 1) = 3(x² + 1) − 2 = 3x² + 3 − 2 = 3x² + 1.(f ∘ g)(x) = 3x² + 1 - 3
Step 3 — Find (g ∘ f)(x)
Now (g ∘ f)(x) = g(f(x)). The inner function is f, so f(x) = 3x − 2. Substitute into g: g(3x − 2) = (3x − 2)² + 1 = 9x² − 12x + 4 + 1 = 9x² − 12x + 5.(g ∘ f)(x) = 9x² − 12x + 5 - 4
Step 4 — Verify Non-Commutativity
Comparing the two results: (f ∘ g)(x) = 3x² + 1 and (g ∘ f)(x) = 9x² − 12x + 5. These are clearly different expressions, confirming that composition is not commutative. - 5
Step 5 — Evaluate (f ∘ g)(−2)
Using our expression from Step 2: (f ∘ g)(−2) = 3(−2)² + 1 = 3(4) + 1 = 12 + 1 = 13. Alternatively, you can compute step by step: g(−2) = (−2)² + 1 = 5, then f(5) = 3(5) − 2 = 13. Both approaches give the same answer.(f ∘ g)(−2) = 13
Pro Strategy
SECTION 7
Common Pitfalls & Comparisons
Students often confuse composition with other operations on functions. The table below clarifies the differences and highlights common mistakes to avoid.
| Operation | Notation | What It Means |
|---|---|---|
| Composition | (f ∘ g)(x) = f(g(x)) | Feed the output of g into f. The functions are chained, not multiplied. |
| Multiplication | (f · g)(x) = f(x) × g(x) | Evaluate both functions at x, then multiply the two results together. |
| Addition | (f + g)(x) = f(x) + g(x) | Evaluate both functions at x, then add the two results. |
| Inverse | f⁻¹(x) | The function that undoes f. Note: f⁻¹ ≠ 1/f. Composition with inverse: (f ∘ f⁻¹)(x) = x. |
Comparison of operations on functions
AVOID THIS MISTAKE
- Pitfall 1: Wrong order. In (f ∘ g)(x), g acts first, not f. Read from right to left or from inside out.
- Pitfall 2: Forgetting to substitute fully. Replace every instance of the variable in the outer function with the entire inner expression, not just part of it.
- Pitfall 3: Ignoring domain restrictions. If the inner function can produce values outside the outer function's domain, those x-values must be excluded.
- Pitfall 4: Assuming commutativity. f ∘ g ≠ g ∘ f in general. Always check which composition is being asked for.
SECTION 8
Connection to Advanced Topics
Function composition at SL 2.9 is a gateway to several deeper ideas that you'll encounter if you continue with HL Mathematics or university-level courses. Understanding composition now builds a strong foundation for these advanced concepts.
| SL 2.9 Concept | Advanced Extension | Where You'll See It |
|---|---|---|
| (f ∘ g)(x) = f(g(x)) | Chain rule: d/dx [f(g(x))] = f′(g(x)) × g′(x) | HL Calculus — differentiation of composite functions |
| f ∘ f⁻¹ = identity | Group theory: function groups under composition | University abstract algebra |
| Domain of f ∘ g | Composite function continuity and limits | HL Analysis — limits and continuity |
| Modeling with compositions | Iterated maps, fractals, dynamical systems | University mathematics and physics |
How SL 2.9 connects to advanced topics
Perhaps the most immediate connection is to the chain rule in calculus. When you differentiate a composite function like f(g(x)), you need to recognize the composition structure first. If you can comfortably identify the inner and outer functions now, the chain rule will feel much more natural when you encounter it. Additionally, the concept of iteration — composing a function with itself repeatedly, like f(f(f(x))) — leads to fascinating topics in chaos theory and fractals.
LOOKING AHEAD
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
Function composition means applying one function to the output of another. The notation (f ∘ g)(x) = f(g(x)) tells you to evaluate the inner function g first, then pass its result into the outer function f. To find the composed expression algebraically, replace every instance of the variable in the outer function's formula with the entire expression for the inner function. The domain of the composition requires that x be in the domain of g and that g(x) be in the domain of f.
Key properties to remember: composition is not commutative (f ∘ g ≠ g ∘ f in general), but it is associative. In modeling contexts, composition lets you chain two real-world processes — such as time → radius → area — into a single function. This skill connects directly to the chain rule in calculus and to powerful techniques in applied mathematics and computer science.