Read this lesson as text

Function Composition

Algebra 2 · Axiom Academy

Feed one function into another: two machines chained so the output of the first becomes the input of the second. Picture two machines connected by a single pipe. An input x goes into machine g ; whatever g produces travels down the pipe and becomes the input to machine f . That plumbing is composition — the output of g is the input of f . Read it right to left : the machine written closest to x runs first . In , that inner machine is g . To evaluate a composition at a number, work from the inside out — run the inner machine first, then feed its output into the outer one. Take the "add 4" machine g(x)=x+4 and the "square" machine f(x)=x^2 , and evaluate . The inner output becomes the outer input . Here g(3)=7 first, and only then does f act — on 7 , not on 3 . Miss the order and you would compute f(3)=9 and stop, which answers a different question. 3. Building the Composed Formula To get a formula for , substitute all of g(x) into f wherever f has its input. With f(x)=x^2 and g(x)=x+4 , the whole expression x+4 goes into the square: Swap the machines and you substitute the other way, g(f(x)) — square first, then add 4: x^2+4 is a different formula from x^2+8x+16 — which is exactly the point of the next step. In general . Take the "double" machine f(x)=2x and the "square" machine g(x)=x^2 . Run them both ways and you get genuinely different rules:

This is the written version of the interactive lesson above. See the full Algebra 2 course.