Unit 2 · Topic 2.7 · about 30 minutes · 7 parts · 14 scored checks, 3 of them multiple choice

Composition of Functions

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.

Vocabulary

Composite function
f∘g uses the output values of g as the input values of f; (f∘g)(x) is also written f(g(x)).
Domain of a composite
The inputs of g whose outputs g(x) are in the domain of f.
Identity function
f(x)=x, which returns every input unchanged, so composing it with any function g gives g back.
Not commutative
Composition depends on order: f∘g and g∘f are typically different functions.
Decomposing a function
Rewriting a function as a composition of less complicated functions, where the inside variable replaces each instance of the function it was composed with.
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.