A composite function, or a composition of functions, combines two or more functions, which produces a new function. In a composition, the outputs produced by one function are the inputs of the other function. The composition of the functions f and g is denoted as f(g(x)) or (f∘g)(x).
Performing the composition of two functions is similar to evaluating one function into the other. For example, let f(x)=2x+1 and g(x)=x−5. To find f(g(x)), the variablex in f(x)=2x+1 must be substituted with g(x).
Note that f(g(x)) makes sense only when the outputs of g belong to the domain of f. Also, be aware that the composition of functions is not commutative — that is, in general, f(g(x))=g(f(x)). This can be checked with the same two functions.
Just as changing the order of the machines in a factory could alter the final product, changing the order in which the functions are applied could produce different outputs. For example, here f(g(2)) and g(f(2)) are different values.
Extra
Parts of a Composition
Explore the parts of a composition by moving the magnifying glass.