Menu

Composing Rules

Part of the Functions & Transformations section of Coddy's Algebra 2 journey. Lesson 21 of 55.

A composition can be written as one new rule. Take p(x)=x+1p\left(x\right) = x+1 and q(x)=x2+4q\left(x\right) = {x}^{2}+4. In q(p(x))q\left(p\left(x\right)\right), the output of p is the expression x+1x+1, and it goes into q in place of x, whole and in brackets: q(p(x))=(x+1)2+4q\left(p\left(x\right)\right) = {\left(x+1\right)}^{2}+4.

Then multiply out and collect: (x+1)2{\left(x+1\right)}^{2} is x2+2x+1{x}^{2}+2x+1, so the rule is x2+2x+5{x}^{2}+2x+5.

Check with one number. At x = 2, p(2) is 3 and q(3) is 13. The new rule gives 4+4+54+4+5, which is 13 too. One rule now does the work of two.

challenge icon

Challenge

For f(x)=x+3f\left(x\right) = x+3 and g(x)=x2−2g\left(x\right) = {x}^{2}-2, find g(f(x))g\left(f\left(x\right)\right) as one rule, multiplied out and collected.

Try it yourself

g(f(x))g\left(f\left(x\right)\right)

Expand: multiply everything out

Givenf(x)=x+3f\left(x\right) = x+3g(x)=x2−2g\left(x\right) = x^{2}-2

All lessons in Functions & Transformations