AP Precalculus • Exponential and Logarithmic Functions

Composition of Functions

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

A function curve with a triangle and circular angle measure.
Inside this lesson 10 sections 5 questions 8 figures

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))(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(ex)=xande(lnx)=x(forx>0)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

logb(bx)=xandb(logbx)=x(b>0,b≠1,x>0)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)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 e2x+1e^{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 elnxe^{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

  1. 1

    Step 1 — State the Functions

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

    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)) = e2⋅ln(x−3)e^{2 · ln(x − 3)}.
    (f ∘ g)(x) = e2ln(x−3)e^{2 ln(x − 3)}
  3. 3

    Step 3 — Simplify Using Logarithm Properties

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

    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) = e2xe^{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, ∞)
  5. 5

    Step 5 — Verify with a Numeric Check

    Choose x = 4. Then g(4) = ln(4 − 3) = ln 1 = 0, and f(0) = e2⋅0e^{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.

OperationNotation & DefinitionDomainExample with f = eˣ, g = ln x
Composition(f ∘ g)(x) = f(g(x))x ∈ Dom(g) and g(x) ∈ Dom(f)elnxe^{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

Comparison of function operations

✦

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.

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

From AP Precalculus to Calculus and Beyond

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

Question 1: CONCEPTUAL

If f(x) = eˣ and g(x) = ln x, which of the following statements is true about the composition (f ∘ g)(x)?
  • A. (f ∘ g)(x) = eˣ · ln x for all real x
  • B. (f ∘ g)(x) = x for all real x
  • C. (f ∘ g)(x) = x for x > 0 only
  • D. (f ∘ g)(x) = ln(eˣ) = x for all real x
  • E. (f ∘ g)(x) is undefined because exponential and logarithmic functions cannot be composed
Show answer (C)
The correct answer is C. By definition, (f ∘ g)(x) = f(g(x)) = elnxe^{ln x} = x. However, g(x) = ln x is only defined for x > 0, so the composition inherits this domain restriction. Choice A is incorrect because it confuses composition with multiplication (f · g, not f ∘ g). Choice B is incorrect because it omits the critical domain restriction; the identity holds only for x > 0. Choice D describes (g ∘ f)(x) = ln(eˣ), which does equal x for all real x — but that is the reverse composition, not the one asked about. Choice E is incorrect because exponential and logarithmic functions are commonly composed and in fact are inverses of each other.

Question 2: BASIC CALCULATION

Let f(x) = 3x − 5 and g(x) = 2ˣ. What is (f ∘ g)(4)?
  • A. 43
  • B. 128
  • C. 7
  • D. 21
  • E. 11
Show answer (A)
The correct answer is A. First evaluate the inner function: g(4) = 2⁴ = 16. Then apply the outer function: f(16) = 3(16) − 5 = 48 − 5 = 43. Choice B (128) results from computing 2⁷, which would come from incorrectly computing g(f(4)) = g(7) = 2⁷ = 128 — that is the reverse composition. Choice C (7) results from computing only f(4) = 3(4) − 5 = 7 and stopping. Choice D (21) could arise from mistakenly computing 3 · 2⁴ − 5 as 3 · 2⁴ = 3 · 8 − 5 = 21 by misinterpreting 2⁴ as 8. Choice E (11) might come from computing f(g(2)) instead of f(g(4)).

Question 3: INTERMEDIATE

Let h(x) = log₃(9ˣ − 1). What is the domain of h?
  • A. All real numbers
  • B. x > 1
  • C. x > 0
  • D. x ≥ 0
  • E. x > −1
Show answer (C)
The correct answer is C. Here h(x) = f(g(x)) where f(u) = log₃ u (requiring u > 0) and g(x) = 9ˣ − 1. We need 9ˣ − 1 > 0, i.e., 9ˣ > 1. Since 9ˣ = (3²)ˣ = 32x3^{2x}, we need 32x3^{2x} > 3⁰, which gives 2x > 0, so x > 0. Choice A is wrong because 9⁰ − 1 = 0 and log₃(0) is undefined. Choice B is too restrictive; for example, x = 0.5 gives 90.59^{0.5} − 1 = 3 − 1 = 2 > 0, so x = 0.5 is valid. Choice D includes x = 0, but g(0) = 0 and log₃(0) is undefined. Choice E is wrong because negative x values such as x = −0.5 give 9−0.59^{−0.5} − 1 = 1/3 − 1 = −2/3 < 0, making the logarithm undefined.

Question 4: APPLIED

3 pts
A bacterial colony's population after t hours is modeled by P(t) = 500 · e0.03te^{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.
Show answer
Point 1 (1 pt): R(P(t)) = ln(500 · e0.03te^{0.03t} + 1) − ln(501). Using the property ln(a) − ln(b) = ln(a/b), this simplifies to ln((500e0.03t500e^{0.03t} + 1)/501). For large t, 500e0.03t500e^{0.03t} dominates the +1, so R(P(t)) ≈ ln(500/501) + 0.03t ≈ 0.03t − 0.002, a nearly linear approximation. Point 2 (1 pt): In context, t represents time in hours and must satisfy t ≥ 0 (the experiment starts at t = 0). Since e0.03te^{0.03t} > 0 for all real t, we have P(t) + 1 > 1 > 0, so the logarithm is always defined. Domain: t ≥ 0. Point 3 (1 pt): P(10) = 500 · e0.3e^{0.3} ≈ 500 · 1.34986 ≈ 674.929. R(674.929) = ln(674.929 + 1) − ln(501) = ln(675.929) − ln(501) ≈ 6.51620 − 6.21661 ≈ 0.300 (to three decimal places). This makes sense: for moderate t, R(P(t)) ≈ 0.03t = 0.03(10) = 0.3.

Question 5: CRITICAL THINKING

4 pts
Consider f(x) = ekxe^{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.
Show answer
Point 1 (1 pt — Part a, first composition): (g ∘ f)(x) = g(f(x)) = g(ekxe^{kx}) = (1/k) · ln(ekxe^{kx}) = (1/k)(kx) = x. This holds for all real x because ekxe^{kx} > 0, which satisfies the domain requirement of g. ✓ Point 2 (1 pt — Part a, second composition): (f ∘ g)(x) = f(g(x)) = f((1/k) · ln x) = ek⋅(1/k)⋅lnxe^{k · (1/k) · ln x} = elnxe^{ln x} = x. This requires x > 0 so that ln x is defined. Since both compositions yield x on their respective domains, g is the inverse of f. ✓ Point 3 (1 pt — Part b): h(x) = (f ∘ f)(x) = f(f(x)) = f(ekxe^{kx}) = ek⋅ekxe^{k · e^{kx}}. This is a strictly increasing function (since k > 0 and the exponential function is strictly increasing), so h is one-to-one and therefore has an inverse. To find h⁻¹, note that h = f ∘ f, so h⁻¹ = f⁻¹ ∘ f⁻¹ = g ∘ g. Thus h⁻¹(x) = g(g(x)) = (1/k) · ln((1/k) · ln x), defined for x > 1 (since we need (1/k) · ln x > 0, i.e., ln x > 0, i.e., x > 1). ✓ Point 4 (1 pt — Part c): The claim is TRUE. By the formal domain rule, Dom(p ∘ q) = {x ∈ Dom(q) : q(x) ∈ Dom(p)}. This set is defined as a subset of Dom(q) using the condition x ∈ Dom(q), then further filtered by the condition q(x) ∈ Dom(p). Since every element of Dom(p ∘ q) must first satisfy x ∈ Dom(q), it follows that Dom(p ∘ q) ⊆ Dom(q). The subset may be proper (strictly smaller) when some outputs of q fall outside the domain of p, or it may equal Dom(q) when the entire range of q lands within Dom(p). ✓

SUMMARY

Lesson Summary

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 elnxe^{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