Labs / Mathematics
Composition Machine
Pick two functions and watch a value ride the pipeline: it passes through g, comes out changed, then flows into f. The graph plots the whole composite f(g(x)), and you can scrub the input by dragging across it. Composition means chaining functions together — the output of one becomes the input of the next.
inner g(1.20) = 1.44result f(g(x)) = 2.88y = 2·(x²)
What to try
- Set g to x² and f to 2x. Does f ∘ g give the same curve as g ∘ f, or does order matter?
- Drag the input across zero. Which functions flip the sign of the result, and which never do?
- Turn on Animate sweep. Where is the composite curve steepest, and what does that tell you about how fast the output changes?
- Choose g = sin x and f = x². Why does the composite stay trapped between 0 and 1?
- Make both machines −x. Two sign flips — where does the value end up, and what does that say about doing something twice?