Composition of functions

About this lesson

Precalculus › Functions and their graphs

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

Composition of functions

Functions and their graphs. function notation, domain and range, piecewise functions, composition, inverse functions, transformations of graphs, even and odd functions

Warm-up

Three quick questions from earlier lessons.

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+2f(x) = 2x + 2 and g(x)=x2−2g(x) = x^2 - 2. Find f(g(3))f(g(3)).
  2. f(x)=3x+3f(x) = 3x + 3 and g(x)=x2−4g(x) = x^2 - 4. Find f(g(3))f(g(3)).
  3. f(x)=4x+3f(x) = 4x + 3 and g(x)=x2−1g(x) = x^2 - 1. Find f(g(2))f(g(2)).
  4. f(x)=3x+1f(x) = 3x + 1 and g(x)=x2−5g(x) = x^2 - 5. Find f(g(3))f(g(3)).

Watch out!

Practice ★★

  1. f(x)=6x+6f(x) = 6x + 6 and g(x)=x+5g(x) = x + 5. Write f(g(x))f(g(x)).
  2. f(x)=5x+7f(x) = 5x + 7 and g(x)=x+2g(x) = x + 2. Write f(g(x))f(g(x)).
  3. f(x)=6x+8f(x) = 6x + 8 and g(x)=x+3g(x) = x + 3. 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+2f(x) = 2x + 2 and g(x)=x2−2g(x) = x^2 - 2. Find f(g(3))f(g(3)).
  2. f(x)=3x+3f(x) = 3x + 3 and g(x)=x2−4g(x) = x^2 - 4. Find f(g(3))f(g(3)).
  3. f(x)=4x+3f(x) = 4x + 3 and g(x)=x2−1g(x) = x^2 - 1. Find f(g(2))f(g(2)).

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).

CC BY-SA 4.0