Home

Tutoring

Subjects

Live Classes

Study Coach

Essay Review

On-Demand Courses

Colleges

Games

Opening subject page...

Loading your content

  1. AP Precalculus
  2. Composition of Functions

AP PRECALCULUS • EXPONENTIAL AND LOGARITHMIC FUNCTIONS

Composition of Functions

Chaining functions together to model complex real-world processes where one quantity drives another.

SECTION 1

Historical Context & Motivation

The idea of applying one function's output as the input to another function — what we now call composition of functions — is deeply woven into the history of mathematics. Ancient Babylonian scribes chained arithmetic operations in sequence to compute taxes and land areas, effectively composing simple functions long before the concept received formal notation. The modern idea crystallized only after mathematicians developed a rigorous notion of function itself, a journey that spanned from Leibniz's early use of the word "function" in the late 1600s through Dirichlet's domain-based definition in the 1830s. Composition became indispensable once exponential and logarithmic relationships entered applied science: Euler showed that the logarithm inverts the exponential precisely because composing the two yields the identity, a principle that underpins everything from slide-rule computation to modern data transformations.

1694
Leibniz Coins "Function"
Gottfried Wilhelm Leibniz introduces the term "function" to describe quantities dependent on a variable, laying the linguistic groundwork for discussing compositions.
1748
Euler's Introductio in Analysin Infinitorum
Leonhard Euler systematizes exponential and logarithmic functions and demonstrates that ln(eˣ) = x, establishing the inverse relationship via composition.
1837
Dirichlet's Modern Definition
Peter Gustav Lejeune Dirichlet formalizes the function concept as an arbitrary mapping from domain to range, enabling a precise definition of composition including domain restrictions.
1930s
Bourbaki & Formal Notation
The Bourbaki group standardizes the notation (f ∘ g)(x) = f(g(x)) and integrates composition into the axiomatic foundations of set theory and algebra.

Why does composition matter so much in a precalculus course focused on exponential and logarithmic functions? The answer is practical and theoretical. In applications — radioactive decay feeding into a dosage model, or interest rates compounding within an inflation adjustment — one function's output naturally becomes the next function's input. Understanding how to build, evaluate, and decompose these chains is essential both for the AP Precalculus exam and for the calculus concept of the chain rule that follows.

SECTION 2

Core Principles & Definitions

Function composition creates a new function by feeding the entire output of one function into a second function. This seemingly simple operation carries several subtleties — order matters, domains must be checked, and the resulting behavior can be qualitatively different from either component function alone. The following foundational ideas anchor every composition problem you will encounter on the AP Precalculus exam.

1

Definition of (f ∘ g)(x)

The composition (f ∘ g)(x) means "first apply g, then apply f," which equals f(g(x)). The inner function g acts on x first, and its output is handed to the outer function f.
2

Domain Restriction

The domain of f ∘ g consists of all x in the domain of g for which g(x) is also in the domain of f. Both conditions must be satisfied simultaneously.
3

Non-Commutativity

In general, f ∘ g ≠ g ∘ f. The order of composition matters: squaring then adding 1 yields a different function from adding 1 then squaring.
4

Inverse Functions as Compositions

If f and g are inverses of each other, then (f ∘ g)(x) = x and (g ∘ f)(x) = x on the appropriate domains. This is the formal test for inverse pairs such as eˣ and ln x.
5

Decomposition

Any complex function can be decomposed into simpler composed parts. Recognizing h(x) = f(g(x)) is critical for simplification, graphing, and future calculus applications like the chain rule.
✦ KEY TAKEAWAY
Think of function composition like a manufacturing assembly line. Raw material (the input x) enters Machine G first, which shapes it into g(x). That intermediate product is immediately fed into Machine F, which produces the final product f(g(x)). Reversing the machine order generally yields a completely different product — just as f ∘ g and g ∘ f typically differ.
SECTION 3

Visual Explanation — The Composition Pipeline

Composition Pipeline: (f ∘ g)(x) = f(g(x))InputxInner Functiong(x)Applied FIRSTg(x) outputOuter Functionf(·)Applied SECONDFinal Outputf(g(x))Example: f(x) = eˣ, g(x) = 2x + 1x = 3Inputg(3) = 72(3) + 1 = 7f(7) = e⁷ ≈ 1096.6Outer function on 7
The composition pipeline shows the flow from input x through the inner function g (applied first) to the outer function f (applied second). The bottom row traces a concrete numeric example: x = 3 enters g(x) = 2x + 1 to produce 7, which then enters f(x) = eˣ to yield e⁷ ≈ 1096.6.

The diagram above emphasizes the directional flow that is the essence of composition. Notice that the inner function g is colored in green and labeled "Applied FIRST," while the outer function f is in violet and labeled "Applied SECOND." Students often confuse the reading order of the notation (f ∘ g)(x) — which reads left-to-right — with the evaluation order, which moves right-to-left (or inside-out). The pipeline makes the correct order unmistakable. The concrete example at the bottom anchors the abstraction: a linear function feeds into an exponential, amplifying a modest change in x into a dramatically larger output. This pattern of a linear-to-exponential composition arises frequently in modeling scenarios such as continuously compounded interest, where the interest rate expression is linear in time but the growth mechanism is exponential.

SECTION 4

Mathematical Framework

The formal definition of composition introduces notation you must master for the AP exam, particularly when exponential and logarithmic functions are involved. We begin with the general definition and then specialize it to the most commonly tested compositions.

GENERAL COMPOSITION
(f ∘ g)(x) = f(g(x))
where x must be in the domain of g, and g(x) must be in the domain of f. The set of all such x values is the domain of f ∘ g.
EXPONENTIAL–LOGARITHMIC INVERSE COMPOSITION
ln(eˣ) = x and e^(ln x) = x (for x > 0)
These identities hold because f(x) = eˣ and g(x) = ln x are inverse functions, so f ∘ g and g ∘ f both equal the identity function on their respective domains.
GENERAL BASE INVERSE PAIR
log_b(bˣ) = x and b^(log_b x) = x (b > 0, b ≠ 1, x > 0)
Here b is any valid logarithmic base. The composition of a base-b exponential with its corresponding logarithm always yields the identity, which is how we solve exponential and logarithmic equations.

A critical skill tested on the AP Precalculus exam is determining the domain of a composed function. Consider h(x) = ln(4 − x²). Here the outer function is f(u) = ln u, whose domain requires u > 0, and the inner function is g(x) = 4 − x², which is defined for all real x. We need g(x) > 0, so 4 − x² > 0, giving −2 < x < 2. The domain of h is (−2, 2). Identifying these restrictions quickly and accurately is essential for both multiple-choice and free-response items.

DOMAIN RULE FOR COMPOSITION
Dom(f ∘ g) = { x ∈ Dom(g) : g(x) ∈ Dom(f) }
Read: the domain of f ∘ g is the set of all x values that are in the domain of g and whose image under g lands in the domain of f. Always check both conditions.
SECTION 5

Decomposition & Common Composition Types

While composition builds complex functions from simpler parts, decomposition is the reverse process: recognizing a given function as a composition of two or more simpler functions. Decomposition is a powerful analytical technique because it reveals the internal structure of a function, clarifies domain restrictions, and prepares you for the chain rule in calculus. On the AP Precalculus exam, you may be asked to identify the inner and outer functions of a composition, or to verify that a proposed decomposition is valid by recomposing and checking.

Common Composition Types in AP PrecalculusLinear → Exponentialh(x) = e^(2x+1)f(u) = eᵘg(x) = 2x + 1Quadratic → Logarithmich(x) = ln(x² + 1)f(u) = ln ug(x) = x² + 1Exponential → Powerh(x) = (eˣ)³ = e^(3x)f(u) = u³g(x) = eˣLog → Log (Change of Base)log₂ x = ln x / ln 2f(u) = u / ln 2g(x) = ln xInverse Compositione^(ln x) = xf(u) = eᵘg(x) = ln xTrig → Exponentialh(x) = e^(sin x)f(u) = eᵘg(x) = sin xDomain Considerations Quick Reference● Linear → Exp: All reals● Log → Log: x > 0● Quad → Log: Need g(x) > 0● Inverse: Restricted by inner● Exp → Power: All reals● Trig → Exp: All realsAlways verify: x ∈ Dom(g) and g(x) ∈ Dom(f)
Six commonly tested composition types are shown with their decompositions into outer function f and inner function g. The bottom reference panel summarizes the domain implications of each pairing. Note that when a logarithm serves as the outer function, the inner function's range must be restricted to positive values.

The six composition types shown in the diagram cover the vast majority of what appears on the AP Precalculus exam. Several important patterns deserve attention. First, when the outer function is a logarithm, the domain of the composition is dictated by the requirement that the inner function's output be strictly positive; for instance, ln(x² + 1) is defined for all real x because x² + 1 > 0 always, whereas ln(x² − 4) requires |x| > 2. Second, decomposition is not unique — you could write e^(2x+1) as f(u) = eᵘ with g(x) = 2x + 1, or equivalently as f(u) = e · e²ᵘ with g(x) = x — but the most useful decomposition is the one that isolates the simplest meaningful inner function. Third, the inverse composition e^(ln x) = x is a powerful tool for solving equations: to isolate a variable trapped inside a logarithm, exponentiate both sides, and vice versa.

SECTION 6

Worked Example

Let us work through a multi-part problem that combines composition, domain analysis, and the interplay between exponential and logarithmic functions — exactly the blend the AP Precalculus exam favors.

Composing Exponential and Logarithmic Functions

Step 1 — State the Functions

Let f(x) = e^(2x) and g(x) = ln(x − 3). We are asked to find (f ∘ g)(x), state its domain, and simplify.

Step 2 — Apply the Composition Definition

By definition, (f ∘ g)(x) = f(g(x)). We substitute g(x) into f: f(g(x)) = f(ln(x − 3)) = e^(2 · ln(x − 3)).
(f ∘ g)(x) = e^(2 ln(x − 3))

Step 3 — Simplify Using Logarithm Properties

Recall the power rule for logarithms: a · ln u = ln(u^a). Thus 2 · ln(x − 3) = ln((x − 3)²). Now apply the inverse identity e^(ln w) = w, giving e^(ln((x − 3)²)) = (x − 3)².
(f ∘ g)(x) = (x − 3)²

Step 4 — Determine the Domain

The domain of g(x) = ln(x − 3) requires x − 3 > 0, so x > 3. The output g(x) = ln(x − 3) can be any real number, which is always in the domain of f(x) = e^(2x). Therefore the domain of (f ∘ g)(x) is (3, ∞). Crucially, even though (x − 3)² is defined for all real x, the composed function is only valid for x > 3 because the intermediate step through ln(x − 3) restricts the input.
Domain: x > 3, or (3, ∞)

Step 5 — Verify with a Numeric Check

Choose x = 4. Then g(4) = ln(4 − 3) = ln 1 = 0, and f(0) = e^(2·0) = e⁰ = 1. Also, (4 − 3)² = 1² = 1. The simplified form agrees with the direct evaluation, confirming our work.
✓ Both paths yield 1 when x = 4
⚠ AP Exam Tip
Even when the simplified expression appears to have a larger domain, always state the domain based on the original composed functions. The AP scoring rubric specifically deducts points for failing to restrict the domain to values valid for the inner function.
SECTION 7

Composition vs. Other Operations on Functions

Students sometimes confuse composition with multiplication or other arithmetic combinations of functions. The table below clarifies how composition differs from these operations and when each is most useful.

Comparison of function operations
OperationNotation & DefinitionDomainExample with f = eˣ, g = ln x
Composition(f ∘ g)(x) = f(g(x))x ∈ Dom(g) and g(x) ∈ Dom(f)e^(ln x) = x, domain: x > 0
Product(f · g)(x) = f(x) · g(x)Dom(f) ∩ Dom(g)eˣ · ln x, domain: x > 0
Sum(f + g)(x) = f(x) + g(x)Dom(f) ∩ Dom(g)eˣ + ln x, domain: x > 0
Quotient(f / g)(x) = f(x) / g(x)Dom(f) ∩ Dom(g), g(x) ≠ 0eˣ / ln x, domain: x > 0 and x ≠ 1
✦ KEY TAKEAWAY
The product f · g asks, "What if I run both machines independently on the same raw material and multiply their outputs?" Composition f ∘ g asks, "What if I run Machine G first, then feed its output into Machine F?" These are fundamentally different processes. On the AP exam, misreading (f ∘ g)(x) as f(x) · g(x) is one of the most common errors — and one of the easiest to avoid once you internalize the pipeline metaphor.
SECTION 8

Connection to Calculus & Beyond

Composition of functions is not merely an algebraic convenience — it is the structural backbone of the chain rule in differential calculus. When you learn to differentiate h(x) = f(g(x)), the chain rule states that h′(x) = f′(g(x)) · g′(x). Your ability to identify the inner function g and the outer function f — a skill honed in AP Precalculus — directly determines your success with the chain rule. Beyond calculus, composition underlies function iteration (applying a function to itself repeatedly, central to fractal geometry and chaos theory) and forms the algebraic foundation for group theory in abstract algebra.

From AP Precalculus to Calculus and Beyond
ConceptAP Precalculus FocusCalculus / Advanced Extension
CompositionEvaluate f(g(x)), find domain, simplifyChain rule: d/dx [f(g(x))] = f′(g(x)) · g′(x)
DecompositionExpress h(x) as f(g(x))u-substitution in integration
Inverse verificationShow f(g(x)) = x and g(f(x)) = xInverse function theorem: (f⁻¹)′(a) = 1/f′(f⁻¹(a))
Function iterationNot directly testedDynamical systems, fractals, chaos theory

As you can see, every row in the table traces a direct line from a skill you develop in AP Precalculus to a more powerful tool in subsequent courses. Mastering composition now is an investment that pays compounding dividends — a fitting metaphor for a topic intertwined with exponential growth.

SECTION 9

Practice Problems

PROBLEM 1 — CONCEPTUAL
If f(x) = eˣ and g(x) = ln x, which of the following statements is true about the composition (f ∘ g)(x)?
PROBLEM 2 — BASIC CALCULATION
Let f(x) = 3x − 5 and g(x) = 2ˣ. What is (f ∘ g)(4)?
PROBLEM 3 — INTERMEDIATE
Let h(x) = log₃(9ˣ − 1). What is the domain of h?
PROBLEM 4 — APPLIED
A bacterial colony's population after t hours is modeled by P(t) = 500 · e^(0.03t). A toxin reduces the effective population to R(P) = ln(P + 1) − ln(501) for research analysis. (a) Write the composed function R(P(t)) and simplify using logarithm properties. (b) State the domain of R(P(t)) in context. (c) Find R(P(10)) to three decimal places.
PROBLEM 5 — CRITICAL THINKING
Consider f(x) = e^(kx) for a positive constant k, and g(x) = (1/k) · ln x. (a) Prove algebraically that g is the inverse of f by showing (g ∘ f)(x) = x for all real x and (f ∘ g)(x) = x for x > 0. (b) Let h(x) = (f ∘ f)(x). Express h(x) in simplest form and determine whether h has an inverse. If so, express h⁻¹(x) using composition. (c) A student claims that for any two functions p and q, the domain of p ∘ q is always a subset of the domain of q. Explain whether this claim is true or false, and justify your reasoning with reference to the formal domain rule.
SUMMARY

Lesson Summary

The composition of functions (f ∘ g)(x) = f(g(x)) chains two functions by using the output of the inner function g as the input to the outer function f. The domain of the composed function includes only those x-values in the domain of g whose images g(x) also lie in the domain of f. Composition is non-commutative: in general f ∘ g ≠ g ∘ f. The key inverse identities e^(ln x) = x (for x > 0) and ln(eˣ) = x (for all real x) are direct consequences of composition applied to an exponential-logarithmic inverse pair.

On the AP Precalculus exam, expect to evaluate compositions numerically, simplify composed expressions using logarithm properties and exponential rules, determine domains of composed functions, decompose complex functions into inner/outer pairs, and verify inverse relationships through composition. These skills also prepare you for the chain rule in calculus, where identifying inner and outer functions is the essential first step.

Varsity Tutors • AP Precalculus • Composition of Functions