Sequences of Transformations
Learning Outcomes
- Combine vertical and horizontal shifts.
- Follow a pattern when combining shifts and stretches.
How To: Given a function and both a vertical and a horizontal shift, sketch the graph.
- Identify the vertical and horizontal shifts from the formula.
- The vertical shift results from a constant added to the output. Move the graph up for a positive constant and down for a negative constant.
- The horizontal shift results from a constant added to the input. Move the graph left for a positive constant and right for a negative constant.
- Apply the shifts to the graph in either order.
Example: Graphing Combined Vertical and Horizontal Shifts
Given [latex]f\left(x\right)=|x|[/latex], sketch a graph of [latex]h\left(x\right)=f\left(x+1\right)-3[/latex]. The function [latex]f[/latex] is our toolkit absolute value function. We know that this graph has a V shape, with the point at the origin. The graph of [latex]h[/latex] has transformed [latex]f[/latex] in two ways: [latex]f\left(x+1\right)[/latex] is a change on the inside of the function, giving a horizontal shift left by 1, and the subtraction by 3 in [latex]f\left(x+1\right)-3[/latex] is a change to the outside of the function, giving a vertical shift down by 3. The transformation of the graph is illustrated below. Let us follow one point of the graph of [latex]f\left(x\right)=|x|[/latex].- The point [latex]\left(0,0\right)[/latex] is transformed first by shifting left 1 unit: [latex]\left(0,0\right)\to \left(-1,0\right)[/latex]
- The point [latex]\left(-1,0\right)[/latex] is transformed next by shifting down 3 units: [latex]\left(-1,0\right)\to \left(-1,-3\right)[/latex]
Try It
Given [latex]f\left(x\right)=|x|[/latex], sketch a graph of [latex]h\left(x\right)=f\left(x - 2\right)+4[/latex]. Check your work with an online graphing calculator.Example: Identifying Combined Vertical and Horizontal Shifts
Write a formula for the graph shown below, which is a transformation of the toolkit square root function.Answer: The graph of the toolkit function starts at the origin, so this graph has been shifted 1 to the right and up 2. In function notation, we could write that as
[latex]h\left(x\right)=f\left(x - 1\right)+2[/latex]
Using the formula for the square root function, we can write[latex]h\left(x\right)=\sqrt{x - 1}+2[/latex]
Analysis of the Solution
Note that this transformation has changed the domain and range of the function. This new graph has domain [latex]\left[1,\infty \right)[/latex] and range [latex]\left[2,\infty \right)[/latex].Try It
Write a formula for a transformation of the toolkit reciprocal function [latex]f\left(x\right)=\dfrac{1}{x}[/latex] that shifts the function’s graph one unit to the right and one unit up.Answer: [latex-display]g\left(x\right)=\dfrac{1}{{\left(x+4\right)}^{2}}+2[/latex-display]
Example: Applying a Learning Model Equation
A common model for learning has an equation similar to [latex]k\left(t\right)=-{2}^{-t}+1[/latex], where [latex]k[/latex] is the percentage of mastery that can be achieved after [latex]t[/latex] practice sessions. This is a transformation of the function [latex]f\left(t\right)={2}^{t}[/latex] shown below. Sketch a graph of [latex]k\left(t\right)[/latex].Answer: This equation combines three transformations into one equation.
- A horizontal reflection: [latex]f\left(-t\right)={2}^{-t}[/latex]
- A vertical reflection: [latex]-f\left(-t\right)=-{2}^{-t}[/latex]
- A vertical shift: [latex]-f\left(-t\right)+1=-{2}^{-t}+1[/latex]
- First, we apply a horizontal reflection: [latex](0, 1) (–1, 2)[/latex].
- Then, we apply a vertical reflection: [latex](0, −1) (1, –2)[/latex].
- Finally, we apply a vertical shift: [latex](0, 0) (1, 1)[/latex].
Analysis of the Solution
As a model for learning, this function would be limited to a domain of [latex]t\ge 0[/latex], with corresponding range [latex]\left[0,1\right)[/latex].Try It
Given the toolkit function [latex]f\left(x\right)={x}^{2}[/latex], graph [latex]g\left(x\right)=-f\left(x\right)[/latex] and [latex]h\left(x\right)=f\left(-x\right)[/latex]. Take note of any surprising behavior for these functions.Answer: Notice: [latex]g(x)=f(−x)[/latex] looks the same as [latex]f(x)[/latex].
Combine Shifts and Stretches
When combining transformations, it is very important to consider the order of the transformations. For example, vertically shifting by 3 and then vertically stretching by 2 does not create the same graph as vertically stretching by 2 and then vertically shifting by 3, because when we shift first, both the original function and the shift get stretched, while only the original function gets stretched when we stretch first. When we see an expression such as [latex]2f\left(x\right)+3[/latex], which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of [latex]f\left(x\right)[/latex], we first multiply by 2, causing the vertical stretch, and then add 3, causing the vertical shift. In other words, multiplication before addition. Horizontal transformations are a little trickier to think about. When we write [latex]g\left(x\right)=f\left(2x+3\right)[/latex], for example, we have to think about how the inputs to the function [latex]g[/latex] relate to the inputs to the function [latex]f[/latex]. Suppose we know [latex]f\left(7\right)=12[/latex]. What input to [latex]g[/latex] would produce that output? In other words, what value of [latex]x[/latex] will allow [latex]g\left(x\right)=f\left(2x+3\right)=12[/latex]? We would need [latex]2x+3=7[/latex]. To solve for [latex]x[/latex], we would first subtract 3, resulting in a horizontal shift, and then divide by 2, causing a horizontal compression. This format ends up being very difficult to work with, because it is usually much easier to horizontally stretch a graph before shifting. We can work around this by factoring inside the function.[latex]f\left(bx+p\right)=f\left(b\left(x+\frac{p}{b}\right)\right)[/latex]
Let’s work through an example.[latex]f\left(x\right)={\left(2x+4\right)}^{2}[/latex]
We can factor out a 2.[latex]f\left(x\right)={\left(2\left(x+2\right)\right)}^{2}[/latex]
Now we can more clearly observe a horizontal shift to the left 2 units and a horizontal compression. Factoring in this way allows us to horizontally stretch first and then shift horizontally.A General Note: Combining Transformations
When combining vertical transformations written in the form [latex]af\left(x\right)+k[/latex], first vertically stretch by [latex]a[/latex] and then vertically shift by [latex]k[/latex]. When combining horizontal transformations written in the form [latex]f\left(bx+h\right)[/latex], first horizontally shift by [latex]h[/latex] and then horizontally stretch by [latex]\frac{1}{b}[/latex]. When combining horizontal transformations written in the form [latex]f\left(b\left(x+h\right)\right)[/latex], first horizontally stretch by [latex]\frac{1}{b}[/latex] and then horizontally shift by [latex]h[/latex]. Horizontal and vertical transformations are independent. It does not matter whether horizontal or vertical transformations are performed first.Example: Finding a Triple Transformation of a Tabular Function
Given the table below for the function [latex]f\left(x\right)[/latex], create a table of values for the function [latex]g\left(x\right)=2f\left(3x\right)+1[/latex].[latex]x[/latex] | 6 | 12 | 18 | 24 |
[latex]f\left(x\right)[/latex] | 10 | 14 | 15 | 17 |
Answer: There are three steps to this transformation, and we will work from the inside out. Starting with the horizontal transformations, [latex]f\left(3x\right)[/latex] is a horizontal compression by [latex]\frac{1}{3}[/latex], which means we multiply each [latex]x\text{-}[/latex] value by [latex]\frac{1}{3}[/latex].
[latex]x[/latex] | 2 | 4 | 6 | 8 |
[latex]f\left(3x\right)[/latex] | 10 | 14 | 15 | 17 |
[latex]x[/latex] | 2 | 4 | 6 | 8 |
[latex]2f\left(3x\right)[/latex] | 20 | 28 | 30 | 34 |
[latex]x[/latex] | 2 | 4 | 6 | 8 |
[latex]g\left(x\right)=2f\left(3x\right)+1[/latex] | 21 | 29 | 31 | 35 |
Example: Finding a Triple Transformation of a Graph
Use the graph of [latex]f\left(x\right)[/latex] to sketch a graph of [latex]k\left(x\right)=f\left(\frac{1}{2}x+1\right)-3[/latex].Answer: To simplify, let’s start by factoring out the inside of the function.
[latex]f\left(\frac{1}{2}x+1\right)-3=f\left(\frac{1}{2}\left(x+2\right)\right)-3[/latex]
By factoring the inside, we can first horizontally stretch by 2, as indicated by the [latex]\frac{1}{2}[/latex] on the inside of the function. Remember that twice the size of 0 is still 0, so the point [latex](0,2)[/latex] remains at [latex](0,2)[/latex] while the point [latex](2,0)[/latex] will stretch to [latex](4,0)[/latex]. Next, we horizontally shift left by 2 units, as indicated by [latex]x+2[/latex]. Last, we vertically shift down by 3 to complete our sketch, as indicated by the [latex]-3[/latex] on the outside of the function.Licenses & Attributions
CC licensed content, Original
- Revision and Adaptation. Provided by: Lumen Learning License: CC BY: Attribution.
- Question ID 113225. Authored by: Lumen Learning. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.
CC licensed content, Shared previously
- College Algebra. Provided by: OpenStax Authored by: Abramson, Jay et al.. Located at: https://openstax.org/books/college-algebra/pages/1-introduction-to-prerequisites. License: CC BY: Attribution. License terms: Download for free at http://cnx.org/contents/[email protected].
- Question ID 74730. Authored by: Meacham,William. License: CC BY: Attribution. License terms: IMathAS Community License CC-BY + GPL.