Function Composition Calculator
Compose two linear functions and evaluate the resulting composite at any point in one step.
Value of the composite function at x₀
- 1
Inner result g(x₀) = a₂ × x₀ + b₂
1 × 5 + -4 = 1 - 2
Composite slope a₁ × a₂
2 × 1 = 2 - 3
Composite intercept a₁ × b₂ + b₁
2 × -4 + 3 = -5 - 4
(f∘g)(x₀) = slope × x₀ + intercept
2 × 5 + -5 = 5
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
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
TG we-Calculate Editorial Team. (2026). Function Composition Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/function-composition-calculator
TG we-Calculate Editorial Team. "Function Composition Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/function-composition-calculator.
TG we-Calculate Editorial Team, "Function Composition Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/function-composition-calculator
@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?
