Composition of Functions
Welcome, students! π In this lesson, you will learn how to combine functions by plugging one function into another. This idea is called composition of functions, and it appears often in AP Precalculus, especially when studying exponential and logarithmic functions. The main goals of this lesson are to explain what composition means, show how to evaluate and interpret composed functions, and connect composition to real-world situations like population growth, pH, and scientific scales. By the end, you should be able to read, build, and simplify compositions such as $f(g(x))$ and understand what they mean. π
What Is Composition of Functions?
A function composition is a way to combine two functions so that the output of one function becomes the input of another. If we have functions $f$ and $g$, then the composition $f(g(x))$ means βapply $g$ first, then apply $f$ to the result.β The order matters. In general, $f(g(x))$ is not the same as $g(f(x))$.
Think of a factory assembly line. First, one machine does a step, and then the next machine uses that result. If $g$ is the first machine and $f$ is the second machine, then the full process is $f(g(x))$. If you switch the order, you may get a different result. This idea is very important in mathematics because many formulas are built in layers.
For example, suppose $g(x)=x+3$ and $f(x)=2x$. Then
$$f(g(x))=f(x+3)=2(x+3)=2x+6$$
but
$$g(f(x))=g(2x)=2x+3$$
These are different expressions, so the order matters. This is one of the biggest ideas in composition. β
Evaluating Compositions Step by Step
To evaluate a composition, start with the inside function. If you see $f(g(4))$, first find $g(4)$, then use that answer as the input for $f$.
Letβs use a clear example. Suppose $f(x)=x^2-1$ and $g(x)=3x$. Then:
$$f(g(2))=f(3 b72)=f(6)=6^2-1=35$$
Here is the process:
- Find $g(2)$.
- Substitute that result into $f$.
- Simplify.
You can also write the composition as an expression. Using the same functions:
$$f(g(x))=f(3x)=(3x)^2-1=9x^2-1$$
This is called simplifying the composition. It turns a two-step function process into one formula.
A common mistake is to apply both functions to $x$ separately. For example, $f(g(x))$ does not mean $f(x)+g(x)$. It means one function inside another. Keeping track of parentheses helps a lot. π§
Domain Matters in Compositions
The domain of a composition depends on two things: the domain of the inside function and the values that the inside function produces. If $g(x)$ creates a value that is not allowed in $f$, then $f(g(x))$ is not defined for that $x$.
For example, if $f(x)=\frac{1}{x}$ and $g(x)=x-2$, then
$$f(g(x))=\frac{1}{x-2}$$
This composition is undefined when $x-2=0$, so $x\neq 2$.
Now consider a logarithmic example. If $f(x)=\ln(x)$ and $g(x)=x^2-4$, then
$$f(g(x))=\ln(x^2-4)$$
Because a logarithm requires a positive input, we must have
$$x^2-4>0$$
So the domain is all $x$ such that $x<-2$ or $x>2$.
This is especially important in AP Precalculus because exponential and logarithmic functions often have restrictions. A logarithm can only take positive inputs, and an expression in the denominator cannot be zero. Composition forces you to check those restrictions carefully. π
Composition with Exponential and Logarithmic Functions
Composition is strongly connected to exponential and logarithmic functions because these families are often inverses of one another. Inverse functions undo each other, and composition is the tool used to show that relationship.
If $f(x)=b^x$ and $g(x)=\log_b(x)$, then they satisfy:
$$f(g(x))=b^{\log_b(x)}=x$$
for $x>0$, and
$$g(f(x))=\log_b(b^x)=x$$
for all real $x$.
This shows that exponential and logarithmic functions reverse each other when composed. That is a major AP Precalculus idea. It explains why logs are useful for solving exponential equations. For example, if you have
$$2^x=10$$
you can take a logarithm of both sides to get
$$\log(2^x)=\log(10)$$
and then use the power property of logarithms:
$$x\log(2)=1$$
so
$$x=\frac{1}{\log(2)}$$
This use of composition helps convert a difficult exponential problem into a solvable algebra problem. π‘
Another useful example is the natural exponential and natural logarithm pair. Since $e^x$ and $\ln(x)$ are inverses,
$$\ln(e^x)=x$$
and
$$e^{\ln(x)}=x$$
for $x>0$ in the second case. These identities come directly from composition.
Real-World Meaning of Composed Functions
Composed functions are useful whenever a quantity depends on another quantity that is itself changing. In real life, one process may depend on a result from another process.
Suppose a scientist models the temperature of a chemical reaction with an exponential function, and then uses a logarithmic function to find a scale value based on that temperature. The full model may be a composition like $h(x)=\log(T(x))$, where $T(x)$ is an exponential temperature function. The first function describes the real-world process, and the second function translates that result into a scale or measurement.
A familiar example is the pH scale. pH is defined using a logarithm of hydrogen ion concentration. If concentration is represented by $c$, then pH can be written as
$$\text{pH}=-\log(c)$$
If concentration itself depends on time, such as $c(t)$, then the pH as a function of time is a composition:
$$\text{pH}(t)=-\log(c(t))$$
This is a real example of a function inside a function. The inside function models the changing concentration, and the outside function converts it into the pH scale.
Another example is population growth. If a population grows exponentially with time and then a policy uses a logarithmic formula to determine a response level, the final model may involve a composition like $R(P(t))$. In many situations, the exact formulas are less important than understanding the layered structure. students, the key question is always: Which function happens first, and what does the output mean? π
How to Recognize and Build Compositions on AP Precalculus
On AP Precalculus, you may be asked to do several things with compositions:
- evaluate a composition at a number,
- simplify a composition algebraically,
- find the domain of a composition,
- interpret the meaning of the composition in context,
- and connect compositions to inverse exponential and logarithmic functions.
A reliable strategy is:
- Identify the inside function.
- Substitute it into the outside function.
- Simplify carefully.
- Check restrictions on the domain.
- Interpret the result.
For example, let $f(x)=\log(x)$ and $g(x)=x^2+1$. Then
$$f(g(x))=\log(x^2+1)$$
Since $x^2+1>0$ for every real number $x$, the domain is all real numbers.
Now reverse the order:
$$g(f(x))=(\log x)^2+1$$
This requires $x>0$ because the logarithm must have positive input. The outputs are not the same, and the domains are not the same either. That is why composition must be handled with care.
Another common AP-style question is to connect composition with inverse functions. If $f$ and $f^{-1}$ are inverses, then
$$f(f^{-1}(x))=x$$
and
$$f^{-1}(f(x))=x$$
within the appropriate domain. This is one of the most important ways composition is used in exponential and logarithmic contexts. β¨
Conclusion
Composition of functions is the process of putting one function inside another. It helps you model situations in steps, simplify complex rules, and understand how exponential and logarithmic functions relate to each other. The order of functions matters, the domain must be checked, and inverse pairs often rely on composition to show that they undo each other. In AP Precalculus, these ideas appear in equations, graphs, and real-world situations. If you can evaluate $f(g(x))$, simplify it, and explain its meaning, you have a strong foundation for this part of the course. Keep practicing, students, and remember that every composition tells a story of one process feeding into another. π
Study Notes
- Composition of functions means using the output of one function as the input of another: $f(g(x))$.
- The order matters: in general, $f(g(x))\neq g(f(x))$.
- To evaluate a composition, find the inside function first, then use that result in the outside function.
- To simplify a composition, substitute the inside expression into the outside function and simplify carefully.
- The domain of a composition must satisfy the rules of both functions.
- Logarithmic compositions require positive inputs, such as $\ln(x^2-4)$ needing $x^2-4>0$.
- Exponential and logarithmic functions are inverse functions, so their compositions often simplify to $x$, such as $\ln(e^x)=x$.
- Compositions are useful for modeling real-world situations where one quantity depends on another changing quantity.
- AP Precalculus may ask you to evaluate, simplify, interpret, or find the domain of a composition.
- Always ask: Which function happens first, and what does the output become?
