
Graphing Functions Using Stretches and Compressions
The last set of transformations you will explore on the graphs of functions are stretches and compressions. You will find out how the equation of a function changes when you stretch the graph in the x direction or the y direction.
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.
Figure 19 Vertical stretch and compression
Vertical Stretches and Compressions
Given a function , a new function
, where
is a constant, is a vertical stretch or vertical compression of the function
.
HOW TO
Given a function, graph its vertical stretch.
Example 13
Graphing a Vertical Stretch
A function models the population of fruit flies. The graph is shown in Figure 20.
Figure 20
A scientist is comparing this population to another population, , whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.
Solution
Because the population is always twice as large, the new population's output values are always twice the original function's output values. Graphically, this is shown in Figure 21.
If we choose four reference points, and
we will multiply all of the outputs by 2. The following shows where the new points for the new graph will be located.
Figure 21
Symbolically, the relationship is written as
This means that for any input , the value of the function
is twice the value of the function
. Notice that the effect on the graph is a vertical stretching of the graph, where every point doubles its distance from the horizontal axis. The input values,
, stay the same while the output values are twice as large as before.
HOW TO
Given a tabular function and assuming that the transformation is a vertical stretch or compression, create a table for a vertical compression.
Example 14
Finding a Vertical Compression of a Tabular Function
A function is given as Table 10. Create a table for the function
.
|
2 | 4 | 6 | 8 |
|
1 | 3 | 7 | 11 |
Table 10
Solution
The formula tells us that the output values of
are half of the output values of
with the same inputs. For example, we know that
. Then
We do the same for the other values to produce Table 11.
|
2 | 4 | 6 | 8 |
|
|
|
|
|
Table 11
Analysis
The result is that the function has been compressed vertically by
. Each output value is divided in half, so the graph is half the original height.
Example 15
Recognizing a Vertical Stretch
The graph in Figure 22 is a transformation of the toolkit function . Relate this new function
to
, and then find a formula for
.
Figure 22
Solution
When trying to determine a vertical stretch or shift, it is helpful to look for a point on the graph that is relatively clear. In this graph, it appears that . With the basic cubic function at the same input,
. Based on that, it appears that the outputs of
are
the outputs of the function
because
. From this we can fairly safely conclude that
.
We can write a formula for by using the definition of the function
.
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.
Figure 23
Given a function , the form
results in a horizontal stretch or compression. Consider the function
. Observe Figure 23. The graph of
is a horizontal stretch of the graph of the function
by a factor of 2. The graph of
is a horizontal compression of the graph of the function
by a factor of
.
Horizontal Stretches and Compressions
Given a function , a new function
, where
is a constant, is a horizontal stretch or horizontal compression of the function
.
HOW TO
Given a description of a function, sketch a horizontal compression or 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, , 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.
Solution
Symbolically, we could write
See Figure 24 for a graphical comparison of the original population and the compressed population.
Figure 24 (a) Original population graph (b) Compressed population graph
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 is given as Table 13. Create a table for the function
.
|
2 | 4 | 6 | 8 |
|
1 | 3 | 7 | 11 |
Table 13
Solution
The formula tells us that the output values for
are the same as the output values for the function
at an input half the size. Notice that we do not have enough information to determine
because
, and we do not have a value for
in our table. Our input values to
will need to be twice as large to get inputs for
that we can evaluate. For example, we can determine
.
We do the same for the other values to produce Table 14.
|
4 | 8 | 12 | 16 |
|
1 | 3 | 7 | 11 |
Table 14
Figure 25 shows the graphs of both of these sets of points.
Figure 25
Analysis
Because each input value has been doubled, the result is that the function has been stretched horizontally by a factor of 2.
Example 18
Recognizing a Horizontal Compression on a Graph
Relate the function to
in Figure 26.
Figure 26
Solution
The graph of looks like the graph of
horizontally compressed. Because
ends at
and
ends at
, we can see that the
- values have been compressed by
, because
. We might also notice that
and
. Either way, we can describe this relationship as
. This is a horizontal compression by
.
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 in our function:
. 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.
Source: Rice University, https://openstax.org/books/college-algebra/pages/3-5-transformation-of-functions
This work is licensed under a Creative Commons Attribution 4.0 License.