Intermediate

Function Composition Calculator

Compose two linear functions and evaluate the resulting composite at any point in one step.
In f(x) = a₁·x + b₁
In f(x) = a₁·x + b₁
In g(x) = a₂·x + b₂
In g(x) = a₂·x + b₂
Where to evaluate (f∘g)(x)
(f∘g)(x₀)
5

Value of the composite function at x₀

Composite function (f∘g)(x)
(f∘g)(x) = 2x - 5
g(x₀)
1
f(g(x₀))
5
Composite slope
2
Composite intercept
-5
00.81.52.333.84.55.36Composition pipeline: x₀ → g(x₀) → (f∘g)(x₀)
Step by step
  1. 1

    Inner result g(x₀) = a₂ × x₀ + b₂

    1 × 5 + -4 = 1
  2. 2

    Composite slope a₁ × a₂

    2 × 1 = 2
  3. 3

    Composite intercept a₁ × b₂ + b₁

    2 × -4 + 3 = -5
  4. 4

    (f∘g)(x₀) = slope × x₀ + intercept

    2 × 5 + -5 = 5
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Function composition (f∘g)(x) applies g first, then f, giving f(g(x)). For linear f(x)=a₁x+b₁ and g(x)=a₂x+b₂, the composite simplifies to (a₁·a₂)x + (a₁·b₂+b₁). Enter both functions and a point x₀ to get the composite equation and its value instantly.

Formula
(f∘g)(x) = f(g(x)) = a₁·(a₂·x + b₂) + b₁ = (a₁·a₂)x + (a₁·b₂ + b₁)
How this is calculated

You define two linear functions: f(x) = a₁·x + b₁ and g(x) = a₂·x + b₂, by entering their leading coefficients (a₁, a₂) and constant terms (b₁, b₂). You also choose an evaluation point x₀.

Composition means feeding g(x) into f. Substituting g(x) for the input of f gives (f∘g)(x) = a₁·(a₂·x + b₂) + b₁. Expanding and collecting like terms produces another linear function with slope a₁·a₂ and intercept a₁·b₂ + b₁. The calculator displays this simplified composite line and evaluates it at x₀.

Because both inputs are linear, the composite is always linear too, so the simplification is exact. Note that order matters: (f∘g) is generally different from (g∘f). All coefficients are unitless real numbers; if a₁·a₂ = 0 the composite collapses to a horizontal line, which is still valid.

Frequently asked questions

Composition (f∘g)(x) means applying g first, then applying f to that result: f(g(x)). It chains two functions into one.

Yes. In general (f∘g)(x) ≠ (g∘f)(x). Swapping which function is applied first usually changes both the slope and the intercept of the result.

Substituting one linear expression into another only multiplies and adds constants, so the highest power of x stays 1, keeping the result linear.

Also known as

function composition
f of g
composite function
(f∘g)(x)
compose functions
fog gof
f composed with g

APA

TG we-Calculate Editorial Team. (2026). Function Composition Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/function-composition-calculator

Chicago

TG we-Calculate Editorial Team. "Function Composition Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/function-composition-calculator.

IEEE

TG we-Calculate Editorial Team, "Function Composition Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/function-composition-calculator

BibTeX

@misc{wecalculate_function_composition_calculator, title = {Function Composition Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/function-composition-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?