FiveWay Premium

Unlock every question

1,292 more practice questions, 134 Killer problems, timed mock exams in the 2027 format, and sets built from the skills you miss.

Current accessGuestYou are browsing without an account. Sign in to keep your record.

Free

Always, no account needed to read

  • A 7-question diagnostic and the first 8 practice questions in every topic
  • A worked solution and a note on each wrong choice for those questions
  • Every concept note, in every chapter
  • Your record and My page

Premium

Everything in Free, plus

  • The other 1,292 questions — every chapter, to the end
  • 134 Killer problems, pitched above the exam ceiling
  • Timed mock exams in the 2027 format — 42 questions, 105 minutes
  • Sets built from the skills you keep missing, refilled weekly
  • Analytics — accuracy per skill, time per question, your weak chapters
Unlock early access

Early access is free while we test. No card, no timer. Compare plans

Sign in to FiveWay

Sign in to keep your answers and see which skills to fix.

  • Free to start
  • No password
  • Progress saved on every device

We store your answers and the skills they belong to. Your first name and last initial appear only on the leaderboard and in Community.

Topic 2.7A

Composition of Functions

Nova earns $0.02 per subscriber per day from ads. Its owner wants to know: how much does the channel earn per day, 8 weeks after launch? No single function answers that. You need three: one to turn weeks into months, one to turn months into subscribers, and one to turn subscribers into dollars. Feeding the output of one function into the next is called composition.

8 MIN READ7 IDEAS33 PROBLEMS10 flashcards

Remember from 2.4: we rewrote NN with time in weeks as 256(1.5)w/4256(1.5)^{w/4}. That was already a composition: first convert ww to months, then apply NN.

01

Output In, Output Out

Figure

Each function's output becomes the next function's input.

With T(w)=w/4T(w) = w/4 (weeks → months), N(t)=256(1.5)tN(t) = 256(1.5)^{t} (months → subscribers) and D(S)=0.02SD(S) = 0.02S (subscribers → dollars per day):

  1. 01

    T(8)=8/4=2T(8) = 8/4 = 2. Eight weeks is 2 months.

  1. 02

    N(2)=256(1.5)2=576N(2) = 256(1.5)^{2} = 576 subscribers.

  1. 03

    D(576)=0.02(576)D(576) = 0.02(576) = $11.52 per day. In one expression: D(N(T(8)))D(N(T(8))) = 11.52.

CONCEPT

Composition

The composition f(g(x))f(g(x)) means: put xx into gg, then put the result g(x)g(x) into ff. It is also written (ff ∘ g)(xg)( x), read “f of gg of x”.

Work from the INSIDE out: the function written closest to xx acts first, even though it is written second.

For f(g(x))f(g(x)) to exist, xx must be in the domain of gg, and g(x)g(x) must be in the domain of ff.

(f∘g)(x)=f(g(x))(f \circ g)(x) = f\big(g(x)\big)

The small circle ∘ is read “composed with”, so ff ∘ gg is “f composed with g”. It is NOT a multiplication dot. (ff ∘ g)(x) and f(g(x))f(g(x)) mean exactly the same thing; the second form shows the order more clearly, so we'll mostly use it.

Figure

In f(g(x))f(g(x)), gg is applied first and ff second.

02

From Formulas

Worked example

Let f(x)=x2−3f(x) = x^{2} - 3 and g(x)=2x+1g(x) = 2x + 1. Find f(g(2))f(g(2)), g(f(2))g(f(2)), and f(f(2))f(f(2)).

  1. 01

    f(g(2))f(g(2)): inside first, g(2)=2(2)+1=5g(2) = 2(2) + 1 = 5. Then f(5)=25−3=22f(5) = 25 - 3 = 22.

  2. 02

    g(f(2))g(f(2)): inside first, f(2)=4−3=1f(2) = 4 - 3 = 1. Then g(1)=2(1)+1=3g(1) = 2(1) + 1 = 3.

  3. 03

    f(f(2))f(f(2)): f(2)=1f(2) = 1, then f(1)=1−3=−2f(1) = 1 - 3 = -2. A function can be composed with itself.

    f(g(2))=22f(g(2)) = 22 but g(f(2))=3g(f(2)) = 3. Swapping the order changed the answer completely.

KEY RULE

Order matters: in general f(g(x))≠g(f(x))f(g(x)) \ne g(f(x)).

COMMON MISTAKE

“f(g(2))f(g(2)) means f(2)f(2) times g(2)g(2).”

Composition is not multiplication. f(2)⋅g(2)=1⋅5=5f(2) \cdot g(2) = 1 \cdot 5 = 5, but f(g(2))=22f(g(2)) = 22. In f(g(2))f(g(2)), the value g(2)g(2) goes INTO ff.

“f(g(2))f(g(2)): do ff first, because ff is written first.”

Read from the inside out. The function next to the input acts first. Doing ff first gives g(f(2))=3g(f(2)) = 3, a different answer.

Quick check

Let f(x)=3x+1f(x) = 3x + 1 and g(x)=x2g(x) = x^2. Find f(g(2))f(g(2)) and g(f(2))g(f(2)).

03

From a Table

x−101234
f(x)352041
g(x)243−110

Worked example

Use the table to find f(g(1))f(g(1)), g(f(1))g(f(1)), f(f(2))f(f(2)), and g(f(0))g(f(0)).

  1. 01

    f(g(1))f(g(1)): g(1)=3g(1) = 3, then f(3)=4f(3) = 4. g(f(1))g(f(1)): f(1)=2f(1) = 2, then g(2)=−1g(2) = -1.

  2. 02

    f(f(2))f(f(2)): f(2)=0f(2) = 0, then f(0)=5f(0) = 5.

  3. 03

    g(f(0))g(f(0)): f(0)=5f(0) = 5, then we need g(5)g(5). The table has no x=5x = 5, so g(f(0))g(f(0)) can't be found from this information.

COMMON MISTAKE

“g(f(0))g(f(0)): f(0)=5f(0) = 5, and I'll just use the last g-value in the table.”

You may only use values that are actually given. If the middle value isn't an input in the table, the composition can't be evaluated from the table. Say so; don't guess.

Quick check

A table gives f(1)=4f(1) = 4, f(4)=2f(4) = 2, g(2)=5g(2) = 5, and g(4)=0g(4) = 0. What is g(f(1))g(f(1))?

04

From a Graph

Figure

Two piecewise-linear functions, each defined only for 0≤x≤60 \le x \le 6.

Worked example

Use the graphs to find f(g(1))f(g(1)), g(f(2))g(f(2)), f(g(4))f(g(4)), and g(f(5))g(f(5)).

  1. 01

    f(g(1))f(g(1)): on the graph of gg, g(1)=3g(1) = 3. On the graph of ff, f(3)=3f(3) = 3. So f(g(1))=3f(g(1)) = 3.

  2. 02

    g(f(2))g(f(2)): f(2)=5f(2) = 5, then g(5)=3g(5) = 3. And f(g(4))f(g(4)): g(4)=2g(4) = 2, then f(2)=5f(2) = 5.

  3. 03

    g(f(5))g(f(5)): f(5)=−1f(5) = -1, but gg is only defined for 0≤x≤60 \le x \le 6. Since −1 is not in the domain of gg, g(f(5))g(f(5)) is undefined.

REAL-LIFE EXAMPLE

Nova's Daily Earnings

D(N(T(w)))D(N(T(w))) gives Nova's daily ad earnings ww weeks after launch. At w=20w = 20 weeks: T(20)=5T(20) = 5 months, N(5)=1,944N(5) = 1,944 subscribers, D(1944)D(1944) = $38.88 per day.

Notice that each function answers one question, with its own units, and the composition chains the answers together.

Worked example

Try it yourself. (a) With f(x)=x2−3f(x) = x^{2} - 3 and g(x)=2x+1g(x) = 2x + 1, find f(g(3))f(g(3)) and g(f(3))g(f(3)). (b) From the table, find g(f(−1))g(f(-1)) and f(f(4))f(f(4)). (c) From the graphs, find f(g(6))f(g(6)).

Answers: (a) g(3)=7g(3) = 7 and f(7)=46f(7) = 46; f(3)=6f(3) = 6 and g(6)=13g(6) = 13. (b) f(−1)=3f(-1) = 3 and g(3)=1g(3) = 1; f(4)=1f(4) = 1 and f(1)=2f(1) = 2. (c) g(6)=4g(6) = 4 and f(4)=1f(4) = 1.

05

Mixing Formulas, Tables, and Graphs

The inside and outside functions don't have to come in the same form. Just evaluate each one in whatever form it is given.

Worked example

Example. f(x)=2x−1f(x) = 2x - 1, and gg is given by the table in Section 3. Find f(g(2))f(g(2)), g(f(2))g(f(2)), and g(f(0))g(f(0)).

  1. 01

    f(g(2))f(g(2)): from the table, g(2)=−1g(2) = -1. Then use the formula: f(−1)=2(−1)−1=−3f(-1) = 2(-1) - 1 = -3.

  2. 02

    g(f(2))g(f(2)): formula first, f(2)=2(2)−1=3f(2) = 2(2) - 1 = 3. Then the table: g(3)=1g(3) = 1.

  3. 03

    g(f(0))g(f(0)): f(0)=−1f(0) = -1, and the table gives g(−1)=2g(-1) = 2.

    A function can also be composed with itself on a graph. Using the graphs in Section 4: g(g(0))=g(4)=2g(g(0)) = g(4) = 2, and f(f(0))=f(1)=3f(f(0)) = f(1) = 3.

    And with Nova's chain of formulas: 4 weeks after launch, T(4)=1T(4) = 1 month, N(1)=384N(1) = 384 subscribers, D(384)D(384) = $7.68 per day.

COMMON MISTAKE

“To find f(g(1))f(g(1)) on the graph, I look for where gg equals 1.”

That's running gg backwards. f(g(1))f(g(1)) starts at the INPUT x=1x = 1 on the graph of gg: go to x=1x = 1, read the height g(1)=3g(1) = 3, then use 3 as the input of ff.

06

Practice

Worked example

P1. h(x)=3x−1h(x) = 3x - 1 and k(x)=x2k(x) = x^{2}. Find h(k(2))h(k(2)) and k(h(2))k(h(2)).

Answer: k(2)=4k(2) = 4, h(4)=11h(4) = 11. h(2)=5h(2) = 5, k(5)=25k(5) = 25. Different, because order matters.

Worked example

P2. Use the table in Section 3 to find f(g(3))f(g(3)).

Answer: g(3)=1g(3) = 1, then f(1)=2f(1) = 2.

Worked example

P3. Find Nova's daily earnings 12 weeks after launch, D(N(T(12)))D(N(T(12))).

Answer: T(12)=3T(12) = 3 months, N(3)=864N(3) = 864 subscribers, D(864)D(864) = $17.28 per day.

Worked example

P4. With f(x)=2x−1f(x) = 2x - 1 and the table in Section 3, find f(g(4))f(g(4)) and g(f(1))g(f(1)).

Answer: g(4)=0g(4) = 0, so f(0)=−1f(0) = -1. f(1)=1f(1) = 1, so g(1)=3g(1) = 3.

Common slips

  • “f(g(2))f(g(2)) means f(2)f(2) times g(2)g(2).”

    Composition is not multiplication. f(2)⋅g(2)=1⋅5=5f(2) \cdot g(2) = 1 \cdot 5 = 5, but f(g(2))=22f(g(2)) = 22. In f(g(2))f(g(2)), the value g(2)g(2) Goes into ff.

    “f(g(2))f(g(2)): do ff first, because ff is written first.”

    Read from the inside out. The function next to the input acts first. Doing ff first gives g(f(2))=3g(f(2)) = 3, a different answer.

  • “g(f(0))g(f(0)): f(0)=5f(0) = 5, and I'll just use the last g-value in the table.”

    You may only use values that are actually given. If the middle value isn't an input in the table, the composition can't be evaluated from the table. Say so; don't guess.

  • “To find f(g(1))f(g(1)) on the graph, I look for where gg equals 1.”

    That's running gg backwards. f(g(1))f(g(1)) starts at the input x=1x = 1 on the graph of gg: go to x=1x = 1, read the height g(1)=3g(1) = 3, then use 3 as the input of ff.

Lock it in

Try the flashcards

10 cards · Composition and inverses

Start

Recap card

5 lines to re-read the night before.

  1. 01

    f(g(x))f(g(x)) = (ff ∘ g)(xg)( x): apply gg first, then ff. Work from the inside out.

  2. 02

    Order matters: f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different. Composition is not multiplication.

  3. 03

    From a table or a graph, find the inside value first, then use it as the input of the outside function.

  4. 04

    If the middle value is not in the domain of the outside function (or not given), the composition is undefined or can't be found.

  5. 05

    The pieces can come from any mix of formulas, tables, and graphs. Next, in 2.7B: composing formulas to get a new formula, the domain of a composition, and breaking a function apart into simpler pieces.

Premium feature

Unlock Premium

Every question, sets from your misses, mock exams and more.

Current accessFree

  • Every practice question
  • Sets from your misses
  • Mock exams

Free during early access — no card. Your progress stays exactly where it is. Compare plans