<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
Skip Navigation
You are viewing an older version of this Concept. Go to the latest version.

Composition of Functions

Two or more functions where the range of the first becomes the domain of the second.

Atoms Practice
Practice Composition of Functions
Practice Now
Function Composition

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

http://www.youtube.com/watch?v=qxBmISCJSME James Sousa: Composite Functions


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, f(x)  occurs first and g(x)  occurs second. This can be written as:

g \big( f(x) \big)  or (g \circ f) (x)

You should read this “ g of  f of x .” In both cases notice that the f  is closer to the x  and operates on the x  values first. 

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

f(x) = x^2 - 1

h(x) = \frac{x - 1}{x + 5}

g(x) = 3e^x - x

j(x) = \sqrt{x + 1}

Example A

Show f \big( h(x) \big) \neq h \big( f(x) \big)


f \big( h(x) \big) = f \left( \frac{x - 1}{x + 5} \right) = \left( \frac{x - 1}{x + 5} \right)^2 - 1

h \big( f(x) \big) = h(x^2 - 1) = \frac{(x^2 - 1) - 1}{(x^2 - 1) + 5} = \frac{x^2 - 2}{x^2 + 4}

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 f \big( h(x) \big) is undefined when x = -5  because then there would be zero in the denominator.  h \big( f(x) \big) on the other hand is defined at x = -5 . Since the two function compositions differ, you can conclude:

f \big( h(x) \big) \neq h \big( f(x) \big)

Example B

What is g \big( h(x) \big) ?

g \big( h(x) \big) = g \left( \frac{x - 1}{x + 5} \right) = 3e^{\left (\frac{x - 1}{x + 5} \right)} - \left( \frac{x - 1}{x + 5} \right) \\= 3 \ \text{exp} \left( \frac{x - 1}{x + 5} \right) - \left( \frac{x - 1}{x + 5} \right)

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 exp(x)  instead of e^x  which allows more space and easier readability.

Example C

What is f \Big( j \big(  h \big(  g ( x )   \big)  \big) \Big) ?

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

f(x) = x^2 - 1; h(x) = \frac{x - 1}{x + 5}; g(x) = 3e^x -x; j(x) = \sqrt{x + 1}

f \big( j(y) \big) = f \left ( \sqrt{y + 1} \right )  = \left ( \sqrt{y + 1} \right ) ^2 - 1 = y + 1 - 1 = y

Notice how the composition of f  and j  produced just the argument itself? 


f \Big( j \big( h \big( g(x) \big) \big) \Big) = h \big( g(x) \big) & = h(3e^x - x) \\ & = \frac{(3e^x - x) - 1}{(3e^x - x) + 5} \\ & = \frac{3e^x - x - 1}{3e^x - x + 5}

Concept Problem Revisited

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. 


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. 

Guided Practice

For the three guided practice problems use the following functions.

f(x) = | x |


h(x) = -x

1. Compose g \big( f(x) \big)  and graph the result. Describe the transformation. 

2. Compose h \big( g(x) \big)  and graph the result. Describe the transformation. 

3. Compose g \Big( h \big( f(x) \big) \Big)  and graph the result. Describe the transformation. 


1.  g(f(x)) = g (|x|) = e^{|x|}

The positive portion of the exponential graph has been mirrored over the  y axis and the negative portion of the exponential graph has been entirely truncated. 

2.  h \big( g(x) \big) = h(e^x) = -e^x

The exponential graph has been reflected over the x -axis. 

3.  g \Big( h \big( f(x) \big) \Big) = g(h(|x|)) = g(-|x|) = e^{-|x|}

The negative portion of the exponential graph has been mirrored over the y -axis and the positive portion of the exponential graph has been truncated. 


For questions 1-9, use the following three functions: f(x) = |x|, h(x) = -x, g(x) = (x - 2)^2 -3 .

1. Graph f(x), h(x)  and g(x) .

2. Find f \big( g(x) \big)  algebraically.

3. Graph f \big( g(x) \big)  and describe the transformation.

4. Find g \big( f(x) \big)  algebraically.

5. Graph g \big( f(x) \big)  and describe the transformation.

6. Find h \big( g(x) \big)  algebraically.

7. Graph h \big( g(x) \big)  and describe the transformation.

8. Find g \big( h(x) \big)  algebraically.

9. Graph g \big( h(x) \big)  and describe the transformation.

For 10-16, use the following three functions: j(x) = x^2, k(x) = |x|, m(x) = \sqrt{x} .

10. Graph j(x), k(x)  and m(x) .

11. Find j \big( k(x) \big)  algebraically.

12. Graph j \big( k(x) \big)  and describe the transformation.

13. Find k \big( m(x) \big)  algebraically.

14. Graph k \big( m(x) \big)  and describe the transformation.

15. Find m \big( k(x) \big)  algebraically.

16. Graph m \big( k(x) \big)  and describe the transformation.




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


A function is a relation where there is only one output for every input. In other words, for every value of x, there is only one value for y.
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.


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

Image Attributions


Please wait...
Please wait...

Original text