Transformations

Transformations are ways that a function can be adjusted to create new functions. The adjustments can be simple to understand or more challenging. One of the nice things about function notation is that we can learn to easily see what transformation has occurred regardless of the type of function. The transformations below work for ALL functions!

### Translations

Translations are essentially a vertical or horizontal shift of a function. Lets use the basic quadratic function to explore translations. Below the function in black is the untransformed function $f(x)=x^2$. The blue function has been translated up by 2. The red function has been translated down by 2.

The equation for the blue line is $y=f(x)+2=x^2+2$. The equation for the red line is $y=f(x)-2=x^2-2$. The transformations are fairly straight forward if a positive number is added the function shifts up by the same amount. If a positive number is subtracted the function shifts down by the same amount. In general a vertical translation is given by the equation:

(1)
$$y=f(x)+b$$

Continuing with the basic quadratic function, lets look at horizontal translations. The red function has been shifted to the left by 2 and has the equation of $y=f(x+2)=(x+2)^2$. The blue function has been shifted to the left by 2 and has the equation $y=f(x-2)=(x-2)^2$.

The shifts appear to be opposite then most folk would expect… The general form of the equation for a horizontal shift is given by:

(2)
$$y=f(x-a)$$

Notice that the general form is x-a. So when a is positive the function is shifted to the right and when a is negative the shift is to the left as expected!

### Stretches

For stretches I'll use the basic trignometric function $f(x)=sin(x)$, which is black in the two graphs below. Stretches can be a bit confusing with linear or quadratic functions, but (to me) are quite straight forward with the sine function….

The red function below has been stretched (dilated) vertically by a factor of 3 and has an equation of $y=3f(x)=3sin(x)$.

In general a vertical stretch is given by the equation:

(3)
$$y=pf(x)$$

If p is large than 1 the function gets "taller" if p is smaller than 1 the function gets "shorter."

The blue function below has been been "stretched" horizontally (I find it easier to think it has been squished, but the IB uses "stretch") by a factor of 3 and has an equation of $y=f(3x)=sin(3x)$.

In general a horizontal stretch is given by the equation:

(4)
$$y=f(x/q)$$

In the example about $q=\frac{1}{3}$. When q is larger than 1 the function will get "longer" and when q is smaller than 1 the function will "squish" (as seen above).

### Reflections

The last type of transformation covered in Math SL are reflections. These are generally done over either the x or y axis, with one notable exception further below. A vertical reflection is a reflection across the x-axis as shown below by the red function. The blue function has been reflected horizontally across the y-axis.

A vertical reflection is given by the equation:

(5)
$$y=-f(x)$$

A horizontal reflection is given by the equation:

(6)
$$y=f(-x)$$

The third type of reflection that is commonly talked about a reflection across the line $y=x$. This has the effect of swapping the variables x and y, which is exactly what happens when we find an inverse function.

### Summary of Transformations

All of the transformations above had horizontal and vertical transformations. All vertical transformations occur "outside" the function. For example a vertical stretch is given by $y=3f(x)$ whereas all horizontal transformation occur "inside" the function such as a horizontal stretch given by $y=f(x/3)$.

 Type of Transformation Equation Vertical Translation $y=f(x)+b$ Horizontal Translation $y=f(x-a)$ Vertical Stretch $y=pf(x)$ Horizontal Stretch $y=f(x/q)$ Vertical Reflection $y=-f(x)$ Horizontal Reflection $y=f(-x)$

It is also worth noting that more than one transformation can occur. For example the function $y=2x^2 +3$ can be viewed as the basic quadratic function $y=x^2$ stretched vertically by a factor of 2 and shifted vertically by a factor of 3.