CalcWorldHub
Free online calculator · no signup

Linear function composition calculator

Compose two linear functions and evaluate both possible orders at an input value.

4,000 tools
Linear function composition calculator — f slope a, f intercept b, g slope c and calculation method
Linear function composition calculator: inputs and calculation method.

How to use this calculator

Compose two linear functions and evaluate both possible orders at an input value.

  1. Enter f slope a, f intercept b, g slope c, g intercept d, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Math guide

How this calculation works

Function composition applies the inner affine map first and the outer map second. Reversing the order can change the composite intercept and evaluated result, even when both functions are linear.

Inputs and meanings

a — f slope a
Enter the coefficient of x in f(x)=ax+b.
b — f intercept b
Enter the constant term in f(x)=ax+b.
c — g slope c
Enter the coefficient of x in g(x)=cx+d.
d — g intercept d
Enter the constant term in g(x)=cx+d.
x — Input x
Enter the value at which to evaluate both compositions.

Formula and method

For f(x)=ax+b and g(x)=cx+d, (f∘g)(x)=a(cx+d)+b; (g∘f)(x)=c(ax+b)+d.

Function order matters: in general, f(g(x)) differs from g(f(x)). The calculator reports each composite’s coefficients and its value at the entered x.

Worked example

Let f(x)=2x+1 and g(x)=3x−2 at x=4. Then f(g(4))=f(10)=21 and f∘g=6x−3, while g(f(4))=g(9)=25 and g∘f=6x+1.

Assumptions and limits

The inputs describe real-valued linear functions. Results are direct evaluations, without symbolic simplification beyond the linear coefficients.

Frequently asked questions

What does f composed with g mean?

It means evaluate g first, then use that result as the input to f.

Do composition orders always give the same answer?

No. The two orders can produce different values, as the worked example shows.

Can this compose quadratic functions?

No. The inputs are restricted to linear functions.

How do I use the Linear function composition calculator?

Enter f slope a, f intercept b, g slope c, g intercept d, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Linear function composition?

Let f(x)=2x+1 and g(x)=3x−2 at x=4. Then f(g(4))=f(10)=21 and f∘g=6x−3, while g(f(4))=g(9)=25 and g∘f=6x+1.