# Composition of Functions

### LEARNING OBJECTIVES

By the end of this lesson, you will be able to:- Combine functions using algebraic operations.
- Create a new function by composition of functions.
- Evaluate composite functions.
- Find the domain of a composite function.
- Decompose a composite function into its component functions.

Suppose we want to calculate how much it costs to heat a house on a particular day of the year. The cost to heat a house will depend on the average daily temperature, and in turn, the average daily temperature depends on the particular day of the year. Notice how we have just defined two relationships: The cost depends on the temperature, and the temperature depends on the day.

Using descriptive variables, we can notate these two functions. The function

**cost function**at that temperature. We would write

By combining these two relationships into one function, we have performed function composition, which is the focus of this section.

## Combining Functions Using Algebraic Operations

Function composition is only one way to combine existing functions. Another way is to carry out the usual algebraic operations on functions, such as addition, subtraction, multiplication and division. We do this by performing the operations with the function outputs, defining the result as the output of our new function.

Suppose we need to add two columns of numbers that represent a husband and wife’s separate annual incomes over a period of years, with the result being their total household income. We want to do this for every year, adding only that year’s incomes and then collecting all the data in a new column. If

If this holds true for every year, then we can focus on the relation between the functions without reference to a year and write

Just as for this sum of two functions, we can define difference, product, and ratio functions for any pair of functions that have the same kinds of inputs (not necessarily numbers) and also the same kinds of outputs (which do have to be numbers so that the usual operations of algebra can apply to them, and which also must have the same units or no units when we add and subtract). In this way, we can think of adding, subtracting, multiplying, and dividing functions.

For two functions

### Example 1: Performing Algebraic Operations on Functions

Find and simplify the functions

### Solution

Begin by writing the general form, and then substitute the given functions.

No, the functions are not the same.

Note: For

### Try It 1

Find and simplify the functionsAre they the same function?

Solution## Create a Function by Composition of Functions

Performing algebraic operations on functions combines them into a new function, but we can also create functions by composing functions. When we wanted to compute a heating cost from a day of the year, we created a new function that takes a day as input and yields a cost as output. The process of combining functions so that the output of one function becomes the input of another is known as a composition of functions. The resulting function is known as a composite function. We represent this combination by the following notation:It is also important to understand the order of operations in evaluating a composite function. We follow the usual convention with parentheses by starting with the innermost parentheses first, and then working to the outside. In the equation above, the function

For example, if

but

Note that the range of the inside function (the first function to be evaluated) needs to be within the domain of the outside function. Less formally, the composition has to make sense in terms of inputs and outputs.

### A General Note: Composition of Functions

When the output of one function is used as the input of another, we call the entire operation a composition of functions. For any inputIt is important to realize that the product of functions

### Example 2: Determining whether Composition of Functions is Commutative

Using the functions provided, find### Solution

Now we can substitute

### Example 3: Interpreting Composite Functions

The function### Solution

The inside expression in the composition isUsing

### Example 4: Investigating the Order of Function Composition

Suppose### Solution

The functionThe expression

### Q & A

**Are there any situations where$f\left(g\left(y\right)\right)$ and $g\left(f\left(x\right)\right)$ would both be meaningful or useful expressions?**

*Yes. For many pure mathematical functions, both compositions make sense, even though they usually produce different new functions. In real-world problems, functions whose inputs and outputs have the same units also may give compositions that are meaningful in either order.*

### Try It 2

The gravitational force on a planet a distance r from the sun is given by the functionSolution

## Evaluating Composite Functions

Once we compose a new function from two existing functions, we need to be able to evaluate it for any input in its domain. We will do this with specific numerical inputs for functions expressed as tables, graphs, and formulas and with variables as inputs to functions expressed as formulas. In each case, we evaluate the inner function using the starting input and then use the inner function’s output as the input for the outer function.

## Evaluating Composite Functions Using Tables

When working with functions given as tables, we read input and output values from the table entries and always work from the inside to the outside. We evaluate the inside function first and then use the output of the inside function as the input to the outside function.

### Example 5: Using a Table to Evaluate a Composite Function

Using the table below, evaluate

$x$ |
$f\left(x\right)$ |
$g\left(x\right)$ |
---|---|---|

1 | 6 | 3 |

2 | 8 | 5 |

3 | 3 | 2 |

4 | 1 | 7 |

### Solution

To evaluate

To evaluate

The table below shows the composite functions

$x$ |
$g\left(x\right)$ |
$f\left(g\left(x\right)\right)$ |
$f\left(x\right)$ |
$g\left(f\left(x\right)\right)$ |

3 | 2 | 8 | 3 | 2 |

### Try It 3

Using the table below, evaluate$x$ |
$f\left(x\right)$ |
$g\left(x\right)$ |
---|---|---|

1 | 6 | 3 |

2 | 8 | 5 |

3 | 3 | 2 |

4 | 1 | 7 |

## Evaluating Composite Functions Using Graphs

When we are given individual functions as graphs, the procedure for evaluating composite functions is similar to the process we use for evaluating tables. We read the input and output values, but this time, from the

### How To: Given a composite function and graphs of its individual functions, evaluate it using the information provided by the graphs.**
**

- Locate the given input to the inner function on the $x\text{-}$axis of its graph.
- Read off the output of the inner function from the $y\text{-}$axis of its graph.
- Locate the inner function output on the $x\text{-}$axis of the graph of the outer function.
- Read the output of the outer function from the $y\text{-}$axis of its graph. This is the output of the composite function.

### Example 6: Using a Graph to Evaluate a Composite Function

Using the graphs in Figure 3, evaluate### Solution

To evaluate

We evaluate

We can then evaluate the composite function by looking to the graph of

## Evaluating Composite Functions Using Formulas

When evaluating a composite function where we have either created or been given formulas, the rule of working from the inside out remains the same. The input value to the outer function will be the output of the inner function, which may be a numerical value, a variable name, or a more complicated expression.

While we can compose the functions for each individual input value, it is sometimes helpful to find a single formula that will calculate the result of a composition

### How To: Given a formula for a composite function, evaluate the function.**
**

- Evaluate the inside function using the input value or variable provided.
- Use the resulting output as the input to the outside function.

### Example 7: Evaluating a Composition of Functions Expressed as Formulas with a Numerical Input

Given

### Solution

Because the inside expression is

Then

### Analysis of the Solution

It makes no difference what the input variables

### Try It 5

Given

A)

B)

## Finding the Domain of a Composite Function

As we discussed previously, the **domain of a composite function** such as

### A General Note: Domain of a Composite Function

The domain of a composite function

### How To: Given a function composition $f\left(g\left(x\right)\right)$, determine its domain.

- Find the domain of g.
- Find the domain of f.
- Find those inputs, x, in the domain of g for which g(x) is in the domain of f. That is, exclude those inputs, x, from the domain of g for which g(x) is not in the domain of f. The resulting set is the domain of $f\circ g$.

### Example 8: Finding the Domain of a Composite Function

Find the domain of

### Solution

The domain of

So the domain of

We can write this in interval notation as

### Example 9: Finding the Domain of a Composite Function Involving Radicals

Find the domain of

### Solution

Because we cannot take the square root of a negative number, the domain of

The domain of this function is

### Analysis of the Solution

This example shows that knowledge of the range of functions (specifically the inner function) can also be helpful in finding the domain of a composite function. It also shows that the domain of

### Try It 6

Find the domain of

## Decomposing a Composite Function into its Component Functions

In some cases, it is necessary to decompose a complicated function. In other words, we can write it as a composition of two simpler functions. There may be more than one way to decompose a composite function, so we may choose the decomposition that appears to be most expedient.

### Example 10: Decomposing a Function

Write

### Solution

We are looking for two functions,

We can check our answer by recomposing the functions.

### Try It 7

WriteSolution

## Key Equation

Composite function | $\left(f\circ g\right)\left(x\right)=f\left(g\left(x\right)\right)$ |

## Key Concepts

- We can perform algebraic operations on functions.
- When functions are combined, the output of the first (inner) function becomes the input of the second (outer) function.
- The function produced by combining two functions is a composite function.
- The order of function composition must be considered when interpreting the meaning of composite functions.
- A composite function can be evaluated by evaluating the inner function using the given input value and then evaluating the outer function taking as its input the output of the inner function.
- A composite function can be evaluated from a table.
- A composite function can be evaluated from a graph.
- A composite function can be evaluated from a formula.
- The domain of a composite function consists of those inputs in the domain of the inner function that correspond to outputs of the inner function that are in the domain of the outer function.
- Just as functions can be combined to form a composite function, composite functions can be decomposed into simpler functions.
- Functions can often be decomposed in more than one way.

## Glossary

- composite function
- the new function formed by function composition, when the output of one function is used as the input of another

1. How does one find the domain of the quotient of two functions,

2. What is the composition of two functions,

3. If the order is reversed when composing two functions, can the result ever be the same as the answer in the original order of the composition? If yes, give an example. If no, explain why not.

4. How do you find the domain for the composition of two functions,

5. Given

6. Given

7. Given

8. Given

9. Given

10. Given

11. Given

12.

13.

14.

15.

16.

17.

For the following exercises, use each set of functions to find

18.

19.

20. Given

the domain of

the domain of

a.

b. the domain of

a.

b.

For the following exercises, find functions

26.

27.

28.

29.

30.

31.

32.

33.

34.

35.

36.

37.

38.

39.

40.

41.

For the following exercises, use the graphs of

42.

43.

44.

45.

46.

47.

48.

49.

For the following exercises, use graphs of

50.

51.

52.

53.

54.

55.

56.

57.

For the following exercises, use the function values for

$x$ |
$f\left(x\right)$ |
$g\left(x\right)$ |

0 | 7 | 9 |

1 | 6 | 5 |

2 | 5 | 6 |

3 | 8 | 2 |

4 | 4 | 1 |

5 | 0 | 8 |

6 | 2 | 7 |

7 | 1 | 3 |

8 | 9 | 4 |

9 | 3 | 0 |

58.

59.

60.

61.

62.

63.

64.

65.

For the following exercises, use the function values for

$x$ |
$f\left(x\right)$ |
$g\left(x\right)$ |

-3 | 11 | -8 |

-2 | 9 | -3 |

-1 | 7 | 0 |

0 | 5 | 1 |

1 | 3 | 0 |

2 | 1 | -3 |

3 | -1 | -8 |

66.

67.

68.

69.

70.

71.

For the following exercises, use each pair of functions to find

72.

73.

74.

75.

For the following exercises, use the functions

76.

77.

78.

79.

For the following exercises, use

80. Find

81. Find

82. What is the domain of

83. What is the domain of

84. Let

a. Find

b. Is

For the following exercises, let

85. True or False:

86. True or False:

For the following exercises, find the composition when

87.

88.

89.

a. Evaluate

b. Evaluate

c. Solve

d. Solve

91. The function

a. Evaluate

b. Evaluate

c. Solve

d. Solve

92. A store offers customers a 30% discount on the price

93. A rain drop hitting a lake makes a circular ripple. If the radius, in inches, grows as a function of time in minutes according to

94. A forest fire leaves behind an area of grass burned in an expanding circular pattern. If the radius of the circle of burning grass is increasing with time according to the formula

95. Use the function you found in the previous exercise to find the total area burned after 5 minutes.

96. The radius

a. Find the composite function

b. Find the *exact* time when the radius reaches 10 inches.

97. The number of bacteria in a refrigerated food product is given by

a. Find the composite function

b. Find the time (round to two decimal places) when the bacteria count reaches 6752.

### Licenses and Attributions

#### More Study Resources for You

The materials found on Course Hero are not endorsed, affiliated or sponsored by the authors of the above study guide

## Analysis of the Solution

Figure 5 shows how we can mark the graphs with arrows to trace the path from the input value to the output value.Figure 5