Function Composition: Building New Functions from Existing Ones

Master function composition through 5 detailed exercises with step-by-step solutions, visual explanations, and comprehensive learning materials.

Core Concepts & Notation
\( (f \circ g)(x) = f(g(x)) \)
Composition Notation
\( (g \circ f)(x) = g(f(x)) \)
Reverse Composition
\( f(g(h(x))) \)
Triple Composition
\( (f \circ g \circ h)(x) \)
Multiple Composition
Key Definitions:

Function Composition: Creating a new function by applying one function to the result of another

Notation (f ∘ g)(x): Read as "f composed with g of x" or "f of g of x"

Order Matters: In general, (f ∘ g)(x) ≠ (g ∘ f)(x) - composition is not commutative

Domain Restrictions: The output of the inner function must be in the domain of the outer function

Composition Process:
  1. Identify functions: Determine which function is the inner and outer function
  2. Substitute: Replace the input variable of the outer function with the entire inner function
  3. Simplify: Perform algebraic operations to get the final expression
  4. Check domain: Ensure the composition is defined for the given inputs
Memory Tip: Think of function composition as a chain: g(x) feeds into f(x)
Memory Tip: Order matters! f(g(x)) ≠ g(f(x)) in general
Key Note: Always evaluate from inside out: g(x) first, then f(g(x))
Solution: Exercises 1 to 3
1 Basic Composition
Exercise 1
Given \( f(x) = 2x + 3 \) and \( g(x) = x^2 - 1 \), find \( (f \circ g)(x) \) and \( (g \circ f)(x) \).
Strategy:

For (f ∘ g)(x): Substitute g(x) into f(x). For (g ∘ f)(x): Substitute f(x) into g(x).

Solution Steps:
  1. Find (f ∘ g)(x) by substituting g(x) into f(x)
  2. Find (g ∘ f)(x) by substituting f(x) into g(x)
  3. Compare results to demonstrate non-commutativity
Given
\( f(x) = 2x + 3, g(x) = x^2 - 1 \)
Composition
\( (f \circ g)(x) \)
Result
\( 2x^2 + 1 \)
Step 1: Find (f ∘ g)(x)

\( (f \circ g)(x) = f(g(x)) \)

Substitute g(x) = x² - 1 into f(x) = 2x + 3

\( f(g(x)) = f(x^2 - 1) = 2(x^2 - 1) + 3 \)

Step 2: Simplify the expression

\( f(g(x)) = 2(x^2 - 1) + 3 = 2x^2 - 2 + 3 = 2x^2 + 1 \)

Step 3: Find (g ∘ f)(x)

\( (g \circ f)(x) = g(f(x)) \)

Substitute f(x) = 2x + 3 into g(x) = x² - 1

\( g(f(x)) = g(2x + 3) = (2x + 3)^2 - 1 \)

Step 4: Expand and simplify

\( g(f(x)) = (2x + 3)^2 - 1 = 4x^2 + 12x + 9 - 1 = 4x^2 + 12x + 8 \)

Step 5: Compare the results

\( (f \circ g)(x) = 2x^2 + 1 \)

\( (g \circ f)(x) = 4x^2 + 12x + 8 \)

Since they are different, composition is not commutative.

\( (f \circ g)(x) = 2x^2 + 1 \)
\( (g \circ f)(x) = 4x^2 + 12x + 8 \)
Compositions:

\( (f \circ g)(x) = 2x^2 + 1 \)

\( (g \circ f)(x) = 4x^2 + 12x + 8 \)

Applied Rules:

• Substitution: Replace input variable with entire function

• Algebraic Expansion: Expand binomials when necessary

• Non-Commutativity: Order of composition matters

2 Fractional Functions
Exercise 2
Given \( f(x) = \frac{1}{x} \) and \( g(x) = x + 2 \), find \( (f \circ g)(x) \) and state the domain.
Strategy:

Substitute g(x) into f(x): Replace x in f(x) with g(x), then determine domain restrictions.

Given
\( f(x) = \frac{1}{x}, g(x) = x + 2 \)
Composition
\( (f \circ g)(x) \)
Result
\( \frac{1}{x+2} \)
Step 1: Find (f ∘ g)(x)

\( (f \circ g)(x) = f(g(x)) \)

Substitute g(x) = x + 2 into f(x) = 1/x

\( f(g(x)) = f(x + 2) = \frac{1}{x + 2} \)

Step 2: Determine the domain

For f(g(x)) to be defined, we need g(x) ≠ 0 (since f(x) = 1/x)

So x + 2 ≠ 0, which means x ≠ -2

Step 3: Also check the domain of g(x)

g(x) = x + 2 is defined for all real numbers

Step 4: Combine domain restrictions

The domain of (f ∘ g)(x) is all real numbers except x = -2

\( (f \circ g)(x) = \frac{1}{x + 2}, x \neq -2 \)
Composition & Domain:

\( (f \circ g)(x) = \frac{1}{x + 2} \)

Domain: \( x \in \mathbb{R}, x \neq -2 \)

Applied Rules:

• Domain Restriction: Output of inner function must be in domain of outer function

• Rational Functions: Denominator cannot be zero

• Composition Domain: Intersection of all relevant domains

3 Radical Functions
Exercise 3
Given \( f(x) = \sqrt{x} \) and \( g(x) = 4 - x^2 \), find \( (f \circ g)(x) \) and state its domain.
Strategy:

Substitute g(x) into f(x): Replace x in f(x) with g(x), then determine domain restrictions for both functions.

Given
\( f(x) = \sqrt{x}, g(x) = 4 - x^2 \)
Composition
\( (f \circ g)(x) \)
Result
\( \sqrt{4-x^2} \)
Step 1: Find (f ∘ g)(x)

\( (f \circ g)(x) = f(g(x)) \)

Substitute g(x) = 4 - x² into f(x) = √x

\( f(g(x)) = f(4 - x^2) = \sqrt{4 - x^2} \)

Step 2: Determine domain restrictions

For f(g(x)) to be defined, we need g(x) ≥ 0 (since f(x) = √x)

So 4 - x² ≥ 0

Step 3: Solve the inequality

4 - x² ≥ 0

4 ≥ x²

x² ≤ 4

-2 ≤ x ≤ 2

Step 4: Check domain of g(x)

g(x) = 4 - x² is defined for all real numbers

Step 5: State the final domain

The domain of (f ∘ g)(x) is [-2, 2]

\( (f \circ g)(x) = \sqrt{4 - x^2}, x \in [-2, 2] \)
Composition & Domain:

\( (f \circ g)(x) = \sqrt{4 - x^2} \)

Domain: \( x \in [-2, 2] \)

Applied Rules:

• Radical Functions: Argument must be non-negative

• Domain Intersection: All restrictions must be satisfied

• Inequality Solving: Solve step by step

Solution: Exercises 4 to 5
4 Three-Function Composition
Exercise 4
Given \( f(x) = x^2 \), \( g(x) = 2x + 1 \), and \( h(x) = x - 3 \), find \( (f \circ g \circ h)(x) \).
Recognition Pattern:

Chain of compositions: Evaluate from right to left: h(x), then g(h(x)), then f(g(h(x))).

Given
\( f(x) = x^2, g(x) = 2x + 1, h(x) = x - 3 \)
Chain
\( h(x) \to g(h(x)) \to f(g(h(x))) \)
Result
\( (2x-5)^2 \)
Step 1: Start with the innermost function

\( h(x) = x - 3 \)

Step 2: Find g(h(x))

\( g(h(x)) = g(x - 3) = 2(x - 3) + 1 = 2x - 6 + 1 = 2x - 5 \)

Step 3: Find f(g(h(x)))

\( f(g(h(x))) = f(2x - 5) = (2x - 5)^2 \)

Step 4: Expand if needed

\( (2x - 5)^2 = 4x^2 - 20x + 25 \)

Step 5: Write the final answer

\( (f \circ g \circ h)(x) = (2x - 5)^2 = 4x^2 - 20x + 25 \)

\( (f \circ g \circ h)(x) = (2x - 5)^2 = 4x^2 - 20x + 25 \)
Triple Composition:

\( (f \circ g \circ h)(x) = (2x - 5)^2 \)

Applied Rules:

• Right-to-Left Evaluation: Evaluate compositions from inside out

• Chain Rule: Each function feeds into the next

• Binomial Expansion: Expand when necessary

5 Evaluating at Specific Points
Exercise 5
Given \( f(x) = 3x - 4 \) and \( g(x) = x^2 + 1 \), find \( (f \circ g)(2) \) and \( (g \circ f)(-1) \).
Strategy:

Two approaches: Either find the general composition then evaluate, or evaluate step by step.

Given
\( f(x) = 3x - 4, g(x) = x^2 + 1 \)
Evaluation
\( (f \circ g)(2) \)
Result
\( 7 \)
Step 1: Find (f ∘ g)(2) - Method 1

First find g(2): \( g(2) = 2^2 + 1 = 4 + 1 = 5 \)

Then find f(g(2)) = f(5): \( f(5) = 3(5) - 4 = 15 - 4 = 11 \)

Step 2: Find (f ∘ g)(2) - Method 2

Find the general composition: \( (f \circ g)(x) = f(x^2 + 1) = 3(x^2 + 1) - 4 = 3x^2 + 3 - 4 = 3x^2 - 1 \)

Then evaluate at x = 2: \( (f \circ g)(2) = 3(2)^2 - 1 = 3(4) - 1 = 12 - 1 = 11 \)

Step 3: Find (g ∘ f)(-1)

First find f(-1): \( f(-1) = 3(-1) - 4 = -3 - 4 = -7 \)

Then find g(f(-1)) = g(-7): \( g(-7) = (-7)^2 + 1 = 49 + 1 = 50 \)

Step 4: Verify with general composition

Find general composition: \( (g \circ f)(x) = g(3x - 4) = (3x - 4)^2 + 1 \)

\( = 9x^2 - 24x + 16 + 1 = 9x^2 - 24x + 17 \)

At x = -1: \( (g \circ f)(-1) = 9(-1)^2 - 24(-1) + 17 = 9 + 24 + 17 = 50 \)

\( (f \circ g)(2) = 11, (g \circ f)(-1) = 50 \)
Specific Evaluations:

\( (f \circ g)(2) = 11 \)

\( (g \circ f)(-1) = 50 \)

Applied Rules:

• Point Evaluation: Either compose then evaluate or evaluate step by step

• Order of Operations: Always follow function order

• Verification: Use both methods to verify answer

Comprehensive Theory & Applications
\( (f \circ g)(x) = f(g(x)) \)
Basic Composition
Associative
\((f \circ g) \circ h = f \circ (g \circ h)\)
Grouping doesn't matter
Non-Commutative
\(f \circ g \neq g \circ f\)
Order matters
Identity
\(f \circ I = I \circ f = f\)
I(x) = x
Inverse
\(f \circ f^{-1} = f^{-1} \circ f = I\)
If inverse exists
Key Properties:

Domain Considerations: The range of the inner function must be contained in the domain of the outer function

Associativity: Composition is associative: (f ∘ g) ∘ h = f ∘ (g ∘ h)

Non-Commutativity: Generally f ∘ g ≠ g ∘ f

Identity Element: The identity function I(x) = x acts as an identity element

Advanced Techniques:
  1. Step-by-step evaluation: Evaluate inner functions first
  2. Domain analysis: Check restrictions at each step
  3. Pattern recognition: Identify when compositions simplify
  4. Graphical interpretation: Understand composition visually
Memory Aid: Think "f of g of x" - work from inside out
Memory Aid: Order matters like putting on clothes: socks then shoes
Key Note: Always check domain restrictions after composition
Common Mistake: Confusing order of composition
Applications: Physics, engineering, computer science, economics
Exam Tips: Practice order, check domains, verify non-commutativity
Essential Rules:

• Composition Order: (f ∘ g)(x) = f(g(x)) - evaluate g first

• Domain Restriction: Range of g ⊆ Domain of f

• Associativity: (f ∘ g) ∘ h = f ∘ (g ∘ h)

• Non-Commutativity: f ∘ g ≠ g ∘ f in general

• Identity Function: I(x) = x, where f ∘ I = I ∘ f = f

Questions & Answers

Question: I'm confused about why (f ∘ g)(x) is not the same as (g ∘ f)(x). Can you explain why order matters in function composition?

Answer: Function composition is not commutative because of the sequential nature of the operations:

  • (f ∘ g)(x): First apply g to x, then apply f to the result of g(x)
  • (g ∘ f)(x): First apply f to x, then apply g to the result of f(x)
  • These are different processes: The functions operate on different inputs

Think of it like putting on clothes: socks then shoes is different from shoes then socks. In our example with f(x) = 2x + 3 and g(x) = x² - 1:

  • f(g(x)) = f(x² - 1) = 2(x² - 1) + 3 = 2x² + 1
  • g(f(x)) = g(2x + 3) = (2x + 3)² - 1 = 4x² + 12x + 8

These are completely different functions, demonstrating that order matters in composition.

Question: How do I determine the domain of a composite function (f ∘ g)(x)?

Answer: To find the domain of (f ∘ g)(x), you must consider multiple constraints:

  1. Domain of g(x): x must be in the domain of g
  2. Range compatibility: g(x) must be in the domain of f
  3. Combine restrictions: The domain is the intersection of all constraints

For example, with f(x) = √x and g(x) = 4 - x²:

  • g(x) = 4 - x² is defined for all real numbers
  • For f(g(x)) = √(4 - x²) to be defined, we need 4 - x² ≥ 0
  • This gives us x² ≤ 4, so -2 ≤ x ≤ 2

Therefore, the domain of (f ∘ g)(x) is [-2, 2].

Question: Is function composition associative? What does that mean?

Answer: Yes, function composition is associative. This means:

((f ∘ g) ∘ h)(x) = (f ∘ (g ∘ h))(x)

In other words, when composing three functions, it doesn't matter which pair you compose first:

  • You can first compose f and g, then compose the result with h
  • OR you can first compose g and h, then compose f with the result
  • Both approaches yield the same final function

For example, with f(x) = x², g(x) = 2x + 1, h(x) = x - 3:

  • Method 1: ((f ∘ g) ∘ h)(x) = (f ∘ g)(h(x)) = (f ∘ g)(x - 3) = f(g(x - 3)) = f(2(x - 3) + 1) = f(2x - 5) = (2x - 5)²
  • Method 2: (f ∘ (g ∘ h))(x) = f((g ∘ h)(x)) = f(g(h(x))) = f(g(x - 3)) = f(2x - 5) = (2x - 5)²

Both methods give the same result, demonstrating associativity.