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
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
Simplify the expression
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Functions & Transformations
4Combining Functions
Adding FunctionsSubtracting FunctionsMultiplying FunctionsAt a Single NumberRecap: Combining10Functions in Stories
Writing the RuleUsing the RuleWorking BackwardUndoing a ConversionRecap: Stories2Expressions as Inputs
A Letter as InputA Sum as InputShifting the InputSolving f(x) = kRecap: Inputs as Expressions5Composition
One Inside AnotherOrder MattersA Function of ItselfComposing RulesBreaking ApartRecap: Composition8Stretching and Flipping
Taller and FlatterFlipping OverFlip, Then ShiftReading the RuleRecap: Stretch and Flip