Composite and Inverse Functions

Composition of Functions

What Is a Composition of Functions?

The composition of functions is defined by using the output of one function as the input of another.

A function is a relation (set of ordered pairs) in which each element of the domain corresponds to exactly one element of the range. The domain of a function is the set of first coordinates of the ordered pairs in the function. A value in the domain of a function is called the input. The range of a function is the set of second coordinates of the ordered pairs in the function. A value in the range of a function is called the output.

Combining two functions by using the output of one as the input for the other is called composition of functions. The composition of functions ff and gg is shown with symbols as:
(fg)(x)=f(g(x))(f \circ g)(x)=f(g(x))
Composite notation uses a small circle, as in (fg)(x)(f \circ g)(x). It can also be written using nested function, as in f(g(x))f(g(x)). Both forms can be read as "ff of gg of xx."

The composition of two functions can be used to solve different types of problems, including conversion problems. If one function converts kilometers to meters and another converts meters to centimeters, then the composition converts kilometers to centimeters.

Step-By-Step Example
Use Composition to Convert Units
Write a function g(x)g(x) for converting kilometers to meters and a function f(x)f(x) for converting meters to centimeters. Then write the composite function f(g(x))f(g(x)) for converting kilometers (km) to centimeters (cm). Show how the simple functions and composite function convert 5 km to centimeters.
Step 1
Write a function g(x)g(x) for converting kilometers to meters.
kilometersmetersg(x)=1,000x\begin{aligned}\text{kilometers}&\rightarrow\text{meters}\\g(x)&=1,\!000x\end{aligned}
Step 2
Write a function f(x)f(x) for converting meters to centimeters.
meterscentimetersf(x)=100x\begin{aligned}\text{meters}&\rightarrow\text{centimeters}\\f(x)&=100x\end{aligned}
Step 3
Write the composite function f(g(x))f(g(x)) for converting kilometers to centimeters.
kilometerscentimetersf(g(x))=f(1,000x)=100(1,000x)=100,000x\begin{aligned}\text{kilometers}&\rightarrow\text{centimeters}\\ f(g(x))&=f(1,\!000x)\\&=100(1,\!000x)\\&=100,\!000x\end{aligned}
Solution
Show how the simple functions and composite function convert 5 km to centimeters.
kilometersmetersg(x)=1,000xg(5)=1,000(5)=5,000\begin{aligned}\text{kilometers}&\rightarrow\text{meters}\\g(x)&=1,\!000x\\g(5)&=1,\!000(5)\\&=5,\!000\end{aligned}
meterscentimetersf(x)=100xf(5,000)=100(5,000)=500,000\begin{aligned}\text{meters}&\rightarrow\text{centimeters}\\f(x)&=100x\\f(5,\!000)&=100(5,\!000)\\&=500,\!000\end{aligned}
kilometerscentimetersf(g(x))=100,000xf(g(5))=100,000(5)=500,000\begin{aligned}\text{kilometers}&\rightarrow\text{centimeters}\\f(g(x))&= 100,\!000x\\f(g(5)) &= 100,\!000(5)\\&=500,\!000\end{aligned}

Evaluating Composite Functions

To evaluate the composition of two functions f(g(x))f(g(x)) for a value of xx, first find g(x)g(x) and then substitute the value in ff, or find a general rule for f(g(x))f(g(x)) and then evaluate for the value of xx.

The composition of two functions f(g(x))f(g(x)) is evaluated by first finding the value of g(x)g(x) and then substituting that value into f(x)f(x) and evaluating. This can be thought of as placing an input into a function to arrive at an output and then using that value as an input of a second function to get a final output.

For example:
f(x)=1003xg(x)=5x+9\begin{aligned}f(x)&=100-3x\\g(x)&=5x+9\end{aligned}
With the initial input 3, the final output is:
f(g(3))=28f(g(3))=28
A general rule for f(g(x))f(g(x)) can be found by replacing the variable in f(x)f(x) with the function rule from g(x)g(x) to find that:
f(g(x))=7315xf(g(x))=73-15x
The general rule yields:
f(g(3))=28f(g(3))=28
Functions depend on the input and output value of a function. To evaluate f(g(3))f(g(3)), input 3 in the function g(x)=5x+9g(x)=5x+9, and then use that output as an input in the function f(x)=1003xf(x)=100-3x.
The functions f(x)f(x) and g(x)g(x) can be composed in different ways. For example, f(g(x))f(g(x)), g(f(x))g(f(x)), and g(g(x))g(g(x)). When evaluating the composition of two functions, always evaluate the inside function first, and then use the result to evaluate the outside function.
Possible compositions of the functions f(x)f(x) and g(x)g(x) include f(g(x))f(g(x)) and g(f(x))g(f(x)). A function can also be composed with itself, as in g(g(x))g(g(x)). In each composition, one function's output serves as the input of the other function.
The composition of functions can also be evaluated using their graphs. The coordinates of points on the graphs of the functions are used to determine the input and output values for each function.
Step-By-Step Example
Evaluating a Composition of Functions from a Graph
Use the graph to identify the function:
(fg)(1)(f\circ g)(-1)
Step 1
Write the composite notation (fg)(1)(f\circ g)(-1) using nested functions.
(fg)(1)=f(g(1))(f\circ g)(-1)=f(g(-1))
Step 2

Use the graph to evaluate the inside function, g(x)g(x), at x=1x=-1 to find g(1)g(-1).

Find the point on the graph of g(x)g(x) where x=1x=-1. Then determine the value of g(x)g(x) at that point. The point is (1,2)(-1,2), so g(1)=2g(-1)=2.
Solution
Substitute and evaluate the outside function, f(x)f(x), at x=2x=2 to identify:
f(g(1))=f(2)f(g(-1))=f(2)
Find the point on the graph of f(x)f(x), where x=2x=2. Then determine the value of f(x)f(x) at that point. The point is (2,4)(2,4), so:
f(2)=f(g(1))=4f(2)=f(g(-1))=4
In composite notation:
(fg)(1)=4(f\circ g)(-1)=4

Determining Composite Functions and Their Domains

To determine the rule for a composite function f(g(x))f(g(x)), substitute g(x)g(x) into f(x)f(x) and simplify. The domain of f(g(x))f(g(x)) is the set of values in the domain of gg for which g(x)g(x) is in the domain of ff.
To write the rule for a composite function, substitution for one function is used. For example, the expression 2x+32x+3 of this given function is the function rule:
g(x)=2x+3g(x)=2x+3
Substituting the function rule into f(x)f(x) results in the rule for a composite function. That means replacing each instance of the variable in the function f(x)f(x) with the expression from g(x)g(x).
Step-By-Step Example
Identifying the Rule for a Composite Function
Use the given functions to identify f(g(x))f(g(x)):
f(x)=x23xf(x)=x^2-3x
g(x)=2x+3g(x)=2x+3
Step 1
Substitute the rule for g(x)g(x) into ff in place of xx.
f(g(x))=(2x+3)23(2x+3)f(g(x))=(2x+3)^2-3(2x+3)
Step 2
Simplify.
f(g(x))=(2x+3)23(2x+3)=(4x2+12x+9)6x9=4x2+6x\begin{aligned}f(g(x))&=(2x+3)^2-3(2x+3)\\&=(4x^2+12x+9)-6x-9\\&=4x^2+6x\end{aligned}
Solution
f(g(x))=4x2+6xf(g(x))=4x^2+6x

The domain of f(g(x))f(g(x)) is all the values of xx that meet the conditions that:

  • xx is in the domain of gg.
  • g(x)g(x) is in the domain of ff.

The domain of f(g(x))f(g(x)) may be all or only part of the domain of gg. When a value in the domain of gg produces an output that is not in the domain of ff, the value is not in the domain of f(g(x))f(g(x)).

To determine the domain of the composite function f(g(x))f(g(x)), write the composite function rule and find its domain. Then consider any values of xx that are not in the domain of gg. A value of xx that makes g(x)g(x) undefined must be excluded from the domain of f(g(x))f(g(x)).

For example, if f(x)=x8f(x)=\sqrt{x-8} and g(x)=x3g(x)=x-3, first find the composite function f(g(x))f(g(x)). Then find its domain.
f(g(x))=(x3)8=x11\begin{aligned}f(g(x))&=\sqrt{(x-3)-8}\\&=\sqrt{x-11}\end{aligned}
The value under the square root cannot be negative, so the domain of f(g(x))f(g(x)) is x11x \geq 11. The domain of gg is all real numbers (all rational and irrational numbers), so there are no other values that must be excluded from the domain of f(g(x))f(g(x)).

There are often values that must be excluded from the domain of the composite function when the separate functions involve rational expressions with the variable in the denominator.

Step-By-Step Example
Determining the Domain of a Composite Function with Rational Expressions
Two functions are given:
f(x)=3xf(x)=\frac{3}{x}
g(x)=1xg(x)=\frac{1}{x}
First, identify the composite function f(g(x))f(g(x)), and then find its domain.
Step 1
Find f(g(x))f(g(x)).
f(g(x))=31xf(g(x))=\frac{3}{\frac{1}{x}}
Step 2
Simplify. Multiply the numerator and denominator by xx.
f(g(x))=31x=3x1xx=3x1=3x\begin{aligned}f(g(x))&=\frac{3}{\frac{1}{x}}\\&=\frac{3\cdot x}{\frac{1}{x}\cdot x}\\&=\frac{3x}{1}\\&=3x\end{aligned}
Solution
Determine the domain of f(g(x))f(g(x)).
f(g(x))=3xf(g(x))=3x
The domain of f(g(x))=3xf(g(x))=3x is all real numbers. However, g(x)g(x) is undefined when x=0x=0 because the value in the denominator of this function cannot be zero:
g(x)=1xg(x)=\frac{1}{x}
This means zero is not in the domain of f(g(x))f(g(x)).

So the domain of f(g(x))f(g(x)) can be written as x0x\neq0.