Composing functions, step by step

f(g(2)) means work g(2) first, then feed its answer into f.

The question

Find f(g(5)).

f(x) = −2x − 5, g(x) = −4x − 5; f(g(5))

f(x) = −2x − 5
g(x) = −4x − 5
g(5)=−25
f(−25)=45
f(g(5))=45
  1. f(g(5)) means work the inside first: find g(5), then put THAT answer into f.
  2. g(5): multiply first, −4 × 5 = −20, then −20 − 5 = −25.
  3. Now put −25 into f: −2 × (−25) = 50, then 50 − 5 = 45.
  4. So f(g(5)) = 45.

How it works.

  1. 01

    f(g(5)) means work the inside first: find g(5), then put THAT answer into f.

  2. 02

    g(5): multiply first, −4 × 5 = −20, then −20 − 5 = −25.

  3. 03

    Now put −25 into f: −2 × (−25) = 50, then 50 − 5 = 45.

  4. 04

    So f(g(5)) = 45.