Menu

Order Matters

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

Swap the order of a composition and you usually get a different answer. Take f(x) = x + 2 and g(x) = x^2, with the input 3. g(f(3)) adds first: f(3) is 5, then g(5) is 25. f(g(3)) squares first: g(3) is 9, then f(9) is 11.

Adding then squaring is not squaring then adding, so the results differ. As rules, g(f(x)) = (x + 2)^2 while f(g(x)) = x^2 + 2.

So read a composition from the inside out every time. The innermost call is the one you work out first, whatever its letter, and the letter written first is the one that acts last.

challenge icon

Challenge

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

Try it yourself

f(g(2))

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