## Creating and Evaluating Composite Functions

Composite functions are combinations of functions. This section will teach you how to manipulate composite functions algebraically, define their domain and range, and graph them.

### 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:

We read the left-hand side as " composed with at ," and the right-hand side as " of of ". The two sides of the equation have the same mathematical meaning and are equal. The open circle symbol is called the composition operator. We use this operator mainly when we wish to emphasize the relationship between the functions themselves without referring to any particular input value. Composition is a binary operation that takes two functions and forms a new function, much as addition or multiplication takes two numbers and gives a new number. However, it is important not to confuse function composition with multiplication because, as we learned above, in most cases .

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 takes the input first and yields an output . Then the function takes as an input and yields an output .

In general, and are different functions. In other words, in many cases for all . We will also see that sometimes two functions can be composed only in one specific order.

but

These expressions are not equal for all values of , so the two functions are not equal. It is irrelevant that the expressions happen to be equal for the single input value .

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.

#### 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 input and functions and , this action defines a composite function, which we write as such that

The domain of the composite function is all such that is in the domain of and is in the domain of .

It is important to realize that the product of functions is not the same as the function composition , because, in general, .

#### EXAMPLE 2

##### Determining whether Composition of Functions is Commutative

Using the functions provided, find and . Determine whether the composition of the functions is commutative.

##### Solution

Let's begin by substituting into .

We find that , so the operation of function composition is not commutative.

#### EXAMPLE 3

##### Interpreting Composite Functions

The function gives the number of calories burned completing sit-ups, and gives the number of sit-ups a person can complete in minutes. Interpret .

##### Solution

The inside expression in the composition is . Because the input to the -function is time, represents 3 minutes, and is the number of sit-ups completed in 3 minutes.

Using as the input to the function gives us the number of calories burned during the number of sit-ups that can be completed in 3 minutes, or simply the number of calories burned in 3 minutes (by doing sit-ups).

#### EXAMPLE 4

##### Investigating the Order of Function Composition

Suppose gives miles that can be driven in hours and gives the gallons of gas used in driving miles. Which of these expressions is meaningful: or ?

##### Solution

The function is a function whose output is the number of miles driven corresponding to the number of hours driven.

The function is a function whose output is the number of gallons used corresponding to the number of miles driven. This means:

The expression takes miles as the input and a number of gallons as the output. The function requires a number of hours as the input. Trying to input a number of gallons does not make sense. The expression is meaningless.

The expression takes hours as input and a number of miles driven as the output. The function requires a number of miles as the input. Using (miles driven) as an input value for , where gallons of gas depends on miles driven, does make sense. The expression makes sense, and will yield the number of gallons of gas used, , driving a certain number of miles, , in hours.

#### Q&A

**Are there any situations where and 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 from the sun is given by the function . The acceleration of a planet subjected to any force is given by the function . Form a meaningful composition of these two functions, and explain what it means.