Combining transformations
In a nutshell
Any function f(x) can undergo transformations by either adding or multiplying by a constant k. You can apply a combination of these transformations, but must take care with the order in which you apply them and how the function changes.
Reminder of individual transformations
Translations
By adding or subtracting k you can move the graph in any direction. Assume k is positive. Each of the following translations moves the graph by k units.
Upwards | downwards | to the left | to the right |
y=f(x)+k | y=f(x)−k | y=f(x+k) | y=f(x−k) |
Example 1
The function f(x)=xsin(x) can be plotted with y=f(x). What would the function become in the following cases?
a) Translate π units to the right.
b) Translate 2π units downwards.
a) A translation to the right means you subtract from within the function, so f(x) becomes f(x−π). This is equal to (x−π)sin(x−π). Hence if y=(x−π)sin(x−π) is plotted, it is simply the graph of y=xsin(x) translated to the right by π.
b) A translation downwards means you subtract from the function as a whole, so f(x) becomes f(x)−2π. This is equal to xsin(x)−2π. If y=xsin(x)−2π is plotted, it would simply be the graph of y=xsin(x) translated downward by 2π.
Stretching
By multiplying or dividing by k you can stretch the function vertically or horizontally. Each of these stretches are of a scale factor k. Note: You can think of reflections as stretches where k=−1.
Vertical stretch | horizontal stretch |
y=kf(x) | y=f(k1x) |
Example 2
The graph of the f(x)=xsin(x) can be stretched. Describe the stretches applied that give the following functions:
a) f(3x)=3xsin(3x)
b) 51f(x)=5xsin(x)
a) This describes a horizontal stretch by a scale factor 31.
b) This describes a vertical stretch by a scale factor 51.
Combining transformations
Note: For now, you will focus on combinations of transformations that are in perpendicular directions. More care and attention is required for combinations of transformations in the same direction, so is beyond the scope of this lesson.
When applied in perpendicular directions (one horizontal and one vertical transformation), the changes to the function can be done individually in any order.
Example 3
Transform f(x)=x2−4x+1 with a vertical stretch with scale factor 3 and a horizontal stretch with scale factor 2.
Since these stretches occur perpendicularly, the order in which you apply them doesn't matter:
Vertical stretch with scale factor 3: f(x)→3f(x)=3(x2−4x+1)
Horizontal stretch with scale factor 2: 3f(x)→3f(21x)=3[(2x)2−4(2x)+1]
Thus the final function after these two stretches is 3f(21x)=43x2−6x+3.
Example 4
Transform f(x)=x2−4x+1 with a horizontal stretch with scale factor 31 and translating by vector (0−5).
Since the stretch is horizontal and the translation is vertical, the order in which these are applied doesn't matter.
You can do the translation first, and then the stretch: f(x)→f(x)−5→f(3x)−5=[(3x)2−4(3x)+1]−5
Thus the final transformed function is f(3x)−5=9x2−12x−4.