1.12 - Transformations of Functions

braden_is

Introduction

Hey there, and welcome to a new topic that addresses certain aspects of functions that is essential for the AP Precalculus test and for calculus.

Rubber Band Analogy

What can you do with a rubber band? Well, you can obviously move it up and down. You can also move it left and right. You can also stretch it horizontally from the left and right, and you can stretch it up and down.

Just like a rubber band, there are ways to move functions up and down, left and right, and stretch it in those same directions.

Vertical Shifts

For a function to be shifted up and down (called vertical shifts), we will follow this formula:

is the original function, is a constant we can set to any number, and is the altered function after being shifted up or down. 

For a function to be shifted up, should be positive. If is positive, this increases the output of . An increase in the output makes the -value of the function greater. Similarly, a function can be shifted down if is negative. If is negative, the output of decreases. A decrease in the output makes the -value of the function less.

For example, if were to be positive two, then the function will be shifted up two units. If were to be negative two, then the function will be shifted down two units.

Let’s take a look at a visual example. In the photo, let’s have . If we want to shift the function up by five units, then we can follow the formula . Since we want to shift the function up by five units, must be positive , and we already know . This means that the function in the photo is

Let’s do another example. Let’s say all we know about a function is that its original function is , and we want to shift this function down by 10 units. 

Since the parent function is , we can say that . Because we want to shift the function down by units, must be negative . This means that . This means that the altered function is .

Horizontal Shifts

For a function to be shifted left and right (called horizontal shifts), we will use a similar formula:

Similar to the previous function, is the original function, is a constant we can choose, and is the altered function.

For a function to be moved left, has to be positive. For a function to be moved right, must be negative. To understand why, let’s do an example.

If were to be , then . This means that our altered function has the output of the same function three units ahead. If this is the case, then will display the output of three units earlier, and so it will look like it is shifted to the left.

The green dotted function is , the original function, and the blue solid function is . Notice that the blue function is shifted to the left by three units if you match up the functions.

Similarly, let’s say . What action can we perform to shift this function units to the right? Well, shifting a function to the right requires that must be negative . This means that 

This means that shifted to the right by 5 units is

Stretching or Shrinking Vertically

To stretch or shrink a function, we can use the formula:

In this formula, is the original function, is a constant, and is the altered function.

The stretching of a function is somewhat different. If is greater than , then the function will be stretched. However, if is less than , then the function will be shrunk. Let’s see why.

Suppose . This means that . The altered function must have an output that is three times the original function. If , this means that . In the same way, suppose . This means that . The altered function must have an output that is one half the original function. If , this means that

Here is another example with a different function in the photo.

The blue lined function is , which is the function stretched outwards. The original function is the solid black line, . The green dotted function is , which is when the function is shrunk down.

Taking a look at the formula again which is, , what occurs if is negative? This means that if was positive somewhere, the altered function would have to be negative. Also this means that if was negative, the altered function would be positive. Here’s another visual example for you. Notice how the function is actually reflected across the -axis.

The black solid function is the original function, and the green dotted function is the altered, reflected, function.

If we had the function , then what would be the function if it was flipped across the -axis without any other alteration? This means that we would have to set to flip it across the -axis. This means that is the altered function…

Let’s say that this time we want to stretch the function by a factor of 2.5. This time, , and this means that is the altered function. 

Stretching or Shrinking Horizontally

To stretch a function left and right, we can use the formula:

In this formula, is the original function, is a constant, and is the altered function.

If is greater than , then the function will be compressed left to right. If is less than , then the function will be stretched from the left and right.

Let’s try to understand why these stretches and compressions happen. If , which is greater than , then . This means that . The input of the altered function is closer to the origin than the original function, yet we input the same -value, . This means that the altered function will compress. Compared to if , which is less than , then . This means that . The input of the altered function is farther from the origin compared to the original function, and again, this applies to every single input.

The top function is the compressed function, , the middle function is the original function, , and the stretched out function is .

Let’s do an example. Suppose we want to stretch by a factor of . To perform this dilation, we need to recognize that the dilation factor is , and so we can recognize that . This means that

.

Thus, .

Notice that because our dilation factor is , .

If is negative, or less than , this will cause the original function to be flipped around the -axis. To understand why this happens, let’s write the formula down with .

. This means that any input you put into is simply going to flip signs and be the input of . For example, if you input into , you get . However for , you get simply instead. 

Whenever you multiply the input by a negative number, it will cause this flip. You can also notice that the altered function is a reflection of the original function across the -axis. However, this only occurs when because if it was anything else, the function would be flipped AND stretched or shrunk. 

So What?

Now, we can put all of our concepts together. Let’s try to build the ultimate formula.

Shifting vertically uses the formula

Shifting horizontally uses the formula

Stretching vertically uses the formula

Stretching horizontally uses the formula

If we combine all of this, we get the following: 

If we wanted to take and shift it up 3 units, shift it to the right by 2 units, flip it across the -axis and stretch it vertically by a factor of 2, and stretch it horizontally by a factor of 2, we would get the following information:

Since we are moving up, should be positive and by three units. Since we are moving to the right, should be negative and by two units. Since we are stretching the function vertically by a factor of two, should be two. However, we are also reflecting across the -axis, which means that should be negative, so is negative two. Since we are stretching the function horizontally by a factor of 2 and the dilation factor is , , has to equal .

This means that we get…

.

The solid black line is , and the green dotted line is our altered function. Notice how you can see the stretch in the altered function, the flip across the -axis, and how it is off centered because we moved it up and right.

You can use this Desmos graph to help you visualize functions. Play around and type in any function you would like!

Desmos: Function Transformations - FiveHive 1.12 AP Precalculus | Desmos

Changing Domain and Range

Whenever you do these transformations, it is possible for the altered function to have different domains and ranges as the original function. For example, what is the domain and range of . The domain is and range is . Let’s imagine we shift the function down by two units. Wouldn’t the range now be ?

The solid black line is and the dotted green line is

How would we calculate this change in the domain? Well, we can do something extremely similar to how we alter functions. Notice that the lower bound of , which was , went down two units to when the function went down two units. Similarly, if was shifted up units, then the domain would be . Notice that in all cases, the infinity is untouched. This is because infinity is still infinity even if you add or subtract , , , or any finite number.

The domain can be thought of as the “left and right” values, which means that it is only affected by stretching the function or moving the function left and right. Similarly, the range can be thought of as the “up and down” values, which means that it is only affected by stretching the function or moving the function up and down.

Let’s do another example. Say that the domain of a certain function is and the range of a certain function is . If we were to shift the function down by units, shift the function to the left by units, stretch the function up and down by a factor of , and reflect the function across the -axis without any stretching or compressing the function by the left and right. What is the domain and range of this new altered function?

To find the domain, let’s take the information about stretching and moving left and right. We know that the function moves left by units, and is flipped across the -axis without any other alterations. If we had our function , we could apply these changes through the formula . This formula only involves and .

Now to find the domain of the altered function, let’s take the original function’s domain, which is and simply alter the domain the same way we did as the function. Because shifting the function to the left was before flipping the function, we would add first and then multiply the whole by . The problem with adding is that this shifts our domain to the right instead of to the left, so we would add negative instead, or subtract from the domain.

This means that the domain is or . We cannot have a larger number be our lower bound, so let us simply flip the numbers so that the domain of the altered function is

For the range, we can do the same thing again, which is to find and and apply the same transformations. Since the function is shifted down units, , and since the function is stretched by a factor of , .

The range of the function is , and so we can do almost the same thing as the domain. This time however, can be positive because it makes sense to shift the range upwards if the function is shifted upwards too. To both bounds, we would add and multiply by

This means that the range is or . Notice that the negative infinity in the lower bound is completely untouched even after the alterations, and this applies to positive infinity on the upper bound. The only time an alteration to the infinities can happen is if the function is reflected across the or -axis.

Make sure to check out this Desmos resource so you can make your own visual graphs.

Desmos:  Function Transformations - FiveHive 1.12 AP Precalculus | Desmos

Practice Questions