Function composition
Function Composition
Function Composition is a topic in Relations & Functions in the California Common Core State Standards. It is aligned to Standard F-BF.1c, which requires students to compose functions and combine standard function types by composition.
Function composition \((f\circ g)(x)=f(g(x))\) applies the inner function \(g\) first and then the outer function \(f\); order matters.
Theory
The inner function \(g\) runs first; its result is fed into the outer function \(f\).
The composition rule:
How to compose functions
- Identify the inner function \(g\) and outer function \(f\).
- Substitute \(g(x)\) wherever \(x\) appears in \(f\).
- Simplify.
- For a value, evaluate the inner function first, then the outer.
Work inside out: find \(g(2)\), then apply \(f\).
| \(g(2)\) | \(=\) | \(2+3=5\) |
| \(f(5)\) | \(=\) | \(5^2=25\) |
Substitute \(g(x)\) into \(f\).
| \((f\circ g)(x)\) | \(=\) | \(f(x+3)\) |
| \(=\) | \((x+3)^2\) |
Now \(f\) runs first.
| \((g\circ f)(x)\) | \(=\) | \(g(x^2)\) |
| \(=\) | \(x^2+3\) |
\((x+3)^2\neq x^2+3\), so composition is not commutative.
Let the inside be \(g\) and the outside be \(f\).
| \(g(x)\) | \(=\) | \(x^2+1\) |
| \(f(x)\) | \(=\) | \(\sqrt{x}\) |
| \(f(g(x))\) | \(=\) | \(\sqrt{x^2+1}\) |
Common pitfalls
Frequently asked questions
What is function composition?
Using one function's output as another's input: \((f\circ g)(x)=f(g(x))\).
Which function runs first in \(f(g(x))\)?
The inner function \(g\) runs first, then \(f\).
Is composition commutative?
No. \((f\circ g)(x)\) generally does not equal \((g\circ f)(x)\).
How do you decompose a function?
Choose an inner function for the “inside” expression and an outer function for what is done to it.