Building blocks

## Warm-up ideas

In Mapping a function, we explored mapping diagrams for linear functions. What happens if we now compose two functions?

• How could we draw a mapping diagram to show the composition of the function $f(x)=\frac{3}{2}x$ with the function $g(x)=2x$ to get the function $h(x)=g(f(x))$?

We can represent this composite by using three numberlines, with arrows from the left to middle one representing $f(x)$, and then arrows from the middle to the right representing $g(x)$, like this:

Here, we have centred the left-hand numberline on $2$; the numberlines are centred in such a way that the arrow starting from $2$ is horizontal, as before.

We can then show the composite function $h(x)=g(f(x))$ by joining the starts to the ends of the arrow chains, like this:

This shows how the function $h$ takes values from the left-hand numberline to values on the right-hand numberline.

As in Mapping a function, we can also extend the arrows beyond the numberlines. For clarity, we only do this for the composite function $h$:

The lines all meet in a point, showing that $h(x)$ is a scaling with a scale factor of $3$. (This is the scaling factor from the left-hand to right-hand numberline.) As $h(x)=g(f(x))=g\bigl(\frac{3}{2}x\bigr)=3x$, this is to be expected.

We can also check that the formula we worked out in Mapping a function for the location of the focal point gives us the expected location: that formula gives the location as $\frac{1}{1-3}=-\frac{1}{2}$ times the distance between the numberlines. This matches what we see in the diagram, because the numberlines of interest here are the left-hand and right-hand ones.

• We described linear functions as scalings. How are the scalings represented by the three functions $f$, $g$ and $h$ related to each other?

$f(x)=\frac{3}{2}x$ is a scaling with scale factor $\frac{3}{2}$ and $g(x)=2x$ is a scaling with scale factor $2$. The composite function $h(x)=3x$ is a scaling with scale factor $3$.

In general, if we compose a scaling with scale factor $s$ together with a scaling with scale factor $t$, we will get a scaling with scale factor $st$. In our particular case, we have $\frac{3}{2}\times 2=3$.

Here, we used linear functions with no constant term and centred our mapping diagram on $0$. Would we have obtained the same results if we had started with the functions $f(x)=\frac{3}{2}x+4$ and $g(x)=2x-3$, still with $h(x)=g(f(x))$, and centred our mapping diagram on $7$ (as input value)?