Composition of functions

A composite function chains two functions together so you can compute them in one go. (f∘g)(x)(f \circ g)(x) means you put x into g first, then put the output into f. If you switch the order, the answer can change.

Chalcack concept card · Reviewed by the Chalcack team ·

Put 2 into g first to get 5, then put 5 into f to get 11.

Formulas

  • (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x))

When to use it

Use it when a problem takes the output of one function and plugs it into another function.

Worked example

Let f(x)=2x+1f(x) = 2x + 1 and g(x)=x+3g(x) = x + 3. Find (f∘g)(2)(f \circ g)(2). First, g(2)=2+3=5g(2) = 2 + 3 = 5. Plug 5 into f: f(5)=2×5+1=11f(5) = 2 \times 5 + 1 = 11, so the answer is 11.

Common mistake

In (f∘g)(x)(f \circ g)(x), many students compute f first because it is written on the left. Start with g, the function innermost in the parentheses. In the example above, switching the order gives g(f(2))=g(5)=8g(f(2)) = g(5) = 8, a different answer.

Related concepts

All 181 math concepts