Lesson Objectives

- Demonstrate an understanding of individual function transformations: stretches/compressions, reflections, and shifts
- Learn how to combine function transformations in the correct order

## Understanding the Sequence of Transformations in Function Graphs

Over the course of the last few lessons, we have learned about the different individual function transformations.

Let's walk through (4, 2) on the graph of f(x), going to (4, 1) on the graph of g(x). How exactly does that work? $$f(x) = \sqrt{x}$$ $$f(4) = \sqrt{4} = 2$$ This gives us the point (4, 2) on the graph of f(x). $$g(4) = 2\sqrt{4} - 3$$ Pay close attention to the steps here. First, we will replace the square root of 4 with 2. At this point, the 2 is the same as the y-value from our point (4, 2) on the graph of f(x). $$g(4)=2 \cdot 2 - 3$$ Looking at what we have above, we would just follow the order of operations. We know that we would multiply before we subtract. We will first replace 2 • 2 with 4. $$g(4)=4 - 3$$ Now we can finish up by subtracting away 3. $$g(4)=1$$ This gives us the point (4, 1) on the graph of g(x).

So for a given (x, y) on the function f(x), the corresponding point on g(x) can be found as: $$(x, 2y - 3)$$ For example, the other point (1, 1) on the graph of f(x) will become: $$(1, 2 \cdot 1 - 3)$$ Calculate the y-value: $$2 \cdot 1 - 3 = 2 - 3 = -1$$ Obtain the point: $$(1, -1)$$ Desmos Link for More Detail In summary, we can see for vertical transformations or those that impact the y-value, we follow the order of operations. The stretch/compression is done first, followed by the shift. What happens when we have a reflection across the x-axis. Let's say we change the problem up slightly: $$f(x) = \sqrt{x}$$ $$h(x) = -2\sqrt{x} - 3$$ The change from +2 to -2 is now going to give us a reflection across the x-axis. This could be done either before or after the vertical stretch/compression but must be done before the vertical shift.

So for a given (x, y) on the function f(x), the corresponding point on h(x) can be found as: $$(x, -2y - 3)$$ For example, the point (1, 1) on the graph of f(x), will become: $$(1, -2 \cdot 1 - 3)$$ Calculate the y-value: $$-2 \cdot 1 - 3 = -2 - 3 = -5$$ Obtain the point: $$(1, -5)$$ It would not matter if we said we multiply by 2 first (vertical stretch by a factor of 2) and then multiply by -1 next (reflect across the x-axis). This would give us the same result as if we multiply by -1 first (reflect across the x-axis) and then multiply by 2 (vertical stretch by a factor of 2). Remember a vertical stretch means a pulling away from the x-axis.

Desmos Link for More Detail Since it is usually easier to think about doing the stretch/compression first, this is how we will list our procedure. In other words, swapping #1 and #2 will have no impact on the end result.

Example #1: Describe the transformation from f(x) to g(x). $$f(x) = x^3$$ $$g(x) = -3x^3 - 2$$ Let's rewrite our function g(x) to make the transformations more clear. $$g(x) = -3f(x) - 2$$ According to our list above, we want to first perform any vertical stretch/compression, along with any reflection across the x-axis. Here we have a -3 that is multiplying our function f(x). This is going to give us a vertical stretch by a factor of 3 and a reflection across the x-axis. Lastly, we will think about our vertical shift. In this case, we have minus 2 on the outside of the function, which produces a shift down by 2 units.

Let's put our steps together. Starting with the graph of f(x), we would vertically stretch by a factor of 3, reflect across the x-axis, and then shift down by 2 units. This means a point on the graph of f(x), which is (x, y) would be (x, -3y - 2) on the graph of g(x). Desmos Link for More Detail Now let's move on to the more confusing scenario, where we deal with the order of horizontal transformations. Let's suppose we have the following two functions: $$f(x) = \sqrt{x}$$ $$g(x) = \sqrt{2x + 1}$$ When we work with horizontal transformations, it is preferred to factor out the coefficient of x. This will allow us to perform our horizontal stretch/compression first followed by the horizontal shift.

Note: Some tutorials don't factor out the coefficient of x. In this case, they are going to give a different order. For this tutorial, we will always factor out our coefficient of x, therefore, all procedures that we generate will be based off of having first performed that operation.

Let's rewrite our function g(x) as: $$g(x) = \sqrt{2\left(x + \frac{1}{2}\right)}$$ Here is where things get a bit tricky. Remember that transformations that impact x are counterintuitive. This means we need to undo what is being done to x. When we undo things we go in the reverse order. When we plug in something for x, what gets done first is the addition of 1/2 since it is inside of parentheses and that has the highest priority. Next, we would multiply the result by 2. To undo things, now we need to undo the last thing that was done. How do we undo multiplication by 2? We divide by 2 or multiply by 1/2. This creates a horizontal compression by a factor of 2 or again some books would say a horizontal shrink by a factor of 1/2. Next, we would undo the first thing that was done. How do we undo adding 1/2? We subtract away 1/2. This creates a shift left by 1/2 units. We can see that when compared to our function f(x), g(x) has been horizontally compressed by a factor of 2 (could also say horizontally shrunk by a factor of 1/2), and shifted left 1/2 units. In other words, given a point (x, y) on the graph of f(x), what is the corresponding point on the graph of g(x)?

Let's walk through (4, 2) on the graph of f(x), going to (3/2, 2) on the graph of g(x). How exactly does that work? $$f(x) = \sqrt{x}$$ $$f(4) = \sqrt{4} = 2$$ This gives us the point (4, 2) on the graph of f(x). Let's plug in 3/2 for x in g(x) and see the steps. $$g\left(\frac{3}{2}\right) = \sqrt{2\left(\frac{3}{2} + \frac{1}{2}\right)}$$ First, we add 3/2 + 1/2 on the inside of the parentheses, the result is 2. $$g\left(\frac{3}{2}\right) = \sqrt{2 \cdot 2}$$ Now, we will multiply 2 • 2, the result is 4. $$g\left(\frac{3}{2}\right) = \sqrt{4}$$ Notice at this point, we have the same set up as from the f(4) that we did above. This means we will get the same y-value of 2. $$g\left(\frac{3}{2}\right) = 2$$ Again, notice that if we started with the x-value of 4 that produces the y-value of 2 in f(x), to get the same y-value of 2 in g(x), we would need to reverse those steps. Since the last thing we did was multiply by 2, now we want to divide by 2. $$\frac{4}{2} = 2$$ Since the first thing we did was add 1/2, now we need to subtract 1/2. $$2 - \frac{1}{2}$$ $$= \frac{4}{2} - \frac{1}{2}$$ $$=\frac{3}{2}$$ So a point on the graph of f(x), (x, y) is going to be (x/2 - 1/2, y) on the graph of g(x).

Desmos Link for More Detail

In summary, we can see for horizontal transformations or those that impact the x-value, we follow the reverse of the order of operations. Things on the inside of function must be undone. The order listed here is going to depend on how the function is written. When it is in factored form, the stretch/compression is done first, followed by the shift. As we have seen before, the reflection, which in this case would be across the y-axis would be done with the stretch or compression. It can be listed as first or second without any impact. The main thing is that it is done before the shift occurs.

Example #2: Describe the transformation from f(x) to g(x). $$f(x) = |x|$$ $$g(x) = |3x - 6|$$ Factor out the coefficient of x: $$g(x) = |3(x - 2)|$$ Let's rewrite our function g(x) to make the transformations more clear. $$g(x) = f[3(x - 2)]$$ According to our list above, we want to perform any horizontal stretch/compression first, along with any reflection across the y-axis. Here, we have a 3 in front of our parentheses. Remember that transformations with x are counterintuitive, so we want to undo multiplication by 3, which means we need to divide by 3 or multiply by 1/3. Here, we would have a horizontal compression by a factor of 3 (we could also say a horizontal shrink by a factor of 1/3). There isn't going to be a reflection across the y-axis since 3 is positive. Lastly, we want to think about the horizontal shift. We have a minus 2 on the inside of the parentheses and we will undo this by adding 2. This means we have a shift right by 2 units.

Let's put our steps together. Starting with the graph of f(x), we would horizontally compress by a factor of 3 (or you could say horizontally shrink by a factor of 1/3) and then shift right 2 units. This means a point on the graph of f(x), which is (x, y) would be (x/3 + 2, y) on the graph of g(x).

Desmos Link for More Detail

Note 2: Remember that what was given is in factored form. As we discussed earlier, if you are using a resource that is not factoring, the order will be different. Let's look at a few examples.

Example #3: Describe the transformation from f(x) to g(x). $$f(x) = x^3$$ $$g(x) = -3\left(\frac{1}{4}x - 1\right)^3 - 1$$ First, let's factor out the coefficient of x: $$g(x) = -3\left[\frac{1}{4}(x - 4)\right]^3 - 1$$ When compared to the graph of f(x), g(x) has been vertically stretched by a factor of 3, reflected across the x-axis, horizontally stretched by a factor of 4, shifted 4 units right, and shifted 1 unit down. So a point on the graph of f(x), (x, y) would now be (4x + 4, -3y - 1) on the graph of g(x).

Desmos Link for More Detail Example #4: Describe the transformation from f(x) to g(x). $$f(x) = \sqrt{x}$$ $$g(x) = \frac{1}{2}\sqrt{-2x - 4} + 1$$ First, let's factor out the coefficient of x: $$g(x) = \frac{1}{2}\sqrt{-2(x + 2)} + 1$$ When compared to the graph of f(x), g(x) has been vertically compressed by a factor of 2 (could also say vertically shrunk by a factor of 1/2), horizontally compressed by a factor of 2 (could also say horizontally shrunk by a factor of 1/2), reflected across the y-axis, shifted 2 units left, and shifted 1 unit up. So a point on the graph of f(x), (x, y) would now be (-x/2 - 2, y/2 + 1) on the graph of g(x).

Desmos Link for More Detail

- Translations: vertical and horizontal shifts
- Dilations: vertical and horizontal stretch/compression
- Reflections: reflecting across the x-axis/y-axis

x | f(x) | g(x) |
---|---|---|

0 | 0 | -3 |

1 | 1 | -1 |

4 | 2 | 1 |

So for a given (x, y) on the function f(x), the corresponding point on g(x) can be found as: $$(x, 2y - 3)$$ For example, the other point (1, 1) on the graph of f(x) will become: $$(1, 2 \cdot 1 - 3)$$ Calculate the y-value: $$2 \cdot 1 - 3 = 2 - 3 = -1$$ Obtain the point: $$(1, -1)$$ Desmos Link for More Detail In summary, we can see for vertical transformations or those that impact the y-value, we follow the order of operations. The stretch/compression is done first, followed by the shift. What happens when we have a reflection across the x-axis. Let's say we change the problem up slightly: $$f(x) = \sqrt{x}$$ $$h(x) = -2\sqrt{x} - 3$$ The change from +2 to -2 is now going to give us a reflection across the x-axis. This could be done either before or after the vertical stretch/compression but must be done before the vertical shift.

x | f(x) | h(x) |
---|---|---|

0 | 0 | -3 |

1 | 1 | -5 |

4 | 2 | -7 |

Desmos Link for More Detail Since it is usually easier to think about doing the stretch/compression first, this is how we will list our procedure. In other words, swapping #1 and #2 will have no impact on the end result.

### Order of Vertical Transformations

$$af(x) + k$$- Perform any vertical stretch/compression
- If |a| > 1, we have a vertical stretch
- If 0 < |a| < 1, we have a vertical compression (shrink)

- Perform any reflection across the x-axis
- If a is < 0, we have a reflection across the x-axis

- Perform any vertical shift
- Up k units if k > 0
- Down |k| units if k < 0

Example #1: Describe the transformation from f(x) to g(x). $$f(x) = x^3$$ $$g(x) = -3x^3 - 2$$ Let's rewrite our function g(x) to make the transformations more clear. $$g(x) = -3f(x) - 2$$ According to our list above, we want to first perform any vertical stretch/compression, along with any reflection across the x-axis. Here we have a -3 that is multiplying our function f(x). This is going to give us a vertical stretch by a factor of 3 and a reflection across the x-axis. Lastly, we will think about our vertical shift. In this case, we have minus 2 on the outside of the function, which produces a shift down by 2 units.

Let's put our steps together. Starting with the graph of f(x), we would vertically stretch by a factor of 3, reflect across the x-axis, and then shift down by 2 units. This means a point on the graph of f(x), which is (x, y) would be (x, -3y - 2) on the graph of g(x). Desmos Link for More Detail Now let's move on to the more confusing scenario, where we deal with the order of horizontal transformations. Let's suppose we have the following two functions: $$f(x) = \sqrt{x}$$ $$g(x) = \sqrt{2x + 1}$$ When we work with horizontal transformations, it is preferred to factor out the coefficient of x. This will allow us to perform our horizontal stretch/compression first followed by the horizontal shift.

Note: Some tutorials don't factor out the coefficient of x. In this case, they are going to give a different order. For this tutorial, we will always factor out our coefficient of x, therefore, all procedures that we generate will be based off of having first performed that operation.

Let's rewrite our function g(x) as: $$g(x) = \sqrt{2\left(x + \frac{1}{2}\right)}$$ Here is where things get a bit tricky. Remember that transformations that impact x are counterintuitive. This means we need to undo what is being done to x. When we undo things we go in the reverse order. When we plug in something for x, what gets done first is the addition of 1/2 since it is inside of parentheses and that has the highest priority. Next, we would multiply the result by 2. To undo things, now we need to undo the last thing that was done. How do we undo multiplication by 2? We divide by 2 or multiply by 1/2. This creates a horizontal compression by a factor of 2 or again some books would say a horizontal shrink by a factor of 1/2. Next, we would undo the first thing that was done. How do we undo adding 1/2? We subtract away 1/2. This creates a shift left by 1/2 units. We can see that when compared to our function f(x), g(x) has been horizontally compressed by a factor of 2 (could also say horizontally shrunk by a factor of 1/2), and shifted left 1/2 units. In other words, given a point (x, y) on the graph of f(x), what is the corresponding point on the graph of g(x)?

x | f(x) | x | g(x) |
---|---|---|---|

0 | 0 | -1/2 | 0 |

1 | 1 | 0 | 1 |

4 | 2 | 3/2 | 2 |

Desmos Link for More Detail

### A Function Composition Approach

If you are still a bit confused by what we just did, you may want to think about the steps using the composition of functions. $$f(x) = \sqrt{x}$$ Starting with f(x), suppose we find h(x) = f(2x): $$h(x) = f(2x) = \sqrt{2x}$$ We know this gives us a horizontal compression by a factor of 2 (could also say horizontal shrink by a factor of 1/2). Next, starting with h(x), suppose we find g(x) = h(x + 1/2): $$g(x) = h\left(x + \frac{1}{2}\right) = \sqrt{2\left(x + \frac{1}{2}\right)}$$ We know this would then give us a shift left by 1/2 units.In summary, we can see for horizontal transformations or those that impact the x-value, we follow the reverse of the order of operations. Things on the inside of function must be undone. The order listed here is going to depend on how the function is written. When it is in factored form, the stretch/compression is done first, followed by the shift. As we have seen before, the reflection, which in this case would be across the y-axis would be done with the stretch or compression. It can be listed as first or second without any impact. The main thing is that it is done before the shift occurs.

### Order of Horizontal Transformations

$$g(x) = f(bx - h)$$ Begin by factoring out the b, the coefficient of x: $$g(x) = f\left[b\left(x - \frac{h}{b}\right)\right]$$ The order given below is for the factored form only- Perform any horizontal stretch/compression
- If |b| > 1, we have a horizontal compression (shrink)
- If 0 < |b| < 1, we have a horizontal stretch

- Perform any reflection across the y-axis
- If b < 0, we have a reflection across the y-axis

- Perform any horizontal shift
- Right h/b units if h/b > 0
- Left |h/b| units if h/b < 0

Example #2: Describe the transformation from f(x) to g(x). $$f(x) = |x|$$ $$g(x) = |3x - 6|$$ Factor out the coefficient of x: $$g(x) = |3(x - 2)|$$ Let's rewrite our function g(x) to make the transformations more clear. $$g(x) = f[3(x - 2)]$$ According to our list above, we want to perform any horizontal stretch/compression first, along with any reflection across the y-axis. Here, we have a 3 in front of our parentheses. Remember that transformations with x are counterintuitive, so we want to undo multiplication by 3, which means we need to divide by 3 or multiply by 1/3. Here, we would have a horizontal compression by a factor of 3 (we could also say a horizontal shrink by a factor of 1/3). There isn't going to be a reflection across the y-axis since 3 is positive. Lastly, we want to think about the horizontal shift. We have a minus 2 on the inside of the parentheses and we will undo this by adding 2. This means we have a shift right by 2 units.

Let's put our steps together. Starting with the graph of f(x), we would horizontally compress by a factor of 3 (or you could say horizontally shrink by a factor of 1/3) and then shift right 2 units. This means a point on the graph of f(x), which is (x, y) would be (x/3 + 2, y) on the graph of g(x).

Desmos Link for More Detail

### Combining Graphing Transformations

$$g(x) = af(bx - h) + k$$ Begin by factoring out the b, the coefficient of x: $$g(x) = af\left[b\left(x - \frac{h}{b}\right)\right] + k$$- Perform the vertical stretch/compression along with any reflection across the x-axis
- Perform the horizontal stretch/compression along with any reflection across the y-axis
- Perform the horizontal shift
- Perform the vertical shift

- a is the vertical stretch/compression
- If |a| > 1, we have a vertical stretch
- If 0 < |a| < 1, we have a vertical compression (shrink)
- If a < 0, we have a reflection across the x-axis

- b is the horizontal stretch/compression
- If |b| > 1, we have a horizontal compression (shrink)
- If 0 < |b| < 1, we have a horizontal stretch
- If b < 0, we have a reflection across the y-axis

- h/b is our horizontal shift
- Right h/b units if h/b > 0
- Left |h/b| units if h/b < 0

- k is our vertical shift
- Up k units if k > 0
- Down |k| units if k < 0

Note 2: Remember that what was given is in factored form. As we discussed earlier, if you are using a resource that is not factoring, the order will be different. Let's look at a few examples.

Example #3: Describe the transformation from f(x) to g(x). $$f(x) = x^3$$ $$g(x) = -3\left(\frac{1}{4}x - 1\right)^3 - 1$$ First, let's factor out the coefficient of x: $$g(x) = -3\left[\frac{1}{4}(x - 4)\right]^3 - 1$$ When compared to the graph of f(x), g(x) has been vertically stretched by a factor of 3, reflected across the x-axis, horizontally stretched by a factor of 4, shifted 4 units right, and shifted 1 unit down. So a point on the graph of f(x), (x, y) would now be (4x + 4, -3y - 1) on the graph of g(x).

Desmos Link for More Detail Example #4: Describe the transformation from f(x) to g(x). $$f(x) = \sqrt{x}$$ $$g(x) = \frac{1}{2}\sqrt{-2x - 4} + 1$$ First, let's factor out the coefficient of x: $$g(x) = \frac{1}{2}\sqrt{-2(x + 2)} + 1$$ When compared to the graph of f(x), g(x) has been vertically compressed by a factor of 2 (could also say vertically shrunk by a factor of 1/2), horizontally compressed by a factor of 2 (could also say horizontally shrunk by a factor of 1/2), reflected across the y-axis, shifted 2 units left, and shifted 1 unit up. So a point on the graph of f(x), (x, y) would now be (-x/2 - 2, y/2 + 1) on the graph of g(x).

Desmos Link for More Detail

#### Skills Check:

Example #1

Describe the transformation from f(x) to g(x). $$f(x) = x^2$$ $$g(x) = 3x^2 - 1$$

Please choose the best answer.

A

Vertically stretched by a factor of 3, shifted up 1 unit

B

Vertically stretched by a factor of 1, shifted up 3 units

C

Vertically stretched by a factor of 3, shifted down 1 unit

D

Vertically compressed by a factor of 3, shifted down 1 unit

E

Vertically compressed by a factor of 9, shifted down 3 units

Example #2

Describe the transformation from f(x) to g(x). $$f(x) = \sqrt[3]{x}$$ $$g(x) = \sqrt[3]{3x - 18}$$

A

Horizontally compressed by a factor of 3, shifted right 6 units

B

Horizontally stretched by a factor of 3, shifted right 6 units

C

Horizontally stretched by a factor of 3, shifted left 18 units

D

Horizontally compressed by a factor of 18, shifted right 3 units

E

Horizontally compressed by a factor of 9, shifted right 27 units

Example #3

$$f(x) = |x|$$ $$g(x) = -2|4x + 20| + 3$$ The transformation from f(x) to g(x) is incorrectly described as:

Vertically stretched by a factor of 2, reflected across the y-axis, horizontally compressed by a factor of 4, shifted left 5 units, and shifted up 3 units.

What part is incorrect?

Please choose the best answer.

A

Vertically stretched by a factor of 2

B

Reflected across the y-axis

C

Horizontally compressed by a factor of 4

D

Shifted left 5 units

E

Shifted up 3 units

Congrats, Your Score is 100%

Better Luck Next Time, Your Score is %

Try again?

Ready for more?

Watch the Step by Step Video Lesson Take the Practice Test