# Function Composition

#### Significance

Composition is the operation of taking the output from one function and using that as the input to a second function. It, together with the algebraic operations on functions, is what allows us to take the basic building blocks of "pure" function types discussed in the Field Guide and build the large variety of functions which is the focus of calculus.

#### Notation and Definition

In terms of "function machines", the composition f g of the two functions f and g is the function which feeds an input to g and feeds the output of g to f.

Algebraically,

f g (x) = f(g(x)).

 For f g to be defined it is necessary that the IMAGE OF g be contained in the DOMAIN OF f. In other words, it is necessary that f be defined at every point of the form g(x) for some x in the domain of g.

Example: If f(x) = 3 sin (5 x) and g(x) = x2, then

(f g)(x) = 3 sin (5 x2) and (g f)(x) = [3 sin (5 x)]2 = 9 sin 2(5 x).

#### Further Remarks

The domain of the composition f g is the domain of g, the codomain (or range) of this composition is the codomain (or range) of f, and the image of f g is contained in the image of f. The situation is calculus is very nice -- our functions all have domains and ranges which are subsets of the real numbers. Given a set of functions whose domains are all real numbers and whose ranges are subsets of the real numbers, we can compose them at will. This is how we build up complicated expressions like

sin4(sqrt(x1/3 + ex)).

Broken down into small components, this function may be thought of as the composition f(g(h(k(x)))) with f(x) = x4, g(x) = sin(x), h(x) = sqrt(x), and k(x) = x1/3 + ex.

#### Inverse Functions

There is one function which is distinguished from all others with respect to function composition, namely the identity function. The identity function on any set X is the function defined by

id(x) = x for all x in X.

In the context of functions from the Field Guide, the identity function is the function y = x.

Along with an identity come inverses. In the case of functions,

 If f is a one-to-one function from the set X onto the set Y, then f -1 is the function from the set Y to the set X such that f(f -1(y)) = y and f -1(f(x)) = xfor all x in X and y in Y.

 Exercises Field Guide HUB CQ Directory CQ Resources