Core Concept

What is Composition?

The composition of functions f and g, written f(g(x)) or (f ∘ g)(x), means: apply g first, then apply f to the result.

x → [g] → g(x) → [f] → f(g(x))

Think of it like a two-step machine: input x goes into the first machine (g), and whatever comes out goes into the second machine (f).

Example 1

Evaluating a Composition at a Number

Let f(x) = 2x + 1 and g(x) = x². Find f(g(3)).

1. Work from the inside out. Find g(3) first:
2. g(3) = (3)² = 9
3. Now find f(9):
4. f(9) = 2(9) + 1 = 19
5. So f(g(3)) = 19

Example 2

Finding the Composite Function f(g(x))

Using the same f(x) = 2x + 1 and g(x) = x², find f(g(x)) as a single expression.

1. f(g(x)) means: replace x in f with g(x)
2. f(x) = 2x + 1
3. f(g(x)) = 2·g(x) + 1
4. = 2(x²) + 1
5. = 2x² + 1

Verify: using x = 3 gives 2(9) + 1 = 19 ✓

Critical Point

Order Matters!

In general, f(g(x)) ≠ g(f(x)). Composition is NOT commutative.

Using the same functions, find g(f(x)):

1. g(f(x)) means: replace x in g with f(x)
2. g(x) = x²
3. g(f(x)) = (f(x))²
4. = (2x + 1)²
5. = 4x² + 4x + 1

f(g(x)) = 2x² + 1 but g(f(x)) = 4x² + 4x + 1. They're different!

Example 3

Three-Function Composition

Let f(x) = x + 3, g(x) = 2x, h(x) = x². Find f(g(h(2))).

1. Start innermost: h(2) = (2)² = 4
2. Next: g(h(2)) = g(4) = 2(4) = 8
3. Finally: f(g(h(2))) = f(8) = 8 + 3 = 11

Rule: always work inside-out when evaluating compositions.

Watch Out

Common Mistakes

Your Turn

Try It Yourself

Let f(x) = x + 5 and g(x) = 3x.

Q1. Find f(g(2)).

Show Answer
g(2) = 3(2) = 6
f(g(2)) = f(6) = 6 + 5 = 11

Q2. Find g(f(x)) as a simplified expression.

Show Answer
g(f(x)) = 3·f(x) = 3(x + 5) = 3x + 15

Q3. Find f(g(x)). Is it the same as g(f(x))?

Show Answer
f(g(x)) = f(3x) = 3x + 5
g(f(x)) = 3x + 15
No, they are different!

Key Takeaways

1-Minute Summary

← Lesson 4: Function Notation Take the Unit 1 Quiz →