Learning Objectives
 Graph functions using vertical and horizontal shifts.
 Graph functions using reflections about the$\text{\hspace{0.17em}}x\text{axis}\text{\hspace{0.17em}}$ and the$\text{\hspace{0.17em}}y\text{axis}.$
 Determine whether a function is even, odd, or neither from its graph.
 Graph functions using compressions and stretches.
 Combine transformations.
We all know that a flat mirror enables us to see an accurate image of ourselves and whatever is behind us. When we tilt the mirror, the images we see may shift horizontally or vertically. But what happens when we bend a flexible mirror? Like a carnival funhouse mirror, it presents us with a distorted image of ourselves, stretched or compressed horizontally or vertically. In a similar way, we can distort or transform mathematical functions to better adapt them to describing objects or processes in the real world. In this section, we will take a look at several kinds of transformations.
Graphing Functions Using Vertical and Horizontal Shifts
Often when given a problem, we try to model the scenario using mathematics in the form of words, tables, graphs, and equations. One method we can employ is to adapt the basic graphs of the toolkit functions to build new models for a given scenario. There are systematic ways to alter functions to construct appropriate models for the problems we are trying to solve.
Identifying Vertical Shifts
One simple kind of transformation involves shifting the entire graph of a function up, down, right, or left. The simplest shift is a vertical shift, moving the graph up or down, because this transformation involves adding a positive or negative constant to the function. In other words, we add the same constant to the output value of the function regardless of the input. For a function$\text{\hspace{0.17em}}g(x)=f(x)+k,\text{\hspace{0.17em}}$the function$\text{\hspace{0.17em}}f\left(x\right)\text{\hspace{0.17em}}$is shifted vertically$\text{\hspace{0.17em}}k\text{\hspace{0.17em}}$units. See Figure 2 for an example.
To help you visualize the concept of a vertical shift, consider that$\text{\hspace{0.17em}}y=f\left(x\right).\text{\hspace{0.17em}}$Therefore,$\text{\hspace{0.17em}}f\left(x\right)+k\text{\hspace{0.17em}}$is equivalent to$\text{\hspace{0.17em}}y+k.\text{\hspace{0.17em}}$Every unit of$\text{\hspace{0.17em}}y\text{\hspace{0.17em}}$is replaced by$\text{\hspace{0.17em}}y+k,\text{\hspace{0.17em}}$so the yvalue increases or decreases depending on the value of$\text{\hspace{0.17em}}k.\text{\hspace{0.17em}}$The result is a shift upward or downward.
Vertical Shift
Given a function $f\left(x\right),$ a new function $g(x)=f(x)+k,$ where $\text{\hspace{0.17em}}k$ is a constant, is a vertical shift of the function $f\left(x\right).$ All the output values change by $k$ units. If $k$ is positive, the graph will shift up. If $k$ is negative, the graph will shift down.
Example 1
Adding a Constant to a Function
To regulate temperature in a green building, airflow vents near the roof open and close throughout the day. Figure 3 shows the area of open vents$\text{\hspace{0.17em}}V\text{\hspace{0.17em}}$(in square feet) throughout the day in hours after midnight,$\text{\hspace{0.17em}}t.\text{\hspace{0.17em}}$During the summer, the facilities manager decides to try to better regulate temperature by increasing the amount of open vents by 20 square feet throughout the day and night. Sketch a graph of this new function.
How To
Given a tabular function, create a new row to represent a vertical shift.
 Identify the output row or column.
 Determine the magnitude of the shift.
 Add the shift to the value in each output cell. Add a positive value for up or a negative value for down.
Example 2
Shifting a Tabular Function Vertically
A function$\text{\hspace{0.17em}}f\left(x\right)\text{\hspace{0.17em}}$is given in Table 2. Create a table for the function$\text{\hspace{0.17em}}g(x)=f(x)3.$
$x$  2  4  6  8 
$f(x)$  1  3  7  11 
Analysis
As with the earlier vertical shift, notice the input values stay the same and only the output values change.
Try It #1
The function$\text{\hspace{0.17em}}h(t)=4.9{t}^{2}+30t\text{\hspace{0.17em}}$gives the height$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$of a ball (in meters) thrown upward from the ground after$\text{\hspace{0.17em}}t\text{\hspace{0.17em}}$seconds. Suppose the ball was instead thrown from the top of a 10m building. Relate this new height function$\text{\hspace{0.17em}}b(t)\text{\hspace{0.17em}}$to$\text{\hspace{0.17em}}h(t),\text{\hspace{0.17em}}$and then find a formula for$\text{\hspace{0.17em}}b(t).$
Identifying Horizontal Shifts
We just saw that the vertical shift is a change to the output, or outside, of the function. We will now look at how changes to input, on the inside of the function, change its graph and meaning. A shift to the input results in a movement of the graph of the function left or right in what is known as a horizontal shift, shown in Figure 5.
For example, if$\text{\hspace{0.17em}}f(x)={x}^{2},\text{\hspace{0.17em}}$then$\text{\hspace{0.17em}}g(x)={(x2)}^{2}\text{\hspace{0.17em}}$is a new function. Each input is reduced by 2 prior to squaring the function. The result is that the graph is shifted 2 units to the right, because we would need to increase the prior input by 2 units to yield the same output value as given in$\text{\hspace{0.17em}}f.$
Horizontal Shift
Given a function$\text{\hspace{0.17em}}f,\text{\hspace{0.17em}}$a new function$\text{\hspace{0.17em}}g\left(x\right)=f\left(xh\right),\text{\hspace{0.17em}}$where$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$is a constant, is a horizontal shift of the function$\text{\hspace{0.17em}}f.\text{\hspace{0.17em}}$If$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$is positive, the graph will shift right. If$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$is negative, the graph will shift left.
Example 3
Adding a Constant to an Input
Returning to our building airflow example from Figure 3, suppose that in autumn the facilities manager decides that the original venting plan starts too late, and wants to begin the entire venting program 2 hours earlier. Sketch a graph of the new function.
Analysis
Note that$\text{\hspace{0.17em}}V(t+2)\text{\hspace{0.17em}}$has the effect of shifting the graph to the left.
Horizontal changes or “inside changes” affect the domain of a function (the input) instead of the range and often seem counterintuitive. The new function$\text{\hspace{0.17em}}F\left(t\right)\text{\hspace{0.17em}}$uses the same outputs as$\text{\hspace{0.17em}}V\left(t\right),\text{\hspace{0.17em}}$but matches those outputs to inputs 2 hours earlier than those of$\text{\hspace{0.17em}}V\left(t\right).\text{\hspace{0.17em}}$Said another way, we must add 2 hours to the input of$\text{\hspace{0.17em}}V\text{\hspace{0.17em}}$to find the corresponding output for$F:F(t)=V(t+2).$
How To
Given a tabular function, create a new row to represent a horizontal shift.
 Identify the input row or column.
 Determine the magnitude of the shift.
 Add the shift to the value in each input cell.
Example 4
Shifting a Tabular Function Horizontally
A function$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$is given in Table 4. Create a table for the function$\text{\hspace{0.17em}}g(x)=f(x3).$
$x$  2  4  6  8 
$f(x)$  1  3  7  11 
Example 5
Identifying a Horizontal Shift of a Toolkit Function
Figure 8 represents a transformation of the toolkit function$\text{\hspace{0.17em}}f(x)={x}^{2}.\text{\hspace{0.17em}}$Relate this new function$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$to$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$and then find a formula for$\text{\hspace{0.17em}}g(x).$
Analysis
To determine whether the shift is$\text{\hspace{0.17em}}+2\text{\hspace{0.17em}}$or$\text{\hspace{0.17em}}2$, consider a single reference point on the graph. For a quadratic, looking at the vertex point is convenient. In the original function,$\text{\hspace{0.17em}}f(0)=0.\text{\hspace{0.17em}}$In our shifted function,$\text{\hspace{0.17em}}g(2)=0.\text{\hspace{0.17em}}$To obtain the output value of 0 from the function$\text{\hspace{0.17em}}f,\text{\hspace{0.17em}}$we need to decide whether a plus or a minus sign will work to satisfy$\text{\hspace{0.17em}}g(2)=f(x2)=f(0)=0.\text{\hspace{0.17em}}$For this to work, we will need to subtract 2 units from our input values.
Example 6
Interpreting Horizontal versus Vertical Shifts
The function$\text{\hspace{0.17em}}G(m)\text{\hspace{0.17em}}$gives the number of gallons of gas required to drive$\text{\hspace{0.17em}}m\text{\hspace{0.17em}}$miles. Interpret$\text{\hspace{0.17em}}G(m)+10\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}G(m+10).$
Try It #2
Given the function$\text{\hspace{0.17em}}f(x)=\sqrt{x},\text{\hspace{0.17em}}$graph the original function$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$and the transformation$\text{\hspace{0.17em}}g(x)=f(x+2)\text{\hspace{0.17em}}$on the same axes. Is this a horizontal or a vertical shift? Which way is the graph shifted and by how many units?
Combining Vertical and Horizontal Shifts
Now that we have two transformations, we can combine them. Vertical shifts are outside changes that affect the output (y) values and shift the function up or down. Horizontal shifts are inside changes that affect the input (x) values and shift the function left or right. Combining the two types of shifts will cause the graph of a function to shift up or down and left or right.
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 7
Graphing Combined Vertical and Horizontal Shifts
Given$\text{\hspace{0.17em}}f(x)=\leftx\right,\text{\hspace{0.17em}}$sketch a graph of$\text{\hspace{0.17em}}h(x)=f(x+1)3.$
Try It #3
Given$\text{\hspace{0.17em}}f(x)=\leftx\right,\text{\hspace{0.17em}}$sketch a graph of$\text{\hspace{0.17em}}h(x)=f(x2)+4.$
Example 8
Identifying Combined Vertical and Horizontal Shifts
Write a formula for the graph shown in Figure 11, which is a transformation of the toolkit square root function.
Analysis
Note that this transformation has changed the domain and range of the function. This new graph has domain$\text{\hspace{0.17em}}[1,\infty )\text{\hspace{0.17em}}$and range$\text{\hspace{0.17em}}[2,\infty ).$
Try It #4
Write a formula for a transformation of the toolkit reciprocal function$\text{\hspace{0.17em}}f\left(x\right)=\frac{1}{x}\text{\hspace{0.17em}}$that shifts the function’s graph one unit to the right and one unit up.
Graphing Functions Using Reflections about the Axes
Another transformation that can be applied to a function is a reflection over the x or yaxis. A vertical reflection reflects a graph vertically across the xaxis, while a horizontal reflection reflects a graph horizontally across the yaxis. The reflections are shown in Figure 12.
Notice that the vertical reflection produces a new graph that is a mirror image of the base or original graph about the xaxis. The horizontal reflection produces a new graph that is a mirror image of the base or original graph about the yaxis.
Reflections
Given a function$\text{\hspace{0.17em}}f(x),$ a new function$\text{\hspace{0.17em}}g(x)=f(x)\text{\hspace{0.17em}}$is a vertical reflection of the function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$sometimes called a reflection about (or over, or through) the xaxis.
Given a function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$a new function$\text{\hspace{0.17em}}g(x)=f(x)\text{\hspace{0.17em}}$is a horizontal reflection of the function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$sometimes called a reflection about the yaxis.
How To
Given a function, reflect the graph both vertically and horizontally.
 Multiply all outputs by –1 for a vertical reflection. The new graph is a reflection of the original graph about the xaxis.
 Multiply all inputs by –1 for a horizontal reflection. The new graph is a reflection of the original graph about the yaxis.
Example 9
Reflecting a Graph Horizontally and Vertically
Reflect the graph of$\text{\hspace{0.17em}}s(t)=\sqrt{t}$ (a) vertically and (b) horizontally.
Reflect the graph of$\text{\hspace{0.17em}}f(x)=x1$ (a) vertically and (b) horizontally.
Example 10
Reflecting a Tabular Function Horizontally and Vertically
A function$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$is given as Table 6. Create a table for the functions below.
 $\text{\hspace{0.17em}}g(x)=f(x)$
 $\text{\hspace{0.17em}}h(x)=f(\mathrm{}x)$
$x$  2  4  6  8 
$f(x)$  1  3  7  11 
A function$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$is given as Table 9. Create a table for the functions below.
 $g(x)=f(x)$
 $h(x)=f(x)$
$x$  −2  0  2  4 
$f(x)$  5  10  15  20 
Example 11
Applying a Learning Model Equation
A common model for learning has an equation similar to $k(t)={2}^{t}+1,\text{\hspace{0.17em}}$ where $k$ is the percentage of mastery that can be achieved after $t$ practice sessions. This is a transformation of the function $f(t)={2}^{t}$ shown in Figure 15. Sketch a graph of $k(t).$
Analysis
As a model for learning, this function would be limited to a domain of$\text{\hspace{0.17em}}t\ge 0,\text{\hspace{0.17em}}$with corresponding range$\text{\hspace{0.17em}}[0,1).$
Given the toolkit function$\text{\hspace{0.17em}}f(x)={x}^{2},\text{\hspace{0.17em}}$graph$\text{\hspace{0.17em}}g(x)=f(x)\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}h(x)=f(x).\text{\hspace{0.17em}}$Take note of any surprising behavior for these functions.
Determining Even and Odd Functions
Some functions exhibit symmetry so that reflections result in the original graph. For example, horizontally reflecting the toolkit functions $f(x)={x}^{2}$ or $f(x)=\leftx\right$ will result in the original graph. We say that these types of graphs are symmetric about the yaxis. A function whose graph is symmetric about the yaxis is called an even function.
If the graphs of$\text{\hspace{0.17em}}f(x)={x}^{3}\text{\hspace{0.17em}}$or$\text{\hspace{0.17em}}f(x)=\frac{1}{x}\text{\hspace{0.17em}}$were reflected over both axes, the result would be the original graph, as shown in Figure 17.
We say that these graphs are symmetric about the origin. A function with a graph that is symmetric about the origin is called an odd function.
Note: A function can be neither even nor odd if it does not exhibit either symmetry. For example,$\text{\hspace{0.17em}}f(x)={2}^{x}\text{\hspace{0.17em}}$is neither even nor odd. Also, the only function that is both even and odd is the constant function$\text{\hspace{0.17em}}f(x)=0.$
Even and Odd Functions
A function is called an even function if for every input$\text{\hspace{0.17em}}x$
The graph of an even function is symmetric about the $y\text{}$axis.
A function is called an odd function if for every input$\text{\hspace{0.17em}}x$
The graph of an odd function is symmetric about the origin.
How To
Given the formula for a function, determine if the function is even, odd, or neither.
 Determine whether the function satisfies$\text{\hspace{0.17em}}f(x)=f(x).\text{\hspace{0.17em}}$If it does, it is even.
 Determine whether the function satisfies$\text{\hspace{0.17em}}f(x)=f(x).\text{\hspace{0.17em}}$If it does, it is odd.
 If the function does not satisfy either rule, it is neither even nor odd.
Example 12
Determining whether a Function Is Even, Odd, or Neither
Is the function$\text{\hspace{0.17em}}f(x)={x}^{3}+2x\text{\hspace{0.17em}}$even, odd, or neither?
Analysis
Consider the graph of$\text{\hspace{0.17em}}f\text{\hspace{0.17em}}$in Figure 18. Notice that the graph is symmetric about the origin. For every point$\text{\hspace{0.17em}}\left(x,y\right)\text{\hspace{0.17em}}$on the graph, the corresponding point$\text{\hspace{0.17em}}\left(x,y\right)\text{\hspace{0.17em}}$is also on the graph. For example, (1, 3) is on the graph of$\text{\hspace{0.17em}}f,\text{\hspace{0.17em}}$and the corresponding point$(\mathrm{1},\mathrm{3})$is also on the graph.
Is the function$\text{\hspace{0.17em}}f(s)={s}^{4}+3{s}^{2}+7\text{\hspace{0.17em}}$even, odd, or neither?
Graphing Functions Using Stretches and Compressions
Adding a constant to the inputs or outputs of a function changed the position of a graph with respect to the axes, but it did not affect the shape of a graph. We now explore the effects of multiplying the inputs or outputs by some quantity.
We can transform the inside (input values) of a function or we can transform the outside (output values) of a function. Each change has a specific effect that can be seen graphically.
Vertical Stretches and Compressions
When we multiply a function by a positive constant, we get a function whose graph is stretched or compressed vertically in relation to the graph of the original function. If the constant is greater than 1, we get a vertical stretch; if the constant is between 0 and 1, we get a vertical compression. Figure 19 shows a function multiplied by constant factors 2 and 0.5 and the resulting vertical stretch and compression.
Vertical Stretches and Compressions
Given a function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$a new function$\text{\hspace{0.17em}}g(x)=af(x),\text{\hspace{0.17em}}$where$\text{\hspace{0.17em}}a\text{\hspace{0.17em}}$is a constant, is a vertical stretch or vertical compression of the function$\text{\hspace{0.17em}}f(x).$
 If$\text{\hspace{0.17em}}a>1,\text{\hspace{0.17em}}$then the graph will be stretched.
 If$\text{\hspace{0.17em}}0<a<1,\text{\hspace{0.17em}}$then the graph will be compressed.
 If$\text{\hspace{0.17em}}a<0,\text{\hspace{0.17em}}$then there will be combination of a vertical stretch or compression with a vertical reflection.
How To
Given a function, graph its vertical stretch.
 Identify the value of$\text{\hspace{0.17em}}a.$
 Multiply all range values by$\text{\hspace{0.17em}}a.$

If$\text{\hspace{0.17em}}\text{\hspace{0.17em}}a>1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}$the graph is stretched by a factor of$\text{\hspace{0.17em}}a.$
If$\text{\hspace{0.17em}}0<a<1,\text{\hspace{0.17em}}$the graph is compressed by a factor of$\text{\hspace{0.17em}}a.$
If$\text{\hspace{0.17em}}a<0,\text{\hspace{0.17em}}$the graph is either stretched or compressed and also reflected about the xaxis.
Example 13
Graphing a Vertical Stretch
A function$\text{\hspace{0.17em}}P\left(t\right)\text{\hspace{0.17em}}$models the population of fruit flies. The graph is shown in Figure 20.
A scientist is comparing this population to another population,$\text{\hspace{0.17em}}Q,\text{\hspace{0.17em}}$whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.
How To
Given a tabular function and assuming that the transformation is a vertical stretch or compression, create a table for a vertical compression.
 Determine the value of $\text{\hspace{0.17em}}a.$
 Multiply all of the output values by$\text{\hspace{0.17em}}a.$
Example 14
Finding a Vertical Compression of a Tabular Function
A function$\text{\hspace{0.17em}}f\text{\hspace{0.17em}}$is given as Table 10. Create a table for the function$\text{\hspace{0.17em}}g(x)=\frac{1}{2}f(x).$
$x$  2  4  6  8 
$f(x)\text{\hspace{0.17em}}$  1  3  7  11 
Analysis
The result is that the function$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$has been compressed vertically by$\text{\hspace{0.17em}}\frac{1}{2}.\text{\hspace{0.17em}}$Each output value is divided in half, so the graph is half the original height.
Try It #9
A function$\text{\hspace{0.17em}}f\text{\hspace{0.17em}}$is given as Table 12. Create a table for the function$\text{\hspace{0.17em}}g(x)=\frac{3}{4}f(x).$
$x$  2  4  6  8 
$f(x)$  12  16  20  0 
Example 15
Recognizing a Vertical Stretch
The graph in Figure 22 is a transformation of the toolkit function$\text{\hspace{0.17em}}f(x)={x}^{3}.\text{\hspace{0.17em}}$Relate this new function$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$to$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$and then find a formula for$\text{\hspace{0.17em}}g(x).$
Try It #10
Write the formula for the function that we get when we stretch the identity toolkit function by a factor of 3, and then shift it down by 2 units.
Horizontal Stretches and Compressions
Now we consider changes to the inside of a function. When we multiply a function’s input by a positive constant, we get a function whose graph is stretched or compressed horizontally in relation to the graph of the original function. If the constant is between 0 and 1, we get a horizontal stretch; if the constant is greater than 1, we get a horizontal compression of the function.
Given a function$\text{\hspace{0.17em}}y=f(x),\text{\hspace{0.17em}}$the form$\text{\hspace{0.17em}}y=f(bx)\text{\hspace{0.17em}}$results in a horizontal stretch or compression. Consider the function$\text{\hspace{0.17em}}y={x}^{2}.\text{\hspace{0.17em}}$Observe Figure 23. The graph of$\text{\hspace{0.17em}}y={\left(0.5x\right)}^{2}\text{\hspace{0.17em}}$is a horizontal stretch of the graph of the function$\text{\hspace{0.17em}}y={x}^{2}\text{\hspace{0.17em}}$by a factor of 2. The graph of$\text{\hspace{0.17em}}y={\left(2x\right)}^{2}\text{\hspace{0.17em}}$is a horizontal compression of the graph of the function$\text{\hspace{0.17em}}y={x}^{2}\text{\hspace{0.17em}}$by a factor of 2.
Horizontal Stretches and Compressions
Given a function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$a new function$\text{\hspace{0.17em}}g(x)=f(bx),\text{\hspace{0.17em}}$where$\text{\hspace{0.17em}}b\text{\hspace{0.17em}}$is a constant, is a horizontal stretch or horizontal compression of the function$\text{\hspace{0.17em}}f(x).$
 If$\text{\hspace{0.17em}}b>1,\text{\hspace{0.17em}}$then the graph will be compressed by$\text{\hspace{0.17em}}\frac{1}{b}.$
 If$\text{\hspace{0.17em}}0<b<1,\text{\hspace{0.17em}}$then the graph will be stretched by$\text{\hspace{0.17em}}\frac{1}{b}.$
 If$\text{\hspace{0.17em}}b<0,\text{\hspace{0.17em}}$then there will be combination of a horizontal stretch or compression with a horizontal reflection.
How To
Given a description of a function, sketch a horizontal compression or stretch.
 Write a formula to represent the function.
 Set$\text{\hspace{0.17em}}g(x)=f(bx)\text{\hspace{0.17em}}$where$\text{\hspace{0.17em}}b>1\text{\hspace{0.17em}}$for a compression or$\text{\hspace{0.17em}}0<b<1\text{\hspace{0.17em}}$ for a stretch.
Example 16
Graphing a Horizontal Compression
Suppose a scientist is comparing a population of fruit flies to a population that progresses through its lifespan twice as fast as the original population. In other words, this new population,$\text{\hspace{0.17em}}R,\text{\hspace{0.17em}}$will progress in 1 hour the same amount as the original population does in 2 hours, and in 2 hours, it will progress as much as the original population does in 4 hours. Sketch a graph of this population.
Analysis
Note that the effect on the graph is a horizontal compression where all input values are half of their original distance from the vertical axis.
Example 17
Finding a Horizontal Stretch for a Tabular Function
A function$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$is given as Table 13. Create a table for the function$\text{\hspace{0.17em}}g(x)=f\left(\frac{1}{2}x\right).$
$x$  2  4  6  8 
$f(x)$  1  3  7  11 
Analysis
Because each input value has been doubled, the result is that the function$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$has been stretched horizontally by a factor of 2.
Example 18
Recognizing a Horizontal Compression on a Graph
Relate the function$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$to$\text{\hspace{0.17em}}f(x)\text{\hspace{0.17em}}$in Figure 26.
Analysis
Notice that the coefficient needed for a horizontal stretch or compression is the reciprocal of the stretch or compression. So to stretch the graph horizontally by a scale factor of 4, we need a coefficient of$\text{\hspace{0.17em}}\frac{1}{4}\text{\hspace{0.17em}}$in our function:$\text{\hspace{0.17em}}f\left(\frac{1}{4}x\right).\text{\hspace{0.17em}}$This means that the input values must be four times larger to produce the same result, requiring the input to be larger, causing the horizontal stretching.
Try It #11
Write a formula for the toolkit square root function horizontally stretched by a factor of 3.
Performing a Sequence of Transformations
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$\text{\hspace{0.17em}}\text{\hspace{0.17em}}2f(x)+3,\text{\hspace{0.17em}}$which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$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$\text{\hspace{0.17em}}g(x)=f(2x+3),\text{\hspace{0.17em}}$for example, we have to think about how the inputs to the function$\text{\hspace{0.17em}}g\text{\hspace{0.17em}}$relate to the inputs to the function$\text{\hspace{0.17em}}\text{\hspace{0.17em}}f.\text{\hspace{0.17em}}$Suppose we know$\text{\hspace{0.17em}}f(7)=12.\text{\hspace{0.17em}}$What input to$\text{\hspace{0.17em}}g\text{\hspace{0.17em}}$would produce that output? In other words, what value of$\text{\hspace{0.17em}}x\text{\hspace{0.17em}}$will allow$\text{\hspace{0.17em}}g(x)=f(2x+3)=12?\text{\hspace{0.17em}}$We would need$\text{\hspace{0.17em}}2x+3=7.\text{\hspace{0.17em}}$To solve for$\text{\hspace{0.17em}}x,\text{\hspace{0.17em}}$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.
Let’s work through an example.
We can factor out a 2.
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.
Combining Transformations
When combining vertical transformations written in the form$\text{\hspace{0.17em}}af(x)+k,\text{\hspace{0.17em}}$first vertically stretch by$\text{\hspace{0.17em}}a\text{\hspace{0.17em}}$and then vertically shift by$\text{\hspace{0.17em}}k.$
When combining horizontal transformations written in the form$\text{\hspace{0.17em}}f(bxh),\text{\hspace{0.17em}}$first horizontally shift by$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$and then horizontally stretch by$\text{\hspace{0.17em}}\frac{1}{b}.$
When combining horizontal transformations written in the form$\text{\hspace{0.17em}}f(b(xh)),\text{\hspace{0.17em}}$first horizontally stretch by$\text{\hspace{0.17em}}\frac{1}{b}\text{\hspace{0.17em}}$and then horizontally shift by$\text{\hspace{0.17em}}h.$
Horizontal and vertical transformations are independent. It does not matter whether horizontal or vertical transformations are performed first.
Example 19
Finding a Triple Transformation of a Tabular Function
Given Table 15 for the function$\text{\hspace{0.17em}}f(x),\text{\hspace{0.17em}}$create a table of values for the function$\text{\hspace{0.17em}}g(x)=2f(3x)+1.$
$x$  6  12  18  24 
$f(x)$  10  14  15  17 
Example 20
Finding a Triple Transformation of a Graph
Use the graph of$\text{\hspace{0.17em}}f\left(x\right)\text{\hspace{0.17em}}$in Figure 27 to sketch a graph of$\text{\hspace{0.17em}}k(x)=f\left(\frac{1}{2}x+1\right)3.$
Media
Access this online resource for additional instruction and practice with transformation of functions.
3.5 Section Exercises
Verbal
When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal shift from a vertical shift?
When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal stretch from a vertical stretch?
When examining the formula of a function that is the result of multiple transformations, how can you tell a horizontal compression from a vertical compression?
When examining the formula of a function that is the result of multiple transformations, how can you tell a reflection with respect to the xaxis from a reflection with respect to the yaxis?
Algebraic
For the following exercises, write a formula for the function obtained when the graph is shifted as described.
$\text{\hspace{0.17em}}f(x)=\sqrt{x}\text{\hspace{0.17em}}$is shifted up 1 unit and to the left 2 units.
$\text{\hspace{0.17em}}f(x)=\leftx\right\text{\hspace{0.17em}}$ is shifted down 3 units and to the right 1 unit.
$\text{\hspace{0.17em}}f(x)=\frac{1}{x}\text{\hspace{0.17em}}$is shifted down 4 units and to the right 3 units.
$\text{\hspace{0.17em}}f(x)=\frac{1}{{x}^{2}}\text{\hspace{0.17em}}$is shifted up 2 units and to the left 4 units.
For the following exercises, describe how the graph of the function is a transformation of the graph of the original function$\text{\hspace{0.17em}}f.$
$y=f(x49)$
$y=f(x+3)$
$y=f(x)+5$
$y=f(x)2$
$y=f(x2)+3$
For the following exercises, determine the interval(s) on which the function is increasing and decreasing.
$f(x)=4{(x+1)}^{2}5$
$a(x)=\sqrt{x+4}$
Graphical
For the following exercises, use the graph of$\text{\hspace{0.17em}}f(x)={2}^{x}\text{\hspace{0.17em}}$shown in Figure 31 to sketch a graph of each transformation of$\text{\hspace{0.17em}}f(x).$
$g(x)={2}^{x}+1$
$w(x)={2}^{x1}$
For the following exercises, sketch a graph of the function as a transformation of the graph of one of the toolkit functions.
$h(x)=x1+4$
$m(t)=3+\sqrt{t+2}$
Numeric
Tabular representations for the functions$\text{\hspace{0.17em}}f,\text{\hspace{0.17em}}g,\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$are given below. Write$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}h(x)\text{\hspace{0.17em}}$as transformations of$\text{\hspace{0.17em}}f(x).$
$x$  −2  −1  0  1  2 
$f(x)$  −2  −1  −3  1  2 
$x$  −1  0  1  2  3 
$g(x)$  −2  −1  −3  1  2 
$x$  −2  −1  0  1  2 
$h(x)$  −1  0  −2  2  3 
Tabular representations for the functions$\text{\hspace{0.17em}}f,\text{\hspace{0.17em}}g,\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}h\text{\hspace{0.17em}}$are given below. Write$\text{\hspace{0.17em}}g(x)\text{\hspace{0.17em}}$and$\text{\hspace{0.17em}}h(x)\text{\hspace{0.17em}}$as transformations of$\text{\hspace{0.17em}}f(x).$
$x$  −2  −1  0  1  2 
$f(x)$  −1  −3  4  2  1 
$x$  −3  −2  −1  0  1 
$g(x)$  −1  −3  4  2  1 
$x$  −2  −1  0  1  2 
$h(x)$  −2  −4  3  1  0 
For the following exercises, write an equation for each graphed function by using transformations of the graphs of one of the toolkit functions.
For the following exercises, use the graphs of transformations of the square root function to find a formula for each of the functions.
For the following exercises, use the graphs of the transformed toolkit functions to write a formula for each of the resulting functions.
For the following exercises, determine whether the function is odd, even, or neither.
$g(x)=\sqrt{x}$
$f(x)={(x2)}^{2}$
$h(x)=2x{x}^{3}$
For the following exercises, describe how the graph of each function is a transformation of the graph of the original function$\text{\hspace{0.17em}}f.$
$g(x)=f(x)$
$g(x)=6f(x)$
$g(x)=f(2x)$
$g(x)=f\left(\frac{1}{5}x\right)$
$g(x)=f(3x)$
For the following exercises, write a formula for the function$\text{\hspace{0.17em}}g\text{\hspace{0.17em}}$that results when the graph of a given toolkit function is transformed as described.
The graph of$\text{\hspace{0.17em}}f(x)=\leftx\right\text{\hspace{0.17em}}$is reflected over the$\text{\hspace{0.17em}}y$axis and horizontally compressed by a factor of$\text{\hspace{0.17em}}\frac{1}{4}$ .
The graph of$\text{\hspace{0.17em}}f(x)=\sqrt{x}\text{\hspace{0.17em}}$is reflected over the$\text{\hspace{0.17em}}x$axis and horizontally stretched by a factor of 2.
The graph of$\text{\hspace{0.17em}}f(x)=\frac{1}{{x}^{2}}\text{\hspace{0.17em}}$is vertically compressed by a factor of$\text{\hspace{0.17em}}\frac{1}{3},\text{\hspace{0.17em}}$then shifted to the left 2 units and down 3 units.
The graph of$\text{\hspace{0.17em}}f(x)=\frac{1}{x}\text{\hspace{0.17em}}$is vertically stretched by a factor of 8, then shifted to the right 4 units and up 2 units.
The graph of$\text{\hspace{0.17em}}f(x)={x}^{2}\text{\hspace{0.17em}}$is vertically compressed by a factor of$\text{\hspace{0.17em}}\frac{1}{2},\text{\hspace{0.17em}}$then shifted to the right 5 units and up 1 unit.
The graph of$\text{\hspace{0.17em}}f(x)={x}^{2}\text{\hspace{0.17em}}$is horizontally stretched by a factor of 3, then shifted to the left 4 units and down 3 units.
For the following exercises, describe how the formula is a transformation of a toolkit function. Then sketch a graph of the transformation.
$g(x)=5{(x+3)}^{2}2$
$k(x)=3\sqrt{x}1$
$n(x)=\frac{1}{3}x2$
$q\left(x\right)={\left(\frac{1}{4}x\right)}^{3}+1$
For the following exercises, use the graph in Figure 32 to sketch the given transformations.
$g(x)=f(x)2$
$g(x)=f(x+1)$