Algebra 2 Advanced compositionfunctions

Composition of Functions

Feeding one function's output into another, and why order matters.

Video by Khan Academy — “Introduction to function composition | Functions and their graphs | Algebra II | Khan Academy” Watch on YouTube

The explanation

Key idea (f∘g)(x) = f(g(x)) — work inside out.

Composing means chaining: run x through g, then feed the result into f.

Written (f∘g)(x) or f(g(x)). Always work from the inside out.

With f(x) = x + 3 and g(x) = 2x:
f(g(x)) = f(2x) = 2x + 3
g(f(x)) = g(x + 3) = 2x + 6

Different answers. Composition is not commutative, and swapping the order is the most common error.

For a numerical value, evaluate the inner function first. f(g(5)) means find g(5), then apply f to that number.

Worked example

For f(x) = x² − 1 and g(x) = x + 4, find f(g(2)) and g(f(x)).

  1. Inner first: g(2) = 6.
  2. f(6) = 36 − 1 = 35.
  3. g(f(x)) = g(x² − 1) = (x² − 1) + 4.

Answer: f(g(2)) = 35 and g(f(x)) = x² + 3

Common mistakes

  • Applying f first in f(g(x)).
  • Multiplying the two functions instead of composing them.