MATH 3 • ALGEBRA & FUNCTIONS

Composite Functions — I can create and interpret composite functions in context and determine reasonable domains.

Learn how chaining two functions together creates powerful new relationships and how to find their valid inputs.

Historical Context & Motivation

Mathematics has always been about building complex ideas from simpler pieces. The concept of a function — a rule that assigns each input exactly one output — took centuries to develop into the precise tool we use today. Once mathematicians had functions, a natural question arose: what happens when the output of one function becomes the input of another? This idea of composition became essential as scientists and engineers realized that real-world processes rarely happen in isolation. Temperature affects air density, which affects airplane lift — each relationship is a function, and chaining them together is composition.

~300 BCE
Euclid's Geometric Relationships
Greek mathematicians described dependent quantities geometrically, such as how the area of a circle depends on its radius. These were early examples of functional thinking, though the word function did not yet exist.
1673
Leibniz Coins 'Function'
Gottfried Wilhelm Leibniz introduced the word functio to describe quantities that depend on a variable, laying the groundwork for modern notation and the idea of combining functions.
1748
Euler Formalizes Function Notation
Leonhard Euler popularized the notation f(x) and began systematically studying how functions could be combined through addition, multiplication, and composition, treating them as building blocks.
1837
Dirichlet's Modern Definition
Peter Gustav Lejeune Dirichlet provided the modern definition of a function as a rule assigning each input exactly one output. This precise definition made the concept of domain — the set of valid inputs — critically important for composition.
20th Century
Composition in Computer Science
Function composition became a cornerstone of programming and data science. Every time one program's output feeds into another — like a filter applied to a photo, then a crop — that is composition in action.

The central question this lesson addresses is: when you chain two functions together, what new function do you get, and what inputs are actually valid for the composite? Understanding this question unlocks your ability to model multi-step real-world processes with algebra.

Core Principles & Definitions

A composite function is formed when the output of one function is used as the input of another. If you have two functions f and g, the composite (f ∘ g)(x) — read as "f of g of x" — means you first apply g to x, then apply f to the result. The small circle ∘ is the composition operator. Before you dive into calculations, there are a few foundational ideas you need to internalize.

1

Inside-Out Evaluation

Always evaluate the inner function first. In (f ∘ g)(x), compute g(x) to get a number, then feed that number into f. Think of it like reading parentheses in arithmetic — you work from the inside out.
2

Order Matters

Composition is not commutative. In general, (f ∘ g)(x) ≠ (g ∘ f)(x). Applying f first and then g produces a different result than applying g first and then f, just like putting on socks then shoes is different from shoes then socks.
3

Domain of the Composite

The domain of (f ∘ g)(x) includes only those x-values that are (1) in the domain of g, AND (2) for which g(x) lands in the domain of f. Both conditions must hold simultaneously.
4

Algebraic Composition

To find a formula for (f ∘ g)(x), take the formula for f and replace every instance of the variable with the entire expression for g(x). Then simplify. This produces a new function with its own rule and domain.
KEY TAKEAWAY
Think of composite functions like an assembly line in a factory. Raw material (x) goes into Machine g, which shapes it into a part g(x). That part then rolls into Machine f, which produces the final product f(g(x)). If the part coming out of Machine g is the wrong size or shape for Machine f, the line jams — that x-value is not in the domain of the composite.

Visual Explanation — The Function Pipeline

The diagram below shows how a composite function works as a pipeline. An input x enters function g, producing the intermediate value g(x). That value then enters function f, yielding the final output f(g(x)). The colored arrows trace the path of a specific input through both stages.

The pipeline diagram traces input x = 3 through function g (which produces 7) and then through function f (which squares it to get 49). The composite formula (f ∘ g)(x) = (2x + 1)² combines both steps into a single expression.

Notice how the pipeline flows from left to right, but the algebraic notation reads from the outside in. When you see f(g(x)), the innermost function g acts first even though f appears first in the expression. This inside-out reading is one of the most common sources of confusion, so always pause and ask yourself: which function acts on x directly? That is your inner function.

Mathematical Framework

Let's formalize the notation and then tackle the domain question, which is the most important — and most frequently tested — aspect of composite functions.

COMPOSITE FUNCTION DEFINITION
(f ∘ g)(x) = f(g(x))
Read as "f composed with g of x." First evaluate g(x) (inner), then apply f to the result (outer). The ∘ symbol denotes composition, not multiplication.
DOMAIN OF A COMPOSITE FUNCTION
Domain of (f ∘ g) = { x ∈ Domain(g) : g(x) ∈ Domain(f) }
An x-value is in the domain of (f ∘ g) only if both conditions are met: (1) x must be a valid input for g, and (2) the output g(x) must be a valid input for f.

The domain rule is critical because even if the simplified algebraic formula looks like it could accept any real number, the original composition might exclude some values. For example, consider f(x) = √x and g(x) = x − 5. The composite (f ∘ g)(x) = √(x − 5) requires x − 5 ≥ 0, so x ≥ 5. But if instead we had f(x) = x² and g(x) = 1/(x − 3), the composite is 1/(x − 3)², and x = 3 must be excluded because g(3) is undefined, even though squaring is defined for all real numbers.

REVERSE COMPOSITION
(g ∘ f)(x) = g(f(x))
This is a different function from (f ∘ g)(x). Here f is evaluated first and g second. The domain rule follows the same pattern: x must be in the domain of f, and f(x) must be in the domain of g.
Common Mistake Alert
Students often confuse (f ∘ g)(x) = f(g(x)) with the product f(x) × g(x). These are completely different operations. Composition means plugging one function into the other, while the product means multiplying their outputs. Always look for the composition symbol ∘ or the nested notation f(g(x)) to know which operation is intended.

Determining Reasonable Domains

Finding the domain of a composite function requires you to think carefully about restrictions from both functions. The diagram below illustrates how the domain of f ∘ g is determined by tracing which inputs survive both stages of the pipeline.

This mapping diagram traces specific x-values through g(x) = 4 − x² and then checks whether each output can enter f(x) = √x. Values like x = −3 produce g(−3) = −5, which is negative and cannot be square-rooted, so x = −3 is excluded. Algebraically, the domain is [−2, 2].

Step-by-Step Domain Strategy

  1. Identify the inner function's domain. Write down all restrictions on the input x for the inner function g.
  2. Identify the outer function's domain. Determine what values the outer function f can accept as inputs.
  3. Set up the inequality. Require that g(x) satisfies the domain condition of f. Solve for x.
  4. Intersect the restrictions. The final domain is the set of x-values that satisfy both the restriction from step 1 and the restriction from step 3.

Worked Example — Composition in Context

A clothing store runs a promotion: the price of an item is first reduced by $10, and then a 20% discount is applied to the reduced price. Let g(x) = x − 10 represent the $10 price reduction and f(x) = 0.80x represent the 20% discount. Find (f ∘ g)(x), interpret it in context, and determine a reasonable domain.

Clothing Store Discount Problem
1
Step 1 — Identify the FunctionsThe inner function is g(x) = x − 10, which subtracts $10 from the original price x. The outer function is f(x) = 0.80x, which takes 80% of whatever value it receives (applying a 20% discount). Since the $10 reduction happens first, g is the inner function.
2
Step 2 — Form the CompositeReplace the input of f with the entire expression for g(x): (f ∘ g)(x) = f(g(x)) = f(x − 10) = 0.80(x − 10)
(f ∘ g)(x) = 0.80x − 8
3
Step 3 — Interpret in ContextThe composite function tells us that the final price equals 80% of the original price minus $8. This single formula captures both discount steps. For a $50 item: (f ∘ g)(50) = 0.80(50) − 8 = 40 − 8 = $32. You can verify: $50 − $10 = $40, then 80% of $40 = $32. ✓
4
Step 4 — Determine the Reasonable DomainAlgebraically, 0.80(x − 10) is defined for all real x. However, context tells us x represents a price in dollars, so x > 0. Additionally, after the $10 reduction the price should remain non-negative, meaning x − 10 ≥ 0, so x ≥ 10. The final sale price should also be non-negative: 0.80x − 8 ≥ 0 gives x ≥ 10 (same restriction). Therefore, the reasonable domain is x ≥ 10.
Reasonable domain: x ≥ 10 (or [10, ∞) in interval notation)
5
Step 5 — Compare with (g ∘ f)(x)If the 20% discount were applied first, the composition reverses: (g ∘ f)(x) = g(f(x)) = g(0.80x) = 0.80x − 10. For a $50 item: 0.80(50) − 10 = 40 − 10 = $30. This is $2 less than the other order! This confirms that order matters in composition.
(g ∘ f)(x) = 0.80x − 10 ≠ (f ∘ g)(x) = 0.80x − 8

Composition vs. Other Function Operations

It is easy to mix up composition with other ways of combining functions. The table below compares four common operations so you can see exactly how composition is different.

Comparing four ways to combine functions f and g.
OperationNotationWhat It Does
Sum(f + g)(x) = f(x) + g(x)Evaluates both functions at x and adds the two outputs.
Product(f × g)(x) = f(x) × g(x)Evaluates both functions at x and multiplies the two outputs.
Quotient(f / g)(x) = f(x) / g(x)Divides the outputs; g(x) ≠ 0 is an extra domain restriction.
Composition(f ∘ g)(x) = f(g(x))Feeds the output of g into f as its input — a chain, not a pair.
KEY TAKEAWAY
Sum, product, and quotient are like using two separate tools on the same piece of wood and then combining the results. Composition is like passing the wood through one tool first and then sending its output directly into a second tool. The wood is transformed in sequence, which is why the domain must be checked at each stage.

Connection to Advanced Topics

Composite functions are not just a standalone topic — they are a gateway to several powerful ideas you will encounter in future math courses. Understanding composition now gives you a head start on each of these concepts.

How composite functions connect to future coursework.
This Lesson (Math 3)Where It Leads
Finding (f ∘ g)(x) algebraicallyIn Precalculus, you decompose complicated functions into simpler compositions to analyze transformations.
Checking if (f ∘ g)(x) = xThis is the test for inverse functions: f and g are inverses if both f(g(x)) = x and g(f(x)) = x.
Domain of composite functionsIn Calculus, the Chain Rule differentiates composite functions. Knowing the domain ensures the derivative exists.
Composition in context (word problems)In data science and computer science, function composition models data transformation pipelines.

The most immediate connection is to inverse functions. If you can compose f and g and get back the original input x, the two functions "undo" each other. You will explore this idea in depth soon, and your fluency with composition will make it much more intuitive.

Practice Problems

PROBLEM 1CONCEPTUAL
In your own words, explain why (f ∘ g)(x) and (g ∘ f)(x) are generally different functions. Give a simple numerical example using f(x) = x + 1 and g(x) = 2x to support your explanation.
PROBLEM 2BASIC CALCULATION
Let f(x) = 3x − 2 and g(x) = x² + 1. Find (f ∘ g)(x) and evaluate (f ∘ g)(−2).
PROBLEM 3INTERMEDIATE
Let f(x) = 1/(x − 3) and g(x) = √x. Find (f ∘ g)(x) and determine its domain.
PROBLEM 4APPLIED
A circular oil spill is expanding. The radius in meters after t hours is r(t) = 3t + 1 (for t ≥ 0). The area of a circle is A(r) = πr². Write the area as a function of time by finding (A ∘ r)(t). What is the area after 2 hours? What is a reasonable domain for the composite?
PROBLEM 5CRITICAL THINKING
Let f(x) = x² − 4 and g(x) = √(x + 5). Find both (f ∘ g)(x) and (g ∘ f)(x), determine the domain of each, and explain why their domains differ even though the same two functions are used.

Lesson Summary

A composite function is created by feeding the output of one function into another: (f ∘ g)(x) = f(g(x)). You always evaluate the inner function g first, then pass its result to the outer function f. Because the order in which functions are applied affects the result, composition is not commutative — (f ∘ g)(x) and (g ∘ f)(x) are generally different functions.

The domain of a composite requires two checks: x must belong to the domain of the inner function, and g(x) must belong to the domain of the outer function. In applied problems, real-world context often introduces additional reasonable domain restrictions — such as non-negative time or positive prices — that narrow the domain further. Mastering composition prepares you for inverse functions, the Chain Rule in Calculus, and real-world modeling where processes occur in sequence.

Varsity Tutors • Math 3 • Composite Functions — I can create and interpret composite functions in context and determine reasonable domains.