All AP Courses AP PrecalculusAP Precalc

Unit 2 · Topic 2.7 · about 30 minutes · 7 parts · 12 scored checks, 2 of them multiple choice, plus 2 from earlier lessons

AP Precalculus 2.7: Composition of Functions

Unit 2: 25 to 40% of the multiple-choice section

What you'll be able to do

  • Evaluate a composition of two or more functions at given input values.
  • Build a formula, table or graph for the composition of two or more functions.
  • Rewrite a given function as a composition of two or more simpler functions.

Key vocabulary

TermWhat it meansThe exam trap
Composite functionf∘g uses the output values of g as the input values of f; (f∘g)(x) is also written f(g(x)).In (f∘g)(x) the function written next to x acts first, so (f∘g)(3) means find g(3) and put that into f, even though f is written first.
Domain of a compositeThe inputs of g whose outputs g(x) are in the domain of f.An input belongs to the domain of f∘g only if f accepts g(x), so checking whether f accepts x itself tests the wrong number.
Identity functionf(x)=x, which returns every input unchanged, so composing it with any function g gives g back.The identity function is I(x)=x, not the constant 1, so f(I(x)) gives back f(x) rather than f(1).
Not commutativeComposition depends on order: f∘g and g∘f are typically different functions.With f(x)=2x and g(x)=x+5, f(g(1))=12 but g(f(1))=7, so swapping the order changes the answer.
Decomposing a functionRewriting a function as a composition of less complicated functions, where the inside variable replaces each instance of the function it was composed with.When the inside expression appears more than once, every copy becomes x in the outside function, so (x+1)2−2(x+1) decomposes with outside function x2−2x, not x2−2(x+1).
The graph of f(x) = (x - 1) squared, dashed, with its vertex at (1, 0), and two composites built from it with g(x) = x + 3. The graph of f(g(x)) = (x + 2) squared is the same parabola moved 3 units left, vertex (-2, 0). The graph of g(f(x)) = (x - 1) squared + 3 is the parabola moved 3 units up, vertex (1, 3). The two composites are different graphs.Tap to open the picture full size

Part 1 Think first Two discounts on one jacket

Guess before you learn. A wrong guess still makes the answer stick.

Predict first

A jacket costs 60 dollars. A store gives you two deals at once: 10 dollars off, and 20% off. The cashier can apply them in either order. Which order leaves you paying less?

In short. Composing two functions means feeding the output of one into the other, so (f∘g)(x)=f(g(x)) sends x through g first and then through f.

  • Work from the inside out with any representation: find g(x) from a table, a graph or a formula, then use that number as the input of f. An input is in the domain of f∘g only when g(x) is an input f accepts.
  • Order matters: f(g(x)) and g(f(x)) are usually different. The identity function f(x)=x is the one function that changes nothing it is composed with.
  • To build f(g(x)) from formulas, replace every x in f with g(x). To take a function apart, find the inside expression; f(x+k) and f(kx) are compositions with x+k and kx.

Part 2 Learn it Four short ideas, each checked as you go

2a. The inner output is the outer input

The composite function f∘g, read "f composed with g," takes an input x, sends it through g, and then sends g(x) through f. You can write it as (f∘g)(x) or as f(g(x)). The function written closest to x acts first.

Say one table gives g(4)=1 and another gives f(1)=9. Then

(f∘g)(4)=f(g(4))=f(1)=9

The 4 never goes into f at all. If g comes as a graph, read g(4) off the graph and carry that number to f. Tables, graphs, formulas and descriptions in words all work the same way: find the inner output, then use it as the outer input.

That also limits the domain. A value of x is in the domain of f∘g only if g(x) exists and g(x) is an input f accepts. If the table for f has no entry at g(x), then f(g(x)) has no value there, even if f(x) itself does.

Quick check · Fill the statement

No calculator. A table for g gives g(3)=7 and g(7)=1. A table for f gives f(3)=2 and f(7)=5. Find f(g(3)). Tap a blank, then tap an answer.

The inner function is , so the first value to find is g(3), which is . That number is the input of f, so f(g(3)) is .

2b. Order matters, and one function changes nothing

Swap the order and you usually get a different function. Take f(x)=2x and g(x)=x+5:

f(g(1))=f(6)=12g(f(1))=g(2)=7

Adding 5 and then doubling is not the same as doubling and then adding 5. Composition is not commutative: f∘g and g∘f are typically different functions, so f(g(x)) and g(f(x)) are typically different values. Read the notation, and start from the inside every time.

One function leaves everything alone. The identity function, I(x)=x, sends every input to itself, so for any function f,

f(I(x))=I(f(x))=f(x)

Here the order does not matter, because I does nothing either way. Adding 0 leaves a number unchanged, and so does multiplying by 1. In composition, the identity function plays that same part.

Quick check · Match

No calculator. Let f(x)=x2, g(x)=x+3 and I(x)=x. Tap an expression, then its value.

2c. Building the composite

Composition links two quantities that no single formula connects. A delivery van's fuel use depends on the miles it drives, and the miles depend on the hours it is out. Neither formula gives fuel from hours, but composing them does.

When you have formulas, build f(g(x)) by substitution: write out f, then replace every x in it with g(x), in parentheses. For f(x)=x2+4x and g(x)=x−1,

f(g(x))=(x−1)2+4(x−1)

Both copies of x in f were replaced. Check it at x=3: g(3)=2 and f(2)=12, and the new formula gives 22+4⋅2=12 too.

Without formulas you can still build a table or a graph of f∘g. Choose inputs x, work out f(g(x)) for each, and list or plot the points (x,f(g(x))). The first coordinate is the original input x, not the inner output g(x).

Quick check · Multiple choice

No calculator. Let f(x)=x2−3x and g(x)=x+2. Which expression is f(g(x))?

2d. Taking a function apart

Reading a formula backward is decomposing it. In h(x)=x2+9 the last step is the square root, so the outside function is f(x)=x and the inside is g(x)=x2+9. Then h(x)=f(g(x)).

When the inside expression shows up more than once, every copy of it becomes x in the outside function. (x+1)2−2(x+1) is f(g(x)) with g(x)=x+1 and f(x)=x2−2x.

The transformations from Unit 1 are compositions too. With g(x)=x+k, the composite f(g(x))=f(x+k) is a horizontal translation of the graph of f, and g(f(x))=f(x)+k is a vertical translation. With g(x)=kx, f(g(x))=f(kx) is a horizontal dilation and g(f(x))=kf(x) is a vertical dilation.

Inside changes the input, so the graph changes sideways. Outside changes the output, so the graph changes up and down. The diagram shows both for g(x)=x+3.

Quick check · Sort it

No calculator. Each function is built from a function f by composing it with g. Tap a card, then what happens to the graph of f.

Horizontal translation

Vertical translation

Horizontal dilation

Vertical dilation

Part 3 Watch it done From minutes to degrees Celsius

Watch each step, then do the last one yourself.

Water in a kettle starts at 50 degrees Fahrenheit and warms 18 degrees Fahrenheit each minute, so its temperature after t minutes is F(t)=50+18t degrees Fahrenheit, for 0≤t≤9. A Fahrenheit reading F converts to Celsius by C(F)=59(F−32). Write the Celsius temperature as a function of time, and find it at t=3 minutes.

  1. Step 1 · Decide which function goes inside

    Time goes into F and gives a Fahrenheit temperature. A Fahrenheit temperature is exactly what C takes in. So F is inside and C is outside: the Celsius temperature at time t is C(F(t)).

  2. Step 2 · Substitute

    Replace the F in C(F)=59(F−32) with the whole expression 50+18t: C(F(t))=59((50+18t)−32) This one formula relates two quantities that no single formula linked before, minutes and degrees Celsius.

  3. Why this step?

    Why C(F(t)) and not F(C(t))?

    C(t) would treat a number of minutes as a Fahrenheit temperature, which makes no sense. The output of the inside function has to be the kind of quantity the outside function takes in. Here that is a Fahrenheit temperature, which F produces and C uses.

  4. Your step · Calculate

    No calculator. Finish it. What is the Celsius temperature of the water at t=3 minutes?

    degrees Celsius

Part 4 Try it Find the inside function on a graph

Lab

Function Grapher

Use the polynomial family, f(x)=x2. The lab draws af(b(x+c))+d, so b(x+c) is the inside function. Rewrite the inside function in that shape on paper first, then set the sliders and check that the colored graph is the one you meant.

Open the full Function Grapher lab

Try it · Calculate

No calculator. The lab draws af(b(x+c))+d with f(x)=x2. The function h(x)=(2x+6)2 is f(k(x)) with inside function k(x)=2x+6. Set a=1, b=2 and d=0. What value of c makes the colored graph the graph of h? Then check it with the slider.

Part 5 Explain it Write it the way the exam asks

Nothing you type leaves this page. Check your answer against the model and each scoring point.

Free response is 37.5% of the exam score. This one is shaped like Question 1, Function Concepts.

Free-response practice · Question 1 style

Graphing calculator required. Let f(x)=x2−4x. The function g has g(−3)=2, g(0)=4, g(2)=−3 and g(4)=1. (A) (i) Find (f∘g)(2). (ii) Find (g∘f)(1). Show the inner value in each. (B) Let h(x)=x+2. Write an expression for f(h(x)) and simplify it. Describe how the graph of y=f(h(x)) is related to the graph of y=f(x). (C) Is h(f(x)) the same function as f(h(x))? Justify your answer.

Model answer

(A) (i) g(2)=−3, so (f∘g)(2)=f(−3)=9+12=21. (ii) f(1)=1−4=−3, so (g∘f)(1)=g(−3)=2. (B) f(h(x))=(x+2)2−4(x+2). Expanding gives x2+4x+4−4x−8=x2−4. Since h(x)=x+2 is inside f, the graph of y=f(h(x)) is the graph of y=f(x) translated 2 units left. (C) No. At x=0, h(f(0))=h(0)=2, but f(h(0))=f(2)=−4. Different outputs for the same input mean different functions.

Score your own answer. This is a self-check, not a grade. Tick each point your answer makes.

Part 6 Check yourself A table and a graph

The three case questions use the same two functions.

The function f is defined only at the five inputs in the table. The graph of g is a line, and the marked points on it are at the whole-number inputs from −1 to 5.

Values of f
x−20124
f(x)5−1462

Graph of g

−2024g(x)024x

The line through the marked points is the graph of g.

Case question 1 · Calculate

No calculator. What is f(g(1))?

Case question 2 · Spot the error

No calculator. A student finds (g∘f)(1). Tap the first line with a mistake.

Case question 3 · Multiple choice

No calculator. Which point is on the graph of y=f(g(x))?

The rest stand on their own and do not use the case.

Check yourself · Put it in order

No calculator. Use the table of f and the graph of g to find f(g(f(4))). Put the steps in order.

Check yourself · Fill the statement

No calculator. Write h(x)=1x+3+(x+3) as p(q(x)). Tap a blank, then tap an answer.

The expression that appears twice is the inside function, q(x) = . Replacing each copy of it with x gives p(x) = .

Check yourself · Decide and justify

No calculator. Is x=4 in the domain of f∘g?

Which reason supports your answer?

Part 7 Keep it Bring back earlier ideas

Pulling an older idea back up is what makes it last.

From 2.4 Exponential Function Manipulation · Put it in order

No calculator. Start from 272x3. Put the expressions in order so that each one rewrites the one before it, ending in the form bx.

From 1.11 Equivalent Representations of Polynomial and Rational Expressions · Multiple choice

No calculator. What is the slant asymptote of the graph of r(x)=2x2−x+4x−1?

In three lines

  • (f∘g)(x)=f(g(x)): find g(x) from any representation, then use it as the input of f; x is in the domain only if f accepts g(x).
  • f(g(x)) and g(f(x)) are usually different, and the identity function f(x)=x changes nothing it is composed with.
  • Build f(g(x)) by replacing every x in f with g(x), and decompose by finding the inside expression; f(x+k) and f(kx) are compositions.

Exam strategy for this topic

  • Section I Part A, Multiple Choice (calculator not permitted): 29 questions in 65 minutes.
  • Section I Part B, Multiple Choice (graphing calculator required): 13 questions in 40 minutes.
  • Section II Part A, Free Response (graphing calculator required): 2 questions in 35 minutes.
  • Section II Part B, Free Response (calculator not permitted): 2 questions in 35 minutes.
  • This lesson's Explain it is shaped like free-response question 1, Function Concepts.

Write the inner value as its own step, such as g(2)=−3, before you use it in the outer function. When the functions come as a table and a graph, this is careful reading done by hand, and a calculator adds nothing.

Questions students ask

Which function do I do first in f(g(x))?

The inside one, g. Find g(x), then use that output as the input of f.

How do I find f(g(x)) when f is a table and g is a graph?

Read g(x) off the graph, then look that number up in the table of f. If the graph gives g(1)=2 and the table gives f(2)=6, then f(g(1))=6.

Why can an input be in the domain of g but not in the domain of f∘g?

Because f has to accept whatever g produces. If g(4)=−1 and f has no value at −1, then f(g(4)) does not exist, even though g(4) does.

When I graph f∘g, what goes on the horizontal axis?

The original input x. Plot the points (x,f(g(x))), not (g(x),f(g(x))).

How is a transformation like f(x+3) a composition?

It is f(g(x)) with g(x)=x+3 inside, so it changes the input and moves the graph 3 units left. Putting g outside instead, f(x)+3, changes the output and moves the graph up 3.

How do I find the inside function when decomposing?

Ask what the last step of the calculation is; that is the outside function, and whatever it acts on is the inside. In x2+9 the last step is the square root, so the inside function is x2+9.

Course alignment, for teachers

AP Precalculus topic 2.7, Unit 2: Exponential and Logarithmic Functions.

  • Skill 1.C: Construct new functions, using transformations, compositions, inverses, or regressions, that may be useful in modeling contexts, criteria, or data, with and without technology.
  • Skill 2.B: Construct equivalent graphical, numerical, analytical, and verbal representations of functions that are useful in a given mathematical or applied context, with and without technology.

This lesson maps all 10 essential knowledge statements of the topic to the part that teaches each one: 10 are checked by a scored question. The map is in the lesson file.