Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Math101
Printable cheat sheet
AlgebraGrades 9–12

Function Composition

Function composition sends an input through one function and then uses that output as the input of another.

Open the full lesson →
Composition builds a multi-step process by placing one function inside another.

Reading the notation

The composition of $f$ with $g$ is written

$$ (f\circ g)(x)=f(g(x)). $$

Read it from right to left: apply $g$ first, then apply $f$ to the result. The circle is not multiplication. It signals that one output feeds another input.

Evaluating from values or a table

To find $(f\circ g)(2)$, first find $g(2)$. Suppose $g(2)=5$. Then look for $f(5)$. If $f(5)=-1$, the composition equals $-1$.

The intermediate value must be a valid input for $f$. A table may contain $g(2)$ but not contain the necessary row for $f(g(2))$; in that case the composition cannot be evaluated from the supplied data.

Finding a composition formula

Replace every $x$ in the outside function with the complete inside function. Parentheses are essential.

If

$$ f(x)=2x+3,\qquad g(x)=x^2-1, $$

then

$$ (f\circ g)(x)=f(x^2-1)=2(x^2-1)+3=2x^2+1. $$

Changing the order gives a different result:

$$ (g\circ f)(x)=g(2x+3)=(2x+3)^2-1. $$

Composition is generally not commutative.

Worked example with careful substitution

Modelling chained relationships

Suppose a taxi distance is $d(t)=40t$ kilometres after $t$ hours, and fuel cost is $C(d)=0.18d$ dollars for distance $d$. Then

$$ (C\circ d)(t)=0.18(40t)=7.2t. $$

The composite model converts hours directly to fuel cost. Tracking units through the chain helps confirm the order.

Common mistakes

Applying the left function first. In $f\circ g$, $g$ acts first.

Multiplying $f(x)g(x)$. Composition is substitution, not multiplication.

Dropping parentheses. $f(3x-2)$ requires replacing every input with the entire expression.

Assuming $f\circ g=g\circ f$. Test the two orders separately.

Ignoring the inside output restriction. A composite can have a narrower domain.

Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗