← Algebra II

Algebra II

Function Composition

Lesson

Function composition means applying one function to the result of another. The notation f(g(x))f(g(x))reads as “f of g of x” and means: first do gg, then do ff on the result.

It can also be written using the small circle: (fg)(x)=f(g(x))(f \circ g)(x) = f(g(x)).

To evaluate f(g(x))f(g(x)) at a specific number:

  1. Plug the number into gg first.
  2. Take that result and plug it into ff.

Worked example 1

Given f(x)=x+4f(x) = x + 4 and g(x)=2xg(x) = 2x, find f(g(3))f(g(3)).

First, compute g(3):

g(3)=2(3)=6g(3) = 2(3) = 6

Then plug 6 into f:

f(6)=6+4=10f(6) = 6 + 4 = 10

Worked example 2

With f(x)=x2f(x) = x^2 and g(x)=x3g(x) = x - 3, find g(f(5))g(f(5)).

Order matters! Inner first, then outer:

f(5)=25f(5) = 25
g(25)=253=22g(25) = 25 - 3 = 22

Note that g(f(x))g(f(x)) usually does NOT equal f(g(x))f(g(x)).

Practice

Work through these. Stuck? Click Get a hint.

Warm-Up

Quick problems to get going.

Problem 1

f(x)=x+1,g(x)=2x; find f(g(3))f(x) = x + 1, g(x) = 2x; \text{ find } f(g(3))

Problem 2

f(x)=x+4,g(x)=2x; find f(g(3))f(x) = x + 4, g(x) = 2x; \text{ find } f(g(3))

Problem 3

f(x)=3x,g(x)=x1; find f(g(5))f(x) = 3x, g(x) = x - 1; \text{ find } f(g(5))

Problem 4

f(x)=x2,g(x)=x+5; find f(g(0))f(x) = x - 2, g(x) = x + 5; \text{ find } f(g(0))

Practice

Standard problems matching the lesson.

Problem 5

f(x)=2x+1,g(x)=x3; find f(g(4))f(x) = 2x + 1, g(x) = x - 3; \text{ find } f(g(4))

Problem 6

f(x)=x2,g(x)=x3; find g(f(5))f(x) = x^2, g(x) = x - 3; \text{ find } g(f(5))

Problem 7

f(x)=x2,g(x)=x+1; find f(g(2))f(x) = x^2, g(x) = x + 1; \text{ find } f(g(2))

Problem 8

f(x)=3x2,g(x)=x2; find f(g(2))f(x) = 3x - 2, g(x) = x^2; \text{ find } f(g(2))

Problem 9

f(x)=x+7,g(x)=2x1; find f(g(3))f(x) = x + 7, g(x) = 2x - 1; \text{ find } f(g(3))

Problem 10

f(x)=4x,g(x)=x+2; find g(f(3))f(x) = 4x, g(x) = x + 2; \text{ find } g(f(3))

Problem 11

f(x)=x2+1,g(x)=x2; find f(g(5))f(x) = x^2 + 1, g(x) = x - 2; \text{ find } f(g(5))

Problem 12

f(x)=2x,g(x)=x+3; find f(g(1))f(x) = 2x, g(x) = x + 3; \text{ find } f(g(-1))

Problem 13

f(x)=x6,g(x)=3x; find f(g(4))f(x) = x - 6, g(x) = 3x; \text{ find } f(g(4))

Problem 14

f(x)=x+2,g(x)=x5; find f(g(8))f(x) = -x + 2, g(x) = x - 5; \text{ find } f(g(8))

Problem 15

f(x)=x+3,g(x)=x2; find g(f(2))f(x) = x + 3, g(x) = x^2; \text{ find } g(f(2))

Problem 16

f(x)=5x,g(x)=x4; find f(g(10))f(x) = 5x, g(x) = x - 4; \text{ find } f(g(10))

Challenge

Harder problems — edge cases, trickier numbers, multiple steps.

Problem 17

f(x)=x2,g(x)=2x+1; find f(g(2))f(x) = x^2, g(x) = 2x + 1; \text{ find } f(g(-2))

Problem 18

f(x)=3x4,g(x)=x2+1; find f(g(1))f(x) = 3x - 4, g(x) = x^2 + 1; \text{ find } f(g(-1))

Problem 19

f(x)=2x+5,g(x)=x8; find g(f(g(7)))f(x) = 2x + 5, g(x) = x - 8; \text{ find } g(f(g(7)))

Problem 20

f(x)=2x+3,g(x)=4x; find f(g(1))f(x) = -2x + 3, g(x) = 4 - x; \text{ find } f(g(-1))

Problem 21

f(x)=x2x,g(x)=x+2; find f(g(3))f(x) = x^2 - x, g(x) = x + 2; \text{ find } f(g(-3))

Problem 22

f(x)=x+1,g(x)=2x3; find f(g(f(4)))f(x) = x + 1, g(x) = 2x - 3; \text{ find } f(g(f(4)))