Algebra lab

Function Composer

One output becomes the next input

Follow the value through two function machines.

Compositiong ∘ f
start2x
first: f2x + 1
f(2)5becomes the next input
then: gx + 4
g(f(2))9final output
First stepf(2) = 2 × 2 + 1 = 5
Second stepg(5) = 5 + 4 = 9

Order matters

Same functions, different journey

Starting with 2, g(f(x)) gives 9 while f(g(x)) gives 13.