Menu

One Inside Another

Part of the Functions & Transformations section of Coddy's Algebra 2 journey. Lesson 21 of 58.

A composition feeds one function's output into another function. g(f(x)) means: work out f(x), then use that result as the input of g. It reads "g of f of x", and books also write it as (g ∘ f)(x).

Take f(x) = x + 4 and g(x) = 3x, and work out g(f(2)). Inner first: f(2) is 6. Then g(6) is 18. Written out, f's rule turns the problem into g(2 + 4), then g's rule gives 3(2 + 4), and the arithmetic finishes it.

Why the inside first? g needs a number to work on, and that number is whatever f produces. Code runs the same way: in g(f(2)), the computer calls f before g has an argument.

challenge icon

Challenge

For f(x) = 2x + 1 and g(x) = x^2, work out g(f(1)). Use the inner rule first, then the outer one, then type the arithmetic line by line.

Try it yourself

g(f(1))

Simplify the expression

quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Functions & Transformations