Fiveable

📈AP Pre-Calculus Unit 2 Review

QR code for AP Pre-Calculus practice questions

2.7 Composition of Functions

2.7 Composition of Functions

Written by the Fiveable Content Team • Last updated June 2026
Verified for the 2027 exam
Verified for the 2027 examWritten by the Fiveable Content Team • Last updated June 2026
📈AP Pre-Calculus
Unit & Topic Study Guides
Pep mascot

A composite function combines two functions so that the output of one becomes the input of the other, written as f(g(x))f(g(x)) or (fg)(x)(f \circ g)(x). You work the inside function first, then feed that result into the outside function.

Why This Matters for the AP Precalculus Exam

Composition shows up across AP Precalculus because it lets you connect two quantities that do not have a single direct formula. You will see it on the exam when you evaluate f(g(x))f(g(x)) from equations, tables, or graphs, build a new composite function, or break a complicated function into simpler inside and outside pieces.

Composition also sets up later topics in this unit. Inverse functions are defined through composition, since a function and its inverse compose to give the identity function. Getting comfortable here makes the inverse and logarithm work that follows much smoother.

On the AP Precalculus exam, some multiple-choice and free-response questions allow a graphing calculator and some do not. When you show composition work in free-response, writing each substitution step clearly is important for clear exam work and helps you avoid small algebra slips.

Key Takeaways

  • (fg)(x)=f(g(x))(f \circ g)(x) = f(g(x)) means apply gg first, then use that output as the input for ff.
  • The domain of fgf \circ g is limited to inputs of gg whose outputs are valid inputs for ff.
  • Composition is not commutative: f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different.
  • The identity function f(x)=xf(x) = x leaves any function unchanged: g(f(x))=f(g(x))=g(x)g(f(x)) = f(g(x)) = g(x).
  • To build f(g(x))f(g(x)) analytically, substitute g(x)g(x) for every xx in ff.
  • You can also build fgf \circ g from tables or graphs by reading outputs of gg as inputs of ff.

What Composition of Functions Means

A composite function is built from two or more simpler functions chained together. The notation f(g(x))f(g(x)), also written (fg)(x)(f \circ g)(x), tells you to apply gg to xx first, then use that result as the input to ff.

The key idea is that the output of the inside function becomes the input of the outside function. So in f(g(x))f(g(x)), you find g(x)g(x) first, then plug that value into ff.

For example, with f(x)=x2f(x) = x^2 and g(x)=2x+1g(x) = 2x + 1:

f(g(x))=(2x+1)2f(g(x)) = (2x + 1)^2

Here g(x)=2x+1g(x) = 2x + 1 replaces the xx inside ff, and then the whole thing is squared.

Domain of a Composite Function

The domain of fgf \circ g is restricted to the input values of gg whose outputs are valid inputs for ff. In other words, an xx has to be allowed in gg, and then g(x)g(x) has to be allowed in ff. Watch for inside functions that create restrictions, such as a square root that needs a nonnegative input, a denominator that cannot be zero, or a logarithm that needs a positive input.

Notation and Properties

Order Matters

The composition of functions is not commutative, so f(g(x))f(g(x)) and g(f(x))g(f(x)) are typically different functions.

Take f(x)=x2f(x) = x^2 and g(x)=2x+1g(x) = 2x + 1:

  • f(g(x))=(2x+1)2f(g(x)) = (2x + 1)^2
  • g(f(x))=2x2+1g(f(x)) = 2x^2 + 1

These are different functions with different outputs, so you cannot just swap the order.

The Identity Function

The identity function f(x)=xf(x) = x returns its input unchanged. When you compose it with any function gg, you get gg back:

g(f(x))=f(g(x))=g(x)g(f(x)) = f(g(x)) = g(x)

This works because f(x)=xf(x) = x does nothing to the input. It behaves like 00 for addition and 11 for multiplication: an identity that leaves the other function alone. For example, composing f(x)=xf(x) = x with g(x)=2x+1g(x) = 2x + 1 just gives 2x+12x + 1 back.

Working with Composite Functions

Building f(g(x)) Analytically

When you have equations for ff and gg, build f(g(x))f(g(x)) by substituting g(x)g(x) for every instance of xx in ff.

For example, with f(x)=x2+3f(x) = x^2 + 3 and g(x)=x2g(x) = x^2:

f(g(x))=(x2)2+3=x4+3f(g(x)) = (x^2)^2 + 3 = x^4 + 3

Every xx in ff became g(x)=x2g(x) = x^2.

Building f(g(x)) from Tables or Graphs

You can also construct fgf \circ g numerically or graphically by finding values for (x,f(g(x)))(x, f(g(x))).

  • Numerical: Use a table of values. Read g(x)g(x) from the table, then use that output as an input in the table for ff.
  • Graphical: Read g(x)g(x) off the graph of gg, then go to the graph of ff and read the output at that input value.

This is handy when you only have data or pictures, not equations.

Decomposing a Function

Decomposition is the reverse process: breaking a complicated function into simpler inside and outside pieces. When you decompose correctly, the variable in the inside function should replace each instance of that inside function in the outside function.

For example, h(x)=(2x+1)2h(x) = (2x + 1)^2 can be decomposed as:

  • inside: g(x)=2x+1g(x) = 2x + 1
  • outside: f(x)=x2f(x) = x^2

so that f(g(x))=(2x+1)2=h(x)f(g(x)) = (2x + 1)^2 = h(x). Picking a clean inside function is the key to decomposing well.

Composition and Transformations

Transformations can be viewed as compositions, which connects this topic to function shifts and stretches.

  • An additive transformation that produces translations can be seen as composing g(x)=x+kg(x) = x + k with ff. This shifts the graph horizontally or vertically by a constant amount.
  • A multiplicative transformation that produces dilations can be seen as composing g(x)=kxg(x) = kx with ff. This stretches or shrinks the graph by a factor of kk.

Seeing transformations as compositions helps you predict how the graph of a function changes when you build a new function from it.

How to Use This on the AP Precalculus Exam

Problem Solving

  • Read the composition carefully and identify which function is inside. In f(g(x))f(g(x)), gg is the inside function and runs first.
  • To evaluate at a number like f(g(2))f(g(2)), find g(2)g(2) first, then plug that result into ff.
  • For analytic compositions, substitute the entire inside function for every xx in the outside function. Use parentheses so you do not lose exponents or signs.

From Tables and Graphs

  • With tables, locate the input in the gg column, read its output, then use that output as the input for ff.
  • With graphs, find g(x)g(x) first on the graph of gg, then read ff at that value on the graph of ff.

Common Trap

  • Do not assume f(g(x))=g(f(x))f(g(x)) = g(f(x)). Order changes the result almost every time.
  • Watch domain restrictions created by the inside function, like negative inputs under a square root or a zero denominator.

Calculator Note

Some multiple-choice and free-response questions allow a graphing calculator and some do not. When work is required, write each substitution step clearly. Clean notation is important for clear exam work and helps you catch algebra mistakes.

Common Misconceptions

  • Thinking order does not matter. f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different functions. Always check which function is on the inside.
  • Forgetting the domain of the composite. An input must be valid for gg first, and then g(x)g(x) must be valid for ff. Restrictions from the inside function still apply even if the final formula looks fine.
  • Substituting only one xx. When building f(g(x))f(g(x)), replace every xx in ff with the inside function, not just the first one.
  • Dropping parentheses during substitution. Writing 2x+12x + 1 without parentheses before squaring leads to wrong results. Keep the inside function grouped.
  • Confusing composition with multiplication. f(g(x))f(g(x)) is not f(x)g(x)f(x) \cdot g(x). Composition feeds one output into the next function, it does not multiply the two functions.

Vocabulary

The following words are mentioned explicitly in the College Board Course and Exam Description for this topic.

Term

Definition

additive transformation

A transformation of a function involving addition or subtraction, resulting in vertical and horizontal translations.

analytic representation

An algebraic formula or equation that explicitly defines a function.

commutative

A property where the order of operations does not affect the result; composition of functions is not commutative, meaning f ∘ g typically produces a different result than g ∘ f.

composite function

A function formed by combining two or more functions, where the output of one function becomes the input of another function, denoted as f ∘ g or f(g(x)).

composition of functions

A function operation where one function is applied to the output of another function, written as (f ∘ g)(x) = f(g(x)).

decomposed

The process of breaking down a complex function into simpler component functions that can be composed together.

domain

The set of all possible input values for which a function is defined.

function composition

The process of combining two or more functions where the output of one function becomes the input of another function.

graphical representation

A visual representation of a function displayed on a coordinate plane.

horizontal dilation

A transformation that stretches or compresses the graph of a function horizontally by multiplying the input by a constant factor b, written as g(x) = f(bx).

horizontal translation

A transformation that shifts the graph of a function left or right by adding a constant to the input, written as g(x) = f(x + h).

identity function

The function h(x) = x, which serves as the line of reflection between inverse exponential and logarithmic functions.

input value

The x-values or independent variable values used as inputs to a function.

multiplicative transformation

A transformation of a function involving multiplication, resulting in vertical and horizontal dilations.

numerical representation

A representation of a function using tables of values or ordered pairs (x, y).

output value

The y-values or results produced by a function for given input values.

vertical dilation

A transformation that stretches or compresses the graph of a function vertically by multiplying the function by a constant factor a, written as g(x) = af(x).

vertical translation

A transformation that shifts the graph of a function up or down by adding a constant k to the function, written as g(x) = f(x) + k.

Frequently Asked Questions

What does f(g(x)) mean in AP Precalculus?

f(g(x)) means apply g first, then use the output of g as the input for f. The inside function runs first and the outside function runs second.

How do I evaluate a composite function from a formula?

Identify the inside function, substitute the entire inside expression into every x of the outside function, use parentheses, and then simplify. For f(g(2)), find g(2) first, then plug that value into f.

How do I find the domain of a composite function?

An input must be allowed in the inside function, and the output of the inside function must be allowed in the outside function. Check restrictions like square roots, logarithms, and denominators.

Is function composition commutative?

No. f(g(x)) and g(f(x)) are usually different functions and usually produce different outputs. Order matters because one function's output becomes the other function's input.

How do I use tables or graphs for composition of functions?

Use the starting x-value in the inside function first. Then take that output and use it as the input for the outside function, reading the second output from the table or graph.

What does it mean to decompose a function?

Decomposing a function means rewriting a complicated expression as a composition of simpler functions. You identify an inside function and an outside function whose composition produces the original function.

Pep mascot
Upgrade your Fiveable account to print any study guide

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Click below to go to billing portal → update your plan → choose Yearly→ and select "Fiveable Share Plan". Only pay the difference

Plan is open to all students, teachers, parents, etc
Pep mascot
Upgrade your Fiveable account to export vocabulary

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Plan is open to all students, teachers, parents, etc
report an error
description

screenshots help us find and fix the issue faster (optional)

add screenshot

2,589 studying →