Unit 2 · Topic 2.7

Composition of Functions

A composite function chains two functions: f(g(x)) puts the output of g into f .

Practice 1: Procedural and Symbolic FluencyPractice 2: Multiple Representations

Part 1 · Hook

Why this matters

A store takes $15 off a jacket, then adds 8% sales tax. Another store adds the tax first and then takes $15 off. Each store applies two functions, one after the other, but the totals differ by $1.20. Chaining functions is called composition, and the order you chain them in matters.

Part 2 · Before you start

What this builds on

Part 3 · Prerequisite check

Quick check before you start

1. If g(x)=x2−1g(x) = x^2 - 1, what is g(3)g(3)?

  1. 88
  2. 55
  3. 44
  4. 99
Show the answer

Replace xx by 33: 32−1=83^2 - 1 = 8.

  • Correct: 88:
  • 55:
  • 44:
  • 99:

2. How is the graph of y=x−2y = \sqrt{x - 2} related to the graph of y=xy = \sqrt{x}?

  1. Shifted 2 units right
  2. Shifted 2 units left
  3. Shifted 2 units down
  4. Stretched by a factor of 2
Show the answer

Subtracting 22 from the input moves the graph 22 units right.

  • Correct: Shifted 2 units right:
  • Shifted 2 units left:
  • Shifted 2 units down:
  • Stretched by a factor of 2:

Part 4 · See it

See it first

Graphs of f(x) = square root of x and f(g(x)) = square root of (x - 2): the composite is f moved 2 units right, so (4, 2) moves to (6, 2).
With g(x)=x−2g(x) = x - 2 inside, f(g(x))=x−2f(g(x)) = \sqrt{x - 2}: each point of f(x)=xf(x) = \sqrt{x} moves 22 units right, and the domain becomes x≥2x \ge 2. LevlPrep original diagram.

Part 5 · Step by step

How it works, step by step

  1. Start with an input xxthe inner function gg turns it into g(x)g(x)
  2. Use g(x)g(x) as the input of the outer function ffthe output is f(g(x))f(g(x)), also written (f∘g)(x)(f \circ g)(x)
  3. Change the order to g(f(x))g(f(x))the output usually changes: composition is not commutative
  4. An input xx gives a g(x)g(x) that ff cannot takethat xx is left out of the domain of f(g(x))f(g(x))

Part 6 · Key ideas

Key ideas

  • f(g(x))f(g(x)) means: find g(x)g(x) first, then put that output into ff. Work from the inside out and write the inner value down.
  • Order matters. f(g(x))f(g(x)) and g(f(x))g(f(x)) are usually different functions.
  • The domain of f(g(x))f(g(x)): inputs xx in the domain of gg whose outputs g(x)g(x) are in the domain of ff.
  • The identity function I(x)=xI(x) = x changes nothing: f(I(x))=I(f(x))=f(x)f(I(x)) = I(f(x)) = f(x), as adding 00 or multiplying by 11.
  • Composites work in every form: read a table or graph twice, or substitute one formula into the other.

Part 7 · Misconception

A common mistake

The wrong idea: To find f(g(2))f(g(2)), find f(2)f(2) first and then put it into gg.

What actually happens: Work from the inside out: g(2)g(2) first, then use that output as the input of ff. Show the inner value: g(2)=0g(2) = 0, so f(g(2))=f(0)=4f(g(2)) = f(0) = 4.

Part 8 · Check yourself

Check yourself

Exam-style questions. Anything you miss goes into your review queue.

Table

Values of ff and gg

Selected values of the functions f and g
xx-101234
f(x)f(x)24132-1
g(x)g(x)32401-1

1. Using the table, what is the value of f(g(2))f(g(2))?

  1. 44
  2. 11
  3. 00
  4. 33
Show the answer

Inside first: g(2)=0g(2) = 0. Then f(g(2))=f(0)=4f(g(2)) = f(0) = 4.

  • Correct: 44: Right: the inner value is g(2)=0g(2) = 0, and f(0)=4f(0) = 4.
  • 11: This is g(f(2))=g(3)=1g(f(2)) = g(3) = 1: the functions were used in the reverse order.
  • 00: This is only the inner value g(2)=0g(2) = 0; it still has to go into ff.
  • 33: This is f(2)=3f(2) = 3; the input 22 must go through gg first.

2. Using the table, find g(f(−1))g(f(-1)).

No calculator. Type the exact value (a fraction, π, e or a root is fine).

Show the answer

Inside first: f(−1)=2f(-1) = 2. Then g(f(−1))=g(2)=0g(f(-1)) = g(2) = 0.

  • Answer: 0

3. Using the table, for which values of xx is f(g(x))=2f(g(x)) = 2? Select every value that works.

  1. x=−1x = -1
  2. x=0x = 0
  3. x=3x = 3
  4. x=4x = 4
Show the answer

ff gives 22 for two inputs, −1-1 and 33. So g(x)g(x) must be −1-1 or 33: g(4)=−1g(4) = -1 and g(−1)=3g(-1) = 3. Both x=−1x = -1 and x=4x = 4 work.

  • Correct: x=−1x = -1: g(−1)=3g(-1) = 3 and f(3)=2f(3) = 2, so f(g(−1))=2f(g(-1)) = 2.
  • x=0x = 0: g(0)=2g(0) = 2 and f(2)=3f(2) = 3, so f(g(0))=3f(g(0)) = 3.
  • x=3x = 3: f(3)=2f(3) = 2, but the input 33 goes into gg first: f(g(3))=f(1)=1f(g(3)) = f(1) = 1.
  • Correct: x=4x = 4: g(4)=−1g(4) = -1 and f(−1)=2f(-1) = 2, so f(g(4))=2f(g(4)) = 2.

Graph

The graphs of ff and gg

The line is f(x)=2x−1f(x) = 2x - 1 and the parabola is g(x)=(x−1)2−2g(x) = (x - 1)^2 - 2.
−2−112345−6−5−4−3−2−1123456789xyfg

4. Use the graphs to find g(f(1))g(f(1)).

  1. −2-2
  2. −5-5
  3. 11
  4. −1-1
Show the answer

Read f(1)=1f(1) = 1 on the line, then g(1)=−2g(1) = -2 at the vertex of the parabola. So g(f(1))=−2g(f(1)) = -2.

  • Correct: −2-2: Inside first: f(1)=1f(1) = 1, then g(1)=−2g(1) = -2.
  • −5-5: This is f(g(1))=f(−2)=−5f(g(1)) = f(-2) = -5, the reverse order.
  • 11: This is the inner value f(1)=1f(1) = 1; it still goes into gg.
  • −1-1: This adds f(1)+g(1)=1+(−2)f(1) + g(1) = 1 + (-2); a composite feeds one output into the other function.

5. Use the graphs to find f(g(3))f(g(3)).

No calculator. Type the exact value (a fraction, π, e or a root is fine).

Show the answer

Read g(3)=2g(3) = 2 on the parabola, then f(2)=3f(2) = 3 on the line. So f(g(3))=3f(g(3)) = 3.

  • Answer: 3

6. Let f(x)=xf(x) = \sqrt{x} and g(x)=6−2xg(x) = 6 - 2x. What is the domain of f(g(x))f(g(x))?

  1. x≤3x \le 3
  2. x≥3x \ge 3
  3. x≥0x \ge 0
  4. x≤6x \le 6
Show the answer

f(g(x))=6−2xf(g(x)) = \sqrt{6 - 2x} needs 6−2x≥06 - 2x \ge 0, so 2x≤62x \le 6 and x≤3x \le 3.

  • Correct: x≤3x \le 3: The inner output 6−2x6 - 2x must be in the domain of ff: 6−2x≥06 - 2x \ge 0 gives x≤3x \le 3.
  • x≥3x \ge 3: Dividing −2x≥−6-2x \ge -6 by −2-2 flips the inequality: x≤3x \le 3.
  • x≥0x \ge 0: That is the domain of ff alone. The input of ff is g(x)g(x), so g(x)≥0g(x) \ge 0 is the condition.
  • x≤6x \le 6: The 22 in front of xx was dropped: 6−2x≥06 - 2x \ge 0 gives x≤3x \le 3.

7. The function h(x)=(3x+1)4h(x) = (3x + 1)^4 can be written as h(x)=f(g(x))h(x) = f(g(x)). Which pair of functions works?

  1. f(x)=x4f(x) = x^4 and g(x)=3x+1g(x) = 3x + 1
  2. f(x)=3x+1f(x) = 3x + 1 and g(x)=x4g(x) = x^4
  3. f(x)=(3x)4f(x) = (3x)^4 and g(x)=x+1g(x) = x + 1
  4. f(x)=x4+1f(x) = x^4 + 1 and g(x)=3xg(x) = 3x
Show the answer

The inner step builds 3x+13x + 1, the outer step raises it to the fourth power: f(g(x))=(3x+1)4f(g(x)) = (3x + 1)^4.

  • Correct: f(x)=x4f(x) = x^4 and g(x)=3x+1g(x) = 3x + 1: f(g(x))=(3x+1)4f(g(x)) = (3x + 1)^4: gg does the first step and ff the last.
  • f(x)=3x+1f(x) = 3x + 1 and g(x)=x4g(x) = x^4: Reversed: f(g(x))=3x4+1f(g(x)) = 3x^4 + 1.
  • f(x)=(3x)4f(x) = (3x)^4 and g(x)=x+1g(x) = x + 1: f(g(x))f(g(x))=(3(x+1))4= (3(x + 1))^4=(3x+3)4= (3x + 3)^4.
  • f(x)=x4+1f(x) = x^4 + 1 and g(x)=3xg(x) = 3x: f(g(x))=(3x)4+1f(g(x)) = (3x)^4 + 1: the +1+1 happens after the power.

Part 9 · Summary

Summary

A composite function chains two functions: f(g(x))f(g(x)) puts the output of gg into ff. Evaluate from the inside out and show the inner value. The order matters, the domain is the inputs whose inner outputs ff can take, and the identity function I(x)=xI(x) = x leaves any function unchanged. You can compose from tables, graphs or formulas, and take a function apart into an inner and an outer step.

Part 10 · Up next

What comes next

Part 11 · Connections

Connections