A
composite function, or a
composition of functions, combines two or more , which produces a new function. In a composition, the produced by one function are the 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 one function into the other. For example, let
f(x)=2x+1 and
g(x)=x−5. To find
f(g(x)), the
x in
f(x)=2x+1 must be substituted with
g(x).
f(x)=2x+1
▼
Substitute g(x) for x and evaluate
f(g(x))=2g(x)+1
h(x)=2g(x)+1
h(x)=2(x−5)+1
h(x)=2x−10+1
h(x)=2x−9
Note that
f(g(x)) makes sense only when the outputs of
g belong to the 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.
Explore the parts of a composition by moving the magnifying glass.