Function Composition Calculator

Calculate composite functions (f∘g)(x) = f(g(x)). Evaluate functions at values, compose two functions, and find the domain restrictions of composite functions.

∑ Algebra📐 (f∘g)(x) = f(g(x))🔢 Math
g(x) evaluated at x: g(x₀)
Then apply f: coefficient a (for ax²+b)
Constant b in f
Exponent n in f (f(u)=auⁿ+b)
Input x₀
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Function Composition Calculator(f∘g)(x) = f(g(x))output value

Step-by-Step Examples

Example 1
f(g(2))

g(x)=3x+1, so g(2)=7. f(u)=u²: f(g(2))=f(7)=49.

  • Step 1: g(2) = 3(2)+1 = 7
  • Step 2: f(7) = 7² = 49
  • Result: (f∘g)(2) = 49
✓ (f∘g)(2) = 49
Example 2
Chain Order Matters

f(x)=x+3, g(x)=2x. f(g(1)) vs g(f(1)).

  • f(g(1)) = f(2) = 5
  • g(f(1)) = g(4) = 8
  • f∘g ≠ g∘f!
✓ f(g(1))=5, g(f(1))=8 — ORDER MATTERS
Example 3
Linear Composition

f(x)=2x+1, g(x)=3x−2. (f∘g)(x)=?

  • g(x)=3x−2, then f(3x−2)=2(3x−2)+1=6x−3
  • (f∘g)(x) = 6x−3
✓ (f∘g)(x) = 6x − 3

Real-World Applications

Common Mistakes to Avoid

⚠️
Order of composition

(f∘g)(x) means apply g FIRST, then f. The rightmost function is applied first.

⚠️
Domain restrictions

Domain of (f∘g) requires: x in domain of g, AND g(x) in domain of f. Both must be satisfied.

⚠️
f(g(x)) ≠ f(x)×g(x)

Composition is not multiplication. f(g(x)) substitutes g(x) INTO f, it does not multiply the outputs.

Frequently Asked Questions

What is function composition?
(f∘g)(x) = f(g(x)): apply g to x first, then apply f to the result. Like a pipeline: output of g becomes input of f.
What is the chain rule?
In calculus, d/dx[f(g(x))] = f'(g(x)) × g'(x). The derivative of a composite function. Requires identifying the outer and inner functions.
When is composition undefined?
When g(x) is not in the domain of f. Example: f(x)=√x, g(x)=x−3. f(g(x))=√(x−3) requires x≥3.
Is composition associative?
Yes: (f∘g)∘h = f∘(g∘h). You can associate in any order. But it is NOT commutative: f∘g ≠ g∘f generally.
What is the identity function?
f(x) = x. Composing with identity: f∘id = id∘f = f. The identity is the 'do nothing' function.

Related Math Calculators

Formula Explorer connections

Interpretation: This formula describes an algebraic relationship among variables, functions, equations, roots or sequences. Assumption: Respect the expression’s domain and excluded values. Check roots in the original equation because transformations can introduce extraneous solutions.

Function Graphing Calculator →Function Transformation Calculator →Geometric Sequence and Series Calculator →Math Formula Explorer →