Contributor: Michelle Haver. Lesson ID: 13639
You've seen functions in action, but what happens when we take existing functions and transform them? See what happens when you shift, reflect, and dilate existing functions!
Shifts, dilations, and reflections, oh my!
Just like a caterpillar transforms into a butterfly, we can transform functions to create new ones with similar characteristics!
Before we dive into exploring how this works, let's consider a point in a coordinate plane:
Using this Function Transformation Intro graph above, created on GeoGebra, move the point P around the coordinate plane to answer the following questions:
Now you've seen some examples of shifts and reflections on a single ordered pair!
A function is essentially a collection of ordered pairs, so it makes sense that applying the transformation to the function would be like applying the transformation to each of the ordered pairs the function defines.
Let's see what that means in more detail!
As you work through this lesson, keep track of your notes with the Function Transformation Notes, found under the Downloadable Resources in the right-hand sidebar.
We started by moving the point (0,0) up by 2. This resulted in an increase in the y-value by 2. In other words, we are taking the y-value and adding 2.
Remember that f(x) itself defines the output, or y-values. Therefore, we can add 2 to all of the outputs or y-values by taking f(x) + 2!
Let's explore this a bit more with an example.
In the GeoGebra application shown below, Function Transformations: Vertical Shifts, we see the function f(x) = x^{2}.
Use the slider to the left to see what happens when you change the value of k in the function g(x) = f(x) + k.
This movement may be fairly intuitive for you -- adding a positive value results in values going up, and adding a negative value results in values going down!
In our initial example, we started at the point (0,0) and moved it to the right by 3. This resulted in an increase in the x-value by 3.
You may be thinking this will work out exactly like shifting vertically, and we just need to add 3 to the x-values, or inputs, to shift the function to the right.
Unfortunately for us, horizontal transformations are not quite as intuitive or nice!
Let's explore this with an activity.
In the Geogebra application shown below, Function Transformations: Horizontal Shifts, we see the function f(x) = x^{2} again.
Use the slider on the bottom right to see what happens when you change the value of k in the function g(x) = f(x + k).
If this seems backwards, that's ok!
To see a quick explanation for why this is true, check out Explaining Horizontal Shifts of Function from Colette Woodruff Tropp:
To quickly recap the video, we have the graph of the function f(x) = x^{2} and have labeled the point (1,1).
If we shift this function to the left by 1, we will see that the labeled point moves to the point (0,1). This essentially means that we need a smaller input value to get the same output value.
So, if g(x) is the shifted function, we have that g(0) = f(1).
Therefore, g(x) = f(x + 1).
At this point, we have discussed what it means to shift a function up, down, left, and right. These result from adding different values to the output and input of a function.
Let's explore this with an activity.
In the GeoGebra application shown below, Function Transformations: Vertical Stretches and Compressions, we see the function f(x) = x^{3} - 2x.
Use the slider to the left to see what happens to the function when we take g(x) = kf(x) for different values of k. In particular, make note of what happens when you set k = 0.5 and k = 2.
It may be a little difficult to see what exactly is happening here, but try to focus on one point on the graph and follow what happens to that point!
Let's look at this further with some pictures.
If we look at the graph of g(x) = 2f(x), it looks like the function has been pulled apart vertically (stretched). Looking at the "bumps" on the graph, we see these have been stretched out:
On the other hand, if we look at the graph of g(x) = 0.5f(x), it looks like the function has been smushed down vertically (compressed). Again, look at the "bumps" on the graph to see this compression:
This last example showed us what happens when we apply vertical stretches and compressions. To do this, we multiply the function by a constant k, which multiplies all of the output values by k.
Just like with the shifts left and right, we need to change the value of the inputs, or x-values.
To do this, let's see what happens when we multiply x by k inside the function! In other words, let's explore what happens when we take g(x) = f(kx) for different values of k.
In the GeoGebra application shown below, Function Transformations: Horizontal Stretches and Compressions, we see the function f(x) = x^{3} - 2x again.
Use the slider on the bottom right to see what happens when you change the value of k. In particular, make note of what happens when k = 0.5 and k = 2.
As we saw before with the horizontal shifts, these horizontal stretches and compressions seem a bit counterintuitive! However, the logic from the previous explanation holds.
We are basically needing different input values to get the same output values as our original function f(x). Whether we need smaller or larger x-values to get the same output determines if the function has been stretched or compressed horizontally.
Make sure you are making note of all of these transformations on your Function Transformation Notes (Downloadable Resources) so you can keep track of this information!
The last transformation we need to discuss is reflecting functions.
At the beginning of the lesson, we explored what happened when we reflected a single point over the x-axis and y-axis. Let's dive in a bit deeper!
Start with the point (1,1) on a coordinate plane as seen below:
If we want to reflect across the x-axis, we can view the x-axis as a mirror. Everything above the x-axis will be mirrored below the x-axis (and vice versa)!
This gives us the point (1,-1):
Note that this reflection made the y-value, or output value, negative! We can represent this using our function notation.
If reflecting across the x-axis makes all of the output values the negative of what they were, then g(x) = -f(x) means we've reflected the entire function, f(x), across the x-axis!
Similarly, we can reflect across the y-axis. This gives the point (-1,1):
This reflection made the x-value, or input value, negative! Therefore, g(x) = f(-x) means we've reflected the entire function f(x), across the y-axis!
Let's see what this looks like for an entire function!
The GeoGebra application shown below, Function Transformations: Reflections, gives the function f(x) = x^{3} -3x + 1.
On the left-hand side, you can click the circle next to g(x) and h(x) to see what happens if you reflect across the x-axis and y-axis, respectively! Pay attention to each of the "bumps" on the graph to see the reflections!
The function chosen in the example changes each time we reflect it, but this is not true for all functions!
Hopefully you could think of one that stays the same if you reflect it across the y-axis, but let's explore this together.
Consider the function f(x) = x^{2}, graphed below:
If you said, "it stays the same!", you are absoutely right!
This is a special type of function called an even function. The characteristics of an even function are that they are symmetric across the y-axis, which means that reflecting across the y-axis does not change the function!
This means that f(x) = f(-x)! We can see this for the function f(x) = x^{2}.
f(x) | = | x^{2} | |
= | |||
f(-x) | = | (-x)^{2} | |
= | x^{2} | ||
= | f(x) |
Another example of an even function is the function y = cos(x):
If you try to find an answer to this question, you will run into a problem! This would be the same as asking if there's a function which is symmetric across the x-axis.
However, a graph which is symmetric across the x-axis is not a function!
There is one more special case we have not explored yet! These are special functions which are the same when reflected over both the x-axis and y-axis.
For example, consider the function f(x) = x^{3}, graphed below:
If you said, "it stays the same!", you are absolutely right!
This is a special type of function called an odd function. The characteristics of an odd function are that they are symmetric across the origin, which means that reflecting across the x-axis and y-axis does not change the function!
This means that f(x) = -f(-x)! We can see this for the function f(x) = x^{3}.
f(x) | = | x^{3} | |
= | |||
-f(-x) | = | -(-x)^{3} | |
= | x^{3} | ||
= | f(x) |
Another example of an odd function is the function y = sin(x):
It's important to note that not all functions are classified as even or odd. These are just special types of functions you may encounter!
If not, make sure you fill out the Function Transformation Notes (Downloadable Resources) to have a quick reference as you move to the Got It? section!
You can also check your answers with the Function Transformation Notes: ANSWER KEY (Downloadable Resources).