Graphing Functions Using Stretches and Compressions
Site: | Saylor Academy |
Course: | MA120: Applied College Algebra |
Book: | Graphing Functions Using Stretches and Compressions |
Printed by: | Guest user |
Date: | Saturday, 3 May 2025, 2:30 PM |
Description

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.
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 , which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of
, 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 , for example, we have to think about how the inputs to the function
relate to the inputs to the function
. Suppose we know
. What input to
would produce that output? In other words, what value of
will allow
? We would need
. To solve for
, 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 , first vertically stretch by
and then vertically shift by
.
When combining horizontal transformations written in the form , first horizontally shift by
and then horizontally stretch by
.
When combining horizontal transformations written in the form , first horizontally stretch by
and then horizontally shift by
.
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 Table15 for the function , create a table of values for the function
.
x | 6 | 12 | 18 | 24 |
f(x) | 10 | 14 | 15 | 17 |
Table 15
Solution
There are three steps to this transformation, and we will work from the inside out. Starting with the horizontal transformations, is a horizontal compression by
, which means we multiply each
- value by
. See Table 16.
2 | 4 | 6 | 8 | |
10 | 14 | 15 | 17 |
Table 16
Looking now to the vertical transformations, we start with the vertical stretch, which will multiply the output values by 2. We apply this to the previous transformation. See Table 17.
Finally, we can apply the vertical shift, which will add 1 to all the output values. See Table 18.
2 | 4 | 6 | 8 | |
21 | 29 | 31 | 35 |
Table 18
Example 20
Finding a Triple Transformation of a Graph
Use the graph of in Figure 27 to sketch a graph of
.
Figure 27
Solution
To simplify, let's start by factoring out the inside of the function.
By factoring the inside, we can first horizontally stretch by 2, as indicated by the on the inside of the function. Remember that twice the size of 0 is still 0, so the point
remains at
while the point
will stretch to
. See Figure 28.
Figure 28
Next, we horizontally shift left by 2 units, as indicated by . See Figure 29.
Figure 29
Last, we vertically shift down by 3 to complete our sketch, as indicated by the on the outside of the function. See Figure 30.
Figure 30
Function Transformations: Horizontal and Vertical Stretches and Compressions
Source:
Mathispower4u, https://youtu.be/2S9LUinJ8-w
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.