Meaning of a composite function
A composite function applies one function after another. In fg(x) we first apply the inner function g, then apply f to that result: fg(x) = f(g(x)). The order matters — in general fg(x) ≠ gf(x). Read fg as "f of g of x" and always work from the inside out. A common exam slip is to apply the outer function first; keep the inner one closest to x.
Building and evaluating
To form fg(x) algebraically, replace every x in f with the whole expression g(x). To evaluate at a number, compute the inner image first, then substitute into the outer function. The same idea gives repeated composition such as f²(x) = ff(x), which means applying f twice, not squaring f(x). Composition is also useful in reverse: if you are told the rule for fg(x) and for g(x), you can work back to find f(x) by treating g(x) as a single new variable. For a composite to make sense, every image of the inner function must be a valid object of the outer function, so the range of g should lie inside the domain of f. Checking this before you substitute prevents undefined results such as dividing by zero.
Key formula
fg(x) = f(g(x)) and gf(x) = g(f(x)). Apply the inner function first. In general fg(x) ≠ gf(x).
Worked example
Given f(x) = 2x + 1 and g(x) = x². Find fg(3) and gf(3).
fg(3) = f(g(3)) = f(3²) = f(9) = 2(9) + 1 = 19.
gf(3) = g(f(3)) = g(2·3 + 1) = g(7) = 7² = 49. The two answers differ, confirming order matters. Algebraically fg(x) = 2x² + 1 while gf(x) = (2x + 1)².
Remember
- Always work inside-out: evaluate the inner function first.
- fg and gf are usually different functions.
- f²(x) means f(f(x)), not [f(x)]².