Functions can be added, subtracted, multiplied and divided creating new functions and graphs that are complicated combinations of the various original functions. One important way to transform functions is through function composition. Function composition allows you to line up two or more functions that act on an input in tandem.

Is function composition essentially the same as multiplying the two functions together?

Watch This

Guidance

A common way to describe functions is a mapping from the domain space to the range space:

Function composition means that you have two or more functions and the range of the first function becomes the domain of the second function.

There are two notations used to describe function composition. In each case the order of the functions matters because arithmetically the outcomes will be different. Squaring a number and then doubling the result will be different from doubling a number and then squaring the result. In the diagram above,
\begin{align*}f(x)\end{align*}
occurs first and
@$\begin{align*}g(x)\end{align*}@$
occurs second. This can be written as:

You should read this “
@$\begin{align*}g\end{align*}@$
of
@$\begin{align*}f\end{align*}@$
of
@$\begin{align*}x\end{align*}@$
.” In both cases notice that the
@$\begin{align*}f\end{align*}@$
is closer to the
@$\begin{align*}x\end{align*}@$
and operates on the
@$\begin{align*}x\end{align*}@$
values first.

In the following three examples you will practice function composition with these functions:

In order to truly show they are not equal it is best to find a specific counter example of a number where they differ. Sometimes algebraic expressions may look different, but are actually the same. You should notice that
@$\begin{align*}f \big( h(x) \big)\end{align*}@$
is undefined when
@$\begin{align*}x = -5\end{align*}@$
because then there would be zero in the denominator.
@$\begin{align*}h \big( f(x) \big)\end{align*}@$
on the other hand is defined at
@$\begin{align*}x = -5\end{align*}@$
. Since the two function compositions differ, you can conclude:

Note that it is difficult to write and read an exponential function with a large fraction in the exponent. In order to make it easier to work with you can use
@$\begin{align*}exp(x)\end{align*}@$
instead of
@$\begin{align*}e^x\end{align*}@$
which allows more space and easier readability.

Solution:
These functions are
nested
within the arguments of the other functions. Sometimes functions simplify significantly when composed together, as
@$\begin{align*}f\end{align*}@$
and
@$\begin{align*}j\end{align*}@$
do in this case. It makes sense to evaluate those two functions first together and keep them on the outside of the argument.

Function composition is not the same as multiplying two functions together. With function composition there is an outside function and an inside function. Suppose the two functions were doubling and squaring. It is clear just by looking at the example input of the number 5 that 50 (squaring then doubling) is different from 100 (doubling then squaring). Both 50 and 100 are examples of function composition, while 250 (five doubled multiplied by five squared) is an example of the product of two separate functions happening simultaneously.

Vocabulary

Function composition
is when there are two or more functions and the range of the first function becomes the domain of the second function.

Nesting
refers to a function being operated on or in the argument of another function.

A
counterexample
is a specific instance that contradicts a statement. When you are asked to show a statement is not true, it is best to find a counterexample to the statement.

Vocabulary

Language:

The domain of a function is the set of -values for which the function is defined.

Function

Function

A function is a relation where there is only one output for every input. In other words, for every value of , there is only one value for .

Function composition

Function composition

Function composition involves 'nested functions' or functions within functions. Function composition is the application of one function to the result of another function.

Range

Range

The range of a function is the set of values for which the function is defined.

Image Attributions

ShowHide Details

Description

No description available here...

Learning Objectives

Here you will learn a new type of transformation called composition. Composing functions means having one function inside the argument of another function. This creates a brand new function that may not look like a regular transformation of any of the basic functions.