Skip to content
Calcrivo

Composite Function Calculator

Compute (f∘g)(x) = f(g(x)) by evaluating two functions in sequence at a given x value.

Inputs

Outer function

Inner function

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

26.00000000

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

31.00000000

g(x)

5.00000000

f(x)

17.00000000

Step by step

  1. Values used

    f(x) = x^2 + 1; g(x) = 2*x - 3; x value = 4

  2. Composition

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

  3. Reverse composition

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

  4. (f∘g)(x) = f(g(x))

    = 26.00000000

  5. (g∘f)(x) = g(f(x))

    = 31.00000000

  6. g(x)

    = 5.00000000

  7. f(x)

    = 17.00000000

How it works

Function composition (f∘g)(x) means applying g first, then f to the result: f(g(x)). Note that composition is generally not commutative: f(g(x)) ≠ g(f(x)) in most cases. This calculator evaluates both orders for comparison.

Formulas

Composition

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

f
Outer function
g
Inner function
x
Input value

Reverse composition

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

f
First function applied
g
Second function applied

Frequently Asked Questions

Is f(g(x)) the same as g(f(x))?

Not in general. Function composition is not commutative — the order matters. This calculator shows both so you can compare.

What expressions can I use?

Any expression supported by the parser: polynomials, trig functions, logarithms, exponentials, square roots, etc. Use x as the variable.

You might also need