Leave lesson

Algebra · Functions

1 / 8

Composite functions

Why fg(x) means "g first, then f", how to chain outputs into inputs for numbers and for algebra, and why the order almost always matters.

Algebra · Functions

Composite functions

Why fg(x) means "g first, then f", how to chain outputs into inputs for numbers and for algebra, and why the order almost always matters.

Why it works

fg(x)fg(x) chains two machines: it means f(g(x))f\big(g(x)\big)feed xx into gg, then feed gg's output into ff. Read it inside-out: the function written CLOSEST to xx acts first. (It is not f×gf \times g — no multiplying happens between the machines.)

With numbers: two small steps. f(x)=3x4f(x) = 3x - 4, g(x)=x2+1g(x) = x^2 + 1:

fg(2):g(2)=5,  then  f(5)=11.fg(2): \quad g(2) = 5, \;\text{then}\; f(5) = 11. gf(2):f(2)=2,  then  g(2)=5.gf(2): \quad f(2) = 2, \;\text{then}\; g(2) = 5.

Different answers — order matters. fgfg and gfgf agree only by coincidence, so never swap them to "save time".

With algebra: substitute the whole inner formula. fg(x)fg(x) replaces every xx in ff's formula with the ENTIRE expression for g(x)g(x), brackets intact:

fg(x)=3(x2+1)4=3x21,fg(x) = 3(x^2 + 1) - 4 = 3x^2 - 1, gf(x)=(3x4)2+1=9x224x+17gf(x) = (3x - 4)^2 + 1 = 9x^2 - 24x + 17

— note the full bracket-square in gfgf, middle term and all. The number checks agree: fg(2)=3(4)1=11fg(2) = 3(4) - 1 = 11. ✓

Solving with composites: build, then solve. "Solve fg(x)=26fg(x) = 26": first build fg(x)=3x21fg(x) = 3x^2 - 1, then solve 3x21=263x^2 - 1 = 26x2=9x^2 = 9, x=±3x = \pm 3. The composite is just a new machine; the old equation skills finish the job.

A function composed with itself: ff(x)ff(x). Same chaining: ff(x)=3(3x4)4=9x16ff(x) = 3(3x - 4) - 4 = 9x - 16. Nothing new — the inner machine just happens to be the same one.