ACT® · Math: Functions — Composition, Transformation, and Inverse Functions
Order of Composition: f(g(x)) Versus g(f(x))
Composing two functions means running one machine's output into another, and which machine goes first changes the result. f(g(x)) and g(f(x)) are generally different values.
Think of f and g as two machines wired in series. Composition f(g(x)) means: feed x into g first, then take whatever comes out and feed it into f. Write g(f(x)) and you've reversed the wiring — x goes into f first, then that output goes into g. Since the first machine changes the number before the second machine ever sees it, swapping the order usually sends a different value down the line, and the final answers disagree.
This breaks the habit built from ordinary multiplication, where 3 x 5 and 5 x 3 land on the same number no matter which factor you write first. Composition does not get that free pass. f(x) = x - 6 and g(x) = x2 is enough to show it: subtracting first and then squaring is not the same move as squaring first and then subtracting. There is no shortcut that lets you skip computing both orders separately — you have to build the inside function's output first, then apply the outside function to that result, every time.
This matters because composition questions sit right next to transformation and inverse function questions on the test, and all three hinge on tracking exactly what happens to x, and in what sequence. An inverse is really a composition check in disguise: f(f−1(x)) must return x, which only works because the two steps are designed to undo each other in a specific order. Getting comfortable with 'first step, then second step, and order matters' here pays off immediately in both of those neighboring ideas.
Key terms
- composition
- Combining two functions by using the output of one as the input of the other.
- f(g(x))
- Apply g to x first, then apply f to that result — g is the inner function.
- inner function
- The function applied first in a composition, closest to the input x.
- outer function
- The function applied last in a composition, acting on the inner function's output.
- commutative
- A property where order doesn't affect the result, which addition and multiplication have but composition does not.
Watch it explained
Check yourself
End of topic.