We've updated our

TEXT

# Evaluate a Composition of Functions

### Learning Outcomes

• Evaluate a composition of functions using a table.
• Evaluate a composition of functions using an equation.
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: Using a Table to Evaluate a Composite Function

Using the table below, evaluate $f\left(g\left(3\right)\right)$ and $g\left(f\left(3\right)\right)$.
$x$ $f\left(x\right)$ $g\left(x\right)$
1 6 3
2 8 5
3 3 2
4 1 7

Answer: To evaluate $f\left(g\left(3\right)\right)$, we start from the inside with the input value 3. We then evaluate the inside expression $g\left(3\right)$ using the table that defines the function $g:$ $g\left(3\right)=2$. We can then use that result as the input to the function $f$, so $g\left(3\right)$ is replaced by 2 and we get $f\left(2\right)$. Then, using the table that defines the function $f$, we find that $f\left(2\right)=8$.

\begin{align}&g\left(3\right)=2 \\[1.5mm]& f\left(g\left(3\right)\right)=f\left(2\right)=8\end{align}

To evaluate $g\left(f\left(3\right)\right)$, we first evaluate the inside expression $f\left(3\right)$ using the first table: $f\left(3\right)=3$. Then, using the table for $g$, we can evaluate

$g\left(f\left(3\right)\right)=g\left(3\right)=2$

The table below shows the composite functions $f\circ g$ and $g\circ f$ as tables.
 $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

Using the table below, evaluate $f\left(g\left(1\right)\right)$ and $g\left(f\left(4\right)\right)$.
$x$ $f\left(x\right)$ $g\left(x\right)$
1 6 3
2 8 5
3 3 2
4 1 7

Answer: [latex-display]f\left(g\left(1\right)\right)=f\left(3\right)=3[/latex] and $g\left(f\left(4\right)\right)=g\left(1\right)=3[/latex-display] ## 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 [latex]f\left(g\left(x\right)\right)$. To do this, we will extend our idea of function evaluation. Recall that, when we evaluate a function like $f\left(t\right)={t}^{2}-t$, we substitute the value inside the parentheses into the formula wherever we see the input variable.

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

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

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

Given $f\left(t\right)={t}^{2}-{t}$ and $h\left(x\right)=3x+2$, evaluate $f\left(h\left(1\right)\right)$.

Answer: Because the inside expression is $h\left(1\right)$, we start by evaluating $h\left(x\right)$ at 1.

\begin{align}h\left(1\right)&=3\left(1\right)+2\\[2mm] h\left(1\right)&=5\end{align}

Then $f\left(h\left(1\right)\right)=f\left(5\right)$, so we evaluate $f\left(t\right)$ at an input of 5.

\begin{align}f\left(h\left(1\right)\right)&=f\left(5\right)\\[2mm] f\left(h\left(1\right)\right)&={5}^{2}-5\\[2mm] f\left(h\left(1\right)\right)&=20\end{align}

#### Analysis of the Solution

It makes no difference what the input variables $t$ and $x$ were called in this problem because we evaluated for specific numerical values.

### Try It

Given $f\left(t\right)={t}^{2}-t$ and $h\left(x\right)=3x+2$, evaluate a.  $h\left(f\left(2\right)\right)$ b.  $h\left(f\left(-2\right)\right)$

Answer: a. 8; b. 20 You can check your work with an online graphing calculator. Enter the functions above into an online graphing calculator as they are defined. In the next line enter $h\left(f\left(2\right)\right)$. You should see $=8$ in the bottom right corner.