functions
Composition of Functions
You should know: functions
Overview
Function composition chains two functions together so the output of one becomes the input of the next: (f∘g)(x) = f(g(x)). It's the algebraic way of describing a multi-step process — apply g first, then feed the result into f — and it's the operation whose 'undo' defines inverse functions (f∘f⁻¹ = identity).
Intuition
Think of an assembly line: g(x) is the first machine, transforming the raw input; f then takes g's output and transforms it further. The composite (f∘g)(x) describes the entire two-step pipeline as a single function. Order matters — running g then f is generally not the same as running f then g, just as putting on socks then shoes gives a different (sensible) result than shoes then socks.
Interactive Graph
Formal Definition
The composition of f and g, read 'f composed with g' or 'f of g', applies g first and then f:
x must be valid for g, and g(x) must be valid for f
Properties
Non-commutativity
Associativity
Identity element
Inverse composition
Applications
Worked Examples
First evaluate the inner function g(3).
Feed that result into f.
Answer: (f∘g)(3) = 19
Practice Problems
Given f(x)=3x-2 and g(x)=x+5, find (g∘f)(x) and confirm it differs from (f∘g)(x).
Given f(x)=1/x and g(x)=x-1, find the domain of (f∘g)(x).
Common Mistakes
Assuming (f∘g)(x) is the same as f(x)·g(x).
Composition means substituting g(x) as the ENTIRE input to f, not multiplying the two functions. (f∘g)(x)=f(g(x)) is generally very different from the product f(x)g(x).
Ignoring domain restrictions introduced by the composition.
Even if f and g individually have simple domains, (f∘g)(x) can have a smaller domain — you must exclude any x where g(x) falls outside f's domain, in addition to excluding x outside g's own domain.
Summary
- (f∘g)(x) = f(g(x)) applies g first, then feeds its output into f.
- Composition is generally NOT commutative: f∘g ≠ g∘f.
- Composition IS associative: f∘(g∘h) = (f∘g)∘h.
- The domain of f∘g requires x to be valid for g AND g(x) to be valid for f.
- A function composed with its inverse returns the identity: f∘f⁻¹ = f⁻¹∘f = x.
References
- BookSullivan, M. Algebra and Trigonometry, 10th ed. Ch. 2 — Functions and Their Graphs.
Mathematics