Function Composition Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Function Composition.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

Function composition applies one function to the output of another: (f \circ g)(x) = f(g(x)), meaning evaluate g first, then apply f to the result.

Chain two machines togetherβ€”output of the first goes into the second.

Read the full concept explanation β†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: Composition chains functions in sequence: the output of g feeds directly into f as its input. Order matters: f \circ g \neq g \circ f in general.

Common stuck point: f(g(x)) \neq g(f(x)) in general. Composition is not commutative.

Sense of Study hint: Work inside-out: first evaluate g(x) to get a number, then plug that number into f. Write each step separately.

Worked Examples

Example 1

easy
Given f(x) = 2x + 1 and g(x) = x^2, find (f \circ g)(3).

Solution

  1. 1
    (f \circ g)(3) means f(g(3)), so evaluate the inner function first.
  2. 2
    Compute g(3) = 3^2 = 9.
  3. 3
    Substitute that result into f: f(9) = 2(9) + 1 = 19.

Answer

19
Function composition works from the inside out: evaluate the inner function first, then feed its output into the outer function.

Example 2

medium
Given f(x) = x + 3 and g(x) = 2x^2 - 1, find the formula for (g \circ f)(x).

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
Given f(x) = x - 4 and g(x) = 3x, find (f \circ g)(5).

Example 2

hard
Given f(x) = \sqrt{x} and g(x) = x^2 + 5, find the domain of (f \circ g)(x).

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

function definition