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)$ 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)$ three units up, define a variable, e.g. $Q=f(x)+3$ - the 2D graph of this function will then be shifted three units above. This is illustrated on the graph below:

4.7.2 X-axis transformations

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

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

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

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

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

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

$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).