AP Precalculus -2.7 Composition of Functions- Study Notes - Effective Fall 2023
AP Precalculus -2.7 Composition of Functions- Study Notes – Effective Fall 2023
AP Precalculus -2.7 Composition of Functions- Study Notes – AP Precalculus- per latest AP Precalculus Syllabus.
LEARNING OBJECTIVE
Evaluate the composition of two or more functions for given values.
Construct a representation of the composition of two or more functions.
Rewrite a given function as a composition of two or more functions.
Key Concepts:
Composite Functions and Domain Restrictions
Evaluating Composite Functions Using Multiple Representations
Non-Commutativity of Function Composition
The Identity Function and Function Composition
Using Function Composition to Relate Quantities
Constructing Analytic Representations of Composite Functions
Numerical and Graphical Representations of Composite Functions
Decomposing Functions into Simpler Functions
Additive Transformations as Function Composition
Multiplicative Transformations as Function Composition
Composite Functions and Domain Restrictions
If \( \mathrm{f} \) and \( \mathrm{g} \) are functions, the composite function \( \mathrm{f \circ g} \) maps a set of input values to a set of output values by using the output of \( \mathrm{g} \) as the input of \( \mathrm{f} \).
The composite function is written as
![]()
\( \mathrm{ \displaystyle (f \circ g)(x) = f(g(x)) } \)
This notation emphasizes the order of operations: evaluate \( \mathrm{g(x)} \) first, then substitute the result into \( \mathrm{f} \).
Domain of a Composite Function
The domain of \( \mathrm{f \circ g} \) is restricted because:
![]()
• \( \mathrm{x} \) must be in the domain of \( \mathrm{g} \)
• \( \mathrm{g(x)} \) must be in the domain of \( \mathrm{f} \)
Therefore, the domain of \( \mathrm{f \circ g} \) consists of all input values of \( \mathrm{g} \) for which the corresponding output lies in the domain of \( \mathrm{f} \).
Example
Let
\( \mathrm{ \displaystyle g(x) = x – 1 } \)
\( \mathrm{ \displaystyle f(x) = \sqrt{x} } \)
Find \( \mathrm{(f \circ g)(x)} \) and its domain.
▶️ Answer/Explanation
Form the composite:
\( \mathrm{ \displaystyle (f \circ g)(x) = f(g(x)) = \sqrt{x – 1} } \)
For the square root to be defined, the input must be nonnegative:
\( \mathrm{ \displaystyle x – 1 \ge 0 \Rightarrow x \ge 1 } \)
Conclusion
\( \mathrm{(f \circ g)(x) = \sqrt{x – 1}} \) with domain \( \mathrm{x \ge 1} \).
Example
Let
\( \mathrm{ \displaystyle g(x) = \dfrac{1}{x} } \)
\( \mathrm{ \displaystyle f(x) = x^2 + 3 } \)
Find \( \mathrm{(f \circ g)(x)} \) and describe its domain.
▶️ Answer/Explanation
Form the composite:
\( \mathrm{ \displaystyle (f \circ g)(x) = f\!\left(\dfrac{1}{x}\right) = \left(\dfrac{1}{x}\right)^2 + 3 } \)
Simplify:
\( \mathrm{ \displaystyle (f \circ g)(x) = \dfrac{1}{x^2} + 3 } \)
The function \( \mathrm{g(x) = \tfrac{1}{x}} \) is undefined at \( \mathrm{x = 0} \).
Conclusion
\( \mathrm{(f \circ g)(x) = \dfrac{1}{x^2} + 3} \) with domain \( \mathrm{x \ne 0} \).
Evaluating Composite Functions Using Multiple Representations
Values of a composite function \( \mathrm{f \circ g} \) can be calculated or estimated by using the output values of \( \mathrm{g} \) as the input values of \( \mathrm{f} \).
The composite function is written as![]()
\( \mathrm{ \displaystyle (f \circ g)(x) = f(g(x)) } \)
This process can be carried out using different representations of the functions:
• Analytical: substitute expressions algebraically
• Numerical: use tables of values
• Graphical: read outputs from graphs
• Verbal: follow descriptions of how quantities change
In every case, the key idea is the same: evaluate \( \mathrm{g} \) first, then apply \( \mathrm{f} \).
Example
Let
\( \mathrm{ \displaystyle g(x) = 2x + 1 } \)
\( \mathrm{ \displaystyle f(x) = x^2 } \)
Find \( \mathrm{(f \circ g)(3)} \).
▶️ Answer/Explanation
First evaluate \( \mathrm{g(3)} \):
\( \mathrm{ \displaystyle g(3) = 2(3) + 1 = 7 } \)
Then use this value as the input for \( \mathrm{f} \):
\( \mathrm{ \displaystyle f(7) = 7^2 = 49 } \)
Conclusion
\( \mathrm{(f \circ g)(3) = 49} \).
Example
A table shows values of a function \( \mathrm{g} \):
\( \mathrm{g(1) = 4,\; g(2) = 6} \)
A graph of \( \mathrm{f} \) shows that
\( \mathrm{f(4) = 10,\; f(6) = 18} \)
Estimate \( \mathrm{(f \circ g)(2)} \).
▶️ Answer/Explanation
From the table,
\( \mathrm{g(2) = 6} \)
Using the graph of \( \mathrm{f} \),
\( \mathrm{f(6) \approx 18} \)
Conclusion
\( \mathrm{(f \circ g)(2) \approx 18} \).
Non-Commutativity of Function Composition
The composition of functions is not commutative. This means that, in general, changing the order in which two functions are composed changes the result.
If \( \mathrm{f} \) and \( \mathrm{g} \) are functions, then![]()
\( \mathrm{ \displaystyle (f \circ g)(x) = f(g(x)) } \)
and
\( \mathrm{ \displaystyle (g \circ f)(x) = g(f(x)) } \)
Because the output of the first function becomes the input of the second, reversing the order usually produces a different expression and different values.
As a result,
• \( \mathrm{(f \circ g)(x) \ne (g \circ f)(x)} \) in general
• \( \mathrm{f(g(x))} \) and \( \mathrm{g(f(x))} \) usually represent different values
This contrasts with addition and multiplication of numbers, which are commutative.
Example
Let
\( \mathrm{ \displaystyle f(x) = x + 3 } \)
\( \mathrm{ \displaystyle g(x) = 2x } \)
Find \( \mathrm{(f \circ g)(x)} \) and \( \mathrm{(g \circ f)(x)} \).
▶️ Answer/Explanation
Compute \( \mathrm{(f \circ g)(x)} \):
\( \mathrm{ \displaystyle f(g(x)) = f(2x) = 2x + 3 } \)
Compute \( \mathrm{(g \circ f)(x)} \):
\( \mathrm{ \displaystyle g(f(x)) = g(x + 3) = 2(x + 3) = 2x + 6 } \)
Conclusion
Since \( \mathrm{2x + 3 \ne 2x + 6} \), the compositions are different.
Example
Let
\( \mathrm{ \displaystyle f(x) = x^2 } \)
\( \mathrm{ \displaystyle g(x) = x – 1 } \)
Evaluate \( \mathrm{(f \circ g)(2)} \) and \( \mathrm{(g \circ f)(2)} \).
▶️ Answer/Explanation
First, compute \( \mathrm{(f \circ g)(2)} \):
\( \mathrm{ \displaystyle g(2) = 1 } \)
\( \mathrm{ \displaystyle f(1) = 1 } \)
So \( \mathrm{(f \circ g)(2) = 1} \).
Now compute \( \mathrm{(g \circ f)(2)} \):
\( \mathrm{ \displaystyle f(2) = 4 } \)
\( \mathrm{ \displaystyle g(4) = 3 } \)
Conclusion
Since \( \mathrm{1 \ne 3} \), the two compositions produce different values.
The Identity Function and Function Composition
The function defined by ![]()
\( \mathrm{ \displaystyle f(x) = x } \)
is called the identity function.
When the identity function is composed with any function \( \mathrm{g} \), the resulting composite function is unchanged:
\( \mathrm{ \displaystyle g(f(x)) = g(x) } \)
\( \mathrm{ \displaystyle f(g(x)) = g(x) } \)
Thus, composing any function with the identity function leaves the function exactly the same.![]()
The identity function plays a special role in composition, similar to how:
• 0 is the additive identity, since \( \mathrm{x + 0 = x} \)
• 1 is the multiplicative identity, since \( \mathrm{x \cdot 1 = x} \)
Likewise, the identity function is the identity element for function composition.
Example
Let
\( \mathrm{ \displaystyle g(x) = 3x – 5 } \)
Verify that composing \( \mathrm{g} \) with the identity function leaves \( \mathrm{g} \) unchanged.
▶️ Answer/Explanation
Using \( \mathrm{f(x) = x} \):
\( \mathrm{ \displaystyle g(f(x)) = g(x) = 3x – 5 } \)
\( \mathrm{ \displaystyle f(g(x)) = g(x) = 3x – 5 } \)
Conclusion
Composing with the identity function does not change the function.
Example
Let
\( \mathrm{ \displaystyle g(x) = x^2 + 1 } \)
Evaluate both compositions with the identity function.
▶️ Answer/Explanation
\( \mathrm{ \displaystyle g(f(x)) = g(x) = x^2 + 1 } \)
\( \mathrm{ \displaystyle f(g(x)) = g(x) = x^2 + 1 } \)
Conclusion
The identity function behaves like a “do nothing” operation in composition.
Using Function Composition to Relate Quantities
Function composition is especially useful when two quantities are not directly related by a single formula but are instead connected through one or more intermediate quantities.
If one quantity depends on a second quantity, and the second quantity depends on a third, then composition allows us to build a model that directly relates the first and third quantities.
Mathematically, if
\( \mathrm{ \displaystyle y = g(x) } \)
and
\( \mathrm{ \displaystyle z = f(y) } \)
then composition produces a direct relationship between \( \mathrm{x} \) and \( \mathrm{z} \):
\( \mathrm{ \displaystyle z = (f \circ g)(x) = f(g(x)) } \)
This approach is common in contextual problems involving unit conversions, multi-step processes, and applied modeling.
Example
A factory produces metal rods. The length of a rod depends on the time the machine runs, and the mass of the rod depends on its length.
The relationships are:
\( \mathrm{ \displaystyle L(t) = 4t } \) (length in cm after \( \mathrm{t} \) minutes)
\( \mathrm{ \displaystyle M(L) = 0.8L } \) (mass in grams from length)
Find a function that directly relates mass to time.
▶️ Answer/Explanation
Compose \( \mathrm{M} \) with \( \mathrm{L} \):
\( \mathrm{ \displaystyle (M \circ L)(t) = M(L(t)) = 0.8(4t) } \)
\( \mathrm{ \displaystyle (M \circ L)(t) = 3.2t } \)
Conclusion
The mass of the rod is directly related to time by \( \mathrm{M(t) = 3.2t} \).
Example
The temperature in Celsius depends on the temperature in Fahrenheit, and the pressure of a gas depends on the temperature in Celsius.
The relationships are:
\( \mathrm{ \displaystyle C(F) = \dfrac{5}{9}(F – 32) } \)
\( \mathrm{ \displaystyle P(C) = 2C + 100 } \)
Find a function that gives pressure directly in terms of Fahrenheit temperature.
▶️ Answer/Explanation
Compose \( \mathrm{P} \) with \( \mathrm{C} \):
\( \mathrm{ \displaystyle (P \circ C)(F) = 2\!\left(\dfrac{5}{9}(F – 32)\right) + 100 } \)
This expression directly relates pressure to Fahrenheit temperature.
Conclusion
Function composition allows quantities to be related even when no single direct formula is initially available.
Constructing Analytic Representations of Composite Functions
When analytic representations of the functions \( \mathrm{f} \) and \( \mathrm{g} \) are available, an analytic representation of the composite function \( \mathrm{f(g(x))} \) can be constructed by substituting \( \mathrm{g(x)} \) for every instance of \( \mathrm{x} \) in \( \mathrm{f} \).
This process directly reflects the definition of composition:
\( \mathrm{ \displaystyle (f \circ g)(x) = f(g(x)) } \)
Algebraic substitution is used to combine the two function rules into a single expression.
Procedure
• Write the formula for \( \mathrm{f(x)} \)
• Replace every \( \mathrm{x} \) in \( \mathrm{f} \) with \( \mathrm{g(x)} \)
• Simplify the resulting expression
Example
Let
\( \mathrm{ \displaystyle f(x) = x^2 + 1 } \)
\( \mathrm{ \displaystyle g(x) = 3x – 4 } \)
Find an analytic representation of \( \mathrm{(f \circ g)(x)} \).
▶️ Answer/Explanation
Substitute \( \mathrm{g(x)} \) into \( \mathrm{f} \):
\( \mathrm{ \displaystyle (f \circ g)(x) = f(3x – 4) } \)
\( \mathrm{ \displaystyle (f \circ g)(x) = (3x – 4)^2 + 1 } \)
Simplify:
\( \mathrm{ \displaystyle (f \circ g)(x) = 9x^2 – 24x + 16 + 1 } \)
\( \mathrm{ \displaystyle (f \circ g)(x) = 9x^2 – 24x + 17 } \)
Conclusion
The analytic form of the composite function is \( \mathrm{(f \circ g)(x) = 9x^2 – 24x + 17} \).
Example
Let
\( \mathrm{ \displaystyle f(x) = \sqrt{x} } \)
\( \mathrm{ \displaystyle g(x) = x + 5 } \)
Write an analytic representation of \( \mathrm{(f \circ g)(x)} \) and state its domain.
▶️ Answer/Explanation
\( \mathrm{ \displaystyle (f \circ g)(x) = \sqrt{x + 5} } \)
For the square root to be defined:
\( \mathrm{ \displaystyle x + 5 \ge 0 \Rightarrow x \ge -5 } \)
Conclusion
The composite function is defined for \( \mathrm{x \ge -5} \).
Numerical and Graphical Representations of Composite Functions
A numerical or graphical representation of a composite function \( \mathrm{f \circ g} \) can often be constructed by calculating or estimating ordered pairs of the form![]()
\( \mathrm{ \displaystyle (x,\; f(g(x))) } \)
This process follows the definition of composition: for each input value \( \mathrm{x} \), the value of \( \mathrm{g(x)} \) is found first, and that output is then used as the input to \( \mathrm{f} \).
By repeating this process for several input values, a table of values can be created. Plotting these points produces a graphical representation of the composite function.
This approach is especially useful when:
• the functions are given by tables or graphs rather than formulas
• exact algebraic expressions are difficult to obtain
Example
The table below gives values of \( \mathrm{g} \) and \( \mathrm{f} \):
\( \mathrm{ g(1)=2,\; g(2)=4,\; g(3)=5 } \)
\( \mathrm{ f(2)=6,\; f(4)=12,\; f(5)=15 } \)
Construct a numerical representation of \( \mathrm{(f \circ g)} \).
▶️ Answer/Explanation
Evaluate \( \mathrm{f(g(x))} \) for each input:
\( \mathrm{(f \circ g)(1)=f(2)=6} \)
\( \mathrm{(f \circ g)(2)=f(4)=12} \)
\( \mathrm{(f \circ g)(3)=f(5)=15} \)
Conclusion
The composite function includes the points \( \mathrm{(1,6),\; (2,12),\; (3,15)} \).
Example
The graph of \( \mathrm{g} \) shows that \( \mathrm{g(0)=1} \) and \( \mathrm{g(2)=3} \).
The graph of \( \mathrm{f} \) shows that \( \mathrm{f(1)=4} \) and \( \mathrm{f(3)=10} \).
Estimate values of \( \mathrm{(f \circ g)} \).
▶️ Answer/Explanation
Using the graphs:
\( \mathrm{(f \circ g)(0)=f(1)=4} \)
\( \mathrm{(f \circ g)(2)=f(3)=10} \)
Conclusion
The composite function includes approximate points \( \mathrm{(0,4)} \) and \( \mathrm{(2,10)} \), which can be plotted to form its graph.
Decomposing Functions into Simpler Functions
Functions given analytically can often be expressed as the composition of two or more simpler functions. This process is called function decomposition.
If a function can be written in the form
\( \mathrm{ \displaystyle h(x) = f(g(x)) } \)
then the function \( \mathrm{h} \) has been decomposed into two functions \( \mathrm{g} \) (the inner function) and \( \mathrm{f} \) (the outer function).
When a function is properly decomposed, the variable in the outer function replaces every instance of the inner function. That is, the output of the inner function becomes the input of the outer function.
Decomposition is useful for:
• understanding the structure of complex functions
• analyzing transformations
• identifying domain restrictions
Example
Decompose the function
\( \mathrm{ \displaystyle h(x) = (3x – 2)^2 } \)
▶️ Answer/Explanation
Identify the inner expression:
\( \mathrm{ \displaystyle g(x) = 3x – 2 } \)
Identify the outer operation:
\( \mathrm{ \displaystyle f(x) = x^2 } \)
Write the composition:
\( \mathrm{ \displaystyle h(x) = f(g(x)) } \)
Conclusion
The function is the square of the linear function \( \mathrm{3x – 2} \).
Example
Decompose the function
\( \mathrm{ \displaystyle h(x) = \sqrt{5x + 1} } \)
▶️ Answer/Explanation
Choose the inner function as the expression inside the square root:
\( \mathrm{ \displaystyle g(x) = 5x + 1 } \)
Choose the outer function as the square root:
\( \mathrm{ \displaystyle f(x) = \sqrt{x} } \)
Write the composition:
\( \mathrm{ \displaystyle h(x) = f(g(x)) } \)
Conclusion
The square root function is applied to the linear function \( \mathrm{5x + 1} \).
Additive Transformations as Function Composition
An additive transformation of a function \( \mathrm{f} \) that produces vertical or horizontal translations can be understood using function composition.
![]()
Consider the function
\( \mathrm{ \displaystyle g(x) = x + k } \)
where \( \mathrm{k} \) is a real number.
When this function is composed with \( \mathrm{f} \), it results in a horizontal translation:
\( \mathrm{ \displaystyle (f \circ g)(x) = f(x + k) } \)
This shifts the graph of \( \mathrm{f} \) left by \( \mathrm{k} \) units if \( \mathrm{k > 0} \), and right by \( \mathrm{|k|} \) units if \( \mathrm{k < 0} \).
A vertical translation occurs when a constant is added to the output of the function:
\( \mathrm{ \displaystyle f(x) + k } \)
Thus, additive transformations can be interpreted through composition and direct addition, providing a structured way to analyze graph shifts.
Example
Let
\( \mathrm{ \displaystyle f(x) = x^2 } \)
Describe the transformation represented by
\( \mathrm{ \displaystyle f(x + 3) } \)
▶️ Answer/Explanation
Here, \( \mathrm{g(x) = x + 3} \).
The composite function is
\( \mathrm{ \displaystyle (f \circ g)(x) = f(x + 3) } \)
Conclusion
The graph of \( \mathrm{f(x) = x^2} \) is shifted 3 units to the left.
Example
Let
\( \mathrm{ \displaystyle f(x) = \sqrt{x} } \)
Describe the transformation represented by
\( \mathrm{ \displaystyle f(x – 2) + 4 } \)
▶️ Answer/Explanation
The expression \( \mathrm{f(x – 2)} \) represents a horizontal shift.
Since \( \mathrm{x – 2 = x + (-2)} \), the graph shifts 2 units to the right.
The \( \mathrm{+4} \) outside the function causes a vertical shift upward by 4 units.
Conclusion
The graph of \( \mathrm{f(x)} \) is shifted right 2 units and up 4 units.
Multiplicative Transformations as Function Composition
A multiplicative transformation of a function \( \mathrm{f} \) that produces vertical or horizontal dilations can be understood using function composition.![]()
Consider the function
\( \mathrm{ \displaystyle g(x) = kx } \)
where \( \mathrm{k \ne 0} \) is a real number.
When this function is composed with \( \mathrm{f} \), it results in a horizontal dilation:
\( \mathrm{ \displaystyle (f \circ g)(x) = f(kx) } \)
The graph of \( \mathrm{f(x)} \) is horizontally scaled by a factor of
\( \mathrm{ \displaystyle \left| \dfrac{1}{k} \right| } \)
If \( \mathrm{|k| > 1} \), the graph is compressed horizontally. If \( \mathrm{0 < |k| < 1} \), the graph is stretched horizontally.
![]()
If \( \mathrm{k < 0} \), the transformation also includes a reflection across the y-axis.
A vertical dilation occurs when the output of the function is multiplied by a constant:
\( \mathrm{ \displaystyle kf(x) } \)
If \( \mathrm{|k| > 1} \), the graph is stretched vertically. If \( \mathrm{0 < |k| < 1} \), the graph is compressed vertically. If \( \mathrm{k < 0} \), the graph is reflected across the x-axis.
Thus, multiplicative transformations can be interpreted through composition with \( \mathrm{g(x)=kx} \) and multiplication of function outputs.
Example
Let
\( \mathrm{ \displaystyle f(x) = x^2 } \)
Describe the transformation represented by
\( \mathrm{ \displaystyle f(2x) } \)
▶️ Answer/Explanation
Here, \( \mathrm{g(x)=2x} \).
The composite function is
\( \mathrm{ \displaystyle (f \circ g)(x) = f(2x) } \)
Conclusion
The graph of \( \mathrm{f(x)} \) is horizontally compressed by a factor of \( \mathrm{\tfrac{1}{2}} \).
Example
Let
\( \mathrm{ \displaystyle f(x) = \sqrt{x} } \)
Describe the transformation represented by
\( \mathrm{ \displaystyle 3f(x) } \)
▶️ Answer/Explanation
The expression multiplies all output values by 3.
This results in a vertical stretch by a factor of 3.
Conclusion
The graph of \( \mathrm{f(x)} \) is stretched vertically.
