Composite Function Calculator (Linear)
This composite function calculator works out f(g(x)) for two linear functions, showing you both the resulting composite function and its value at a point you choose. Composition means applying one function to the output of another: you first work out g(x), then feed that answer into f. Enter the coefficients for f(x) = ax + b, the coefficients for g(x) = cx + d, and the x value you want to evaluate. The calculator instantly returns the composite function f(g(x)) written in simplified ax + b form, since composing two linear functions always produces another linear function whose slope is the product of the two original slopes. Alongside that you get two worked figures: the value of g(x) at your chosen x, and the value of f(g(x)) at that same x, so you can see each step of the working rather than just the final answer. This makes the tool handy for checking algebra homework, verifying working done by hand, or building intuition for how composition behaves before moving on to quadratic or other non-linear examples. Keep in mind that order matters: f(g(x)) is generally not the same as g(f(x)), so track carefully which function gets applied first. The calculator assumes you enter valid numeric coefficients and rounds results for display, so treat tiny differences in the decimals as rounding rather than a mistake in your own working.
The formula
For f(x) = ax + b and g(x) = cx + d, the composite is f(g(x)) = a(cx + d) + b = (ac)x + (ad + b). Apply g first, then f. In general f(g(x)) is not equal to g(f(x)).
Worked example
For f(x) = 2x + 1 and g(x) = 3x + 4, f(g(x)) = 2(3x + 4) + 1 = 6x + 9. At x = 1, g(1) = 7 and f(7) = 15. Enter 2, 1, 3, 4, 1 to confirm.
Frequently asked questions
What does f(g(x)) mean?
Apply g to x first, then apply f to the result. It is read f of g of x.
Is composition commutative?
No. In general f(g(x)) is different from g(f(x)); the order of composition matters.
Is the composite of two linear functions linear?
Yes. The composite is linear too, with slope equal to the product of the two slopes.
Who this calculator is for
This calculator is for algebra students and anyone needing a quick, reliable result.
What this calculator assumes
- You enter valid numbers.
- The standard method is applied.
- Results are rounded for display.
Formula and sources
Related calculators
- Quadratic Formula Calculator: solve a quadratic.
- Scientific Calculator: general maths.
- Matrix Calculator: matrix operations.