Composition of functions

Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

About this lesson

Integrated Math III › Building and transforming functions

To save a PDF, choose “Save as PDF” in the print dialog.

Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits

Composition of functions

Building and transforming functions. composition, transformations, inverse functions, even and odd functions

Warm-up

Three quick questions from earlier lessons.

  1. A candle is 32 cm tall when lit and burns 4 cm per hour. Let yy be its height after xx hours.
    1. Its height after 2 hours, in cm:   ?\;?
    2. An equation for yy: y=  ?y = \;?
    3. After how many hours has it burned down?   ?\;?
    4. Let f(x)f(x) be its height after xx hours. Compute f(1)f(1).
    5. By what percent did its height decrease during the first hour?
    6. For how many hours at most is the candle at least 4 cm tall?
  2. f(x)=2x2+7f(x) = 2x^2 + 7. Find f(−2)f(-2).
  3. f(x)=x2+5f(x) = x^2 + 5. Find f(1+2)f(1 + 2).

Discover

gg doubles a number: g(x)=2xg(x) = 2x. ff adds 1: f(x)=x+1f(x) = x + 1. Start with 3: double it, then add 1. You have computed f(g(3))f(g(3)). What is it?

  1. 7
  2. 8
  3. 24

Key idea

Composing means using the output of one function as the input of another.

f(g(x))f(g(x)): first apply gg to xx, then apply ff to the result. Work from the inside out. In general f(g(x))≠g(f(x))f(g(x)) \ne g(f(x)).

Worked example

f(x)=x2f(x) = x^2 and g(x)=x−3g(x) = x - 3. Find f(g(5))f(g(5)), then f(g(x))f(g(x)).

g(5)=5−3=2g(5) = 5 - 3 = 2
The inside first.
f(g(5))=f(2)=4f(g(5)) = f(2) = 4
Then f of that result.
f(g(x))=(x−3)2f(g(x)) = (x - 3)^2
With x: put g(x) = x − 3 in place of x in f.

Your turn, guided

Your turn: f(x)=2x+1f(x) = 2x + 1 and g(x)=x2g(x) = x^2. Find f(g(3))f(g(3)).

g(3)=9g(3) = 9
The inside first.
f(g(3))=f(9)=19f(g(3)) = f(9) = 19
Then 2 · 9 + 1.

Practice ★

  1. f(x)=2x+6f(x) = 2x + 6 and g(x)=x2−3g(x) = x^2 - 3. Find f(g(2))f(g(2)).
  2. f(x)=6x+18f(x) = 6x + 18 and g(x)=x2−13g(x) = x^2 - 13. Find f(g(6))f(g(6)).
  3. f(x)=2x+3f(x) = 2x + 3 and g(x)=x2−1g(x) = x^2 - 1. Find f(g(1))f(g(1)).
  4. f(x)=7x+26f(x) = 7x + 26 and g(x)=x2−30g(x) = x^2 - 30. Find f(g(9))f(g(9)).

Watch out!

Practice ★★

  1. f(x)=2x+9f(x) = 2x + 9 and g(x)=x+2g(x) = x + 2. Write f(g(x))f(g(x)).
  2. f(x)=22x+46f(x) = 22x + 46 and g(x)=x+50g(x) = x + 50. Write f(g(x))f(g(x)).
  3. f(x)=2x+3f(x) = 2x + 3 and g(x)=x+2g(x) = x + 2. Write f(g(x))f(g(x)).
  1. g(1)=5g(1) = 5, g(5)=7g(5) = 7, f(1)=7f(1) = 7 and f(5)=1f(5) = 1. Find f(g(1))f(g(1)).
  2. g(2)=6g(2) = 6, g(6)=7g(6) = 7, f(2)=7f(2) = 7 and f(6)=2f(6) = 2. Find f(g(2))f(g(2)).

Exit ticket

Three questions to check you have got it.

  1. f(x)=2x+6f(x) = 2x + 6 and g(x)=x2−3g(x) = x^2 - 3. Find f(g(2))f(g(2)).
  2. f(x)=6x+18f(x) = 6x + 18 and g(x)=x2−13g(x) = x^2 - 13. Find f(g(6))f(g(6)).
  3. f(x)=2x+3f(x) = 2x + 3 and g(x)=x2−1g(x) = x^2 - 1. Find f(g(1))f(g(1)).

Summary card

Composition

  • f(g(x))f(g(x)): apply gg first, then ff.
  • Work from the inside out.
  • The order matters: f(g(x))f(g(x)) and g(f(x))g(f(x)) usually differ.

Watch out: f(g(x))f(g(x)) is not f(x)⋅g(x)f(x) \cdot g(x).

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. f(x)=5x+3f(x) = 5x + 3. Write f(f(x))f(f(x)).
Sources and credits

Written with this source as a starting point:

sedifier rewrote the text and added its own examples and exercises.

Written with AI assistance; every answer is checked by our math engine. Not yet reviewed by a teacher.

This lesson: CC BY-SA 4.0, © sedifier · All credits