4.7 Transformations of functions

4.7.1 Y-axis transformations

These are the easier case (at least in my view) to think about. When transforming a function f(x)f(x) in the y-axis, there are two key transformations to be aware of - stretching and translating.

To translate a function in the y-axis we can just add something to it, e.g. to shift the graph of y=f(x)y=f(x) three units up, define a variable, e.g. Q=f(x)+3Q=f(x)+3 - the 2D graph of this function will then be shifted three units above. This is illustrated on the graph below:

1-10.8-0.80.6-0.60.4-0.40.2-0.20.20.20.40.40.60.60.80.8114-43-32-21-1112233445566778899xxyyY=f(x)Y=f(x)Q=f(x)+3Q=f(x)+3

4.7.2 X-axis transformations

To transform a function f(x)f(x) in the X-axis, we just evaluate f(g(x))f(g(x)), where g(x)g(x) is a function which maps values from the xx-yy plane (i.e. the usual set of axis we plot things on) to one in the g(x)g(x)-yy plane (i.e. like the usual set of axis we plot things on, except that wherever we had x=ax=a (where aa stands for any number) we now want g(x)=ag(x)=a).

This deserves a bit of explanation. Let’s imagine that g(x)=x2g(x)=x-2. If we plot f(g(x))f(g(x)) against g(x)g(x), we might get something like this (for this specific f(x)f(x))

6-65-54-43-32-21-1112233448-86-64-42-222446688101012121414161618182020222224242626ggff

We don’t want a graph of f(g(x))f(g(x)) against g(x)g(x), though! We want one of f(g(x))f(g(x)) against xx. To do this, we need to work out how to write g(x)g(x) in terms of xx, and then work out where every point on the g(x)g(x)-axis should be on the xx-axis.

As x2=g(x)x-2=g(x) if we add two to each side, we obtain that x=g(x)+2x=g(x)+2. This means that if we shift every point on the g(x)g(x)-axis two to the right then we would have the X-axis!

Thus, the graph of f(g(x))=f(x2)f(g(x))=f(x-2) and looks like

6-65-54-43-32-21-11122334410102020ggffy=f(x)y=f(x)y=f(g(x))y=f(g(x))

We can transform the X-axis in many ways, another one is stretching the graph. For example, if we set g(x)=12xg(x)=\frac{1}{2}x, then to work out where every point on the g(x)g(x)-axis should be on the X-axis, we first rearrange g(x)g(x), obtaining that

x=2g(x)x=2g(x) (4.69)

and thus we stretch (not, as commonly misconceived, squish) the graph. I try to visualise it as the graph stretching as the infinite number of points on the axis are doubled (moved twice as far away as they once were).