2.4: Composition of Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
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
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
Find and simplify the functions
and
Are they the same function?
- Answer
-
No, the functions are not the same.
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“
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

In general,
For example, if
but
These expressions are not equal for all values of x, 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.
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
The domain of the composite function
It is important to realize that the product of functions
Using the functions provided, find
Solution
Let’s begin by substituting
Now we can substitute
We find that
The function
Solution
The inside expression in the composition is
Using
Suppose
Solution
The function
The function
The expression
The expression
Are there any situations where
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
The gravitational force on a planet a distance
- Answer
-
A gravitational force is still a force, so
makes sense as the acceleration of a planet at a distance from the Sun (due to gravity), but does not make sense.
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.
Using Table
1 | 6 | 3 |
2 | 8 | 5 |
3 | 3 | 2 |
4 | 1 | 7 |
Solution
To evaluate
To evaluate
Table
3 | 2 | 8 | 3 | 2 |
Using Table
- Answer
-
and
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 x- and y-axes of the graphs.
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-axis of its graph.
- Read off the output of the inner function from the y-axis of its graph.
- Locate the inner function output on the x-axis of the graph of the outer function.
- Read the output of the outer function from the y-axis of its graph. This is the output of the composite function.
Using Figure

Solution
To evaluate

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

Using Figure
- Answer
-
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
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.
Given
Solution
Because the inside expression is
Then
Analysis
It makes no difference what the input variables
Given
a.
b.
- Answer a
-
8
- Answer b
-
20
Key Equation
- Composite function
Key Concepts
- We can perform algebraic operations on functions. See Example.
- 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. See Example and Example.
- The order of function composition must be considered when interpreting the meaning of composite functions. See Example.
- 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. See Example.
- A composite function can be evaluated from a graph. See Example.
- A composite function can be evaluated from a formula. See Example.
- 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. See Example and Example.
- 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. See Example.
Glossary
- composite function
-
the new function formed by function composition, when the output of one function is used as the input of another