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.
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.
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
.
- If
, then the graph will be stretched.
- If
, then the graph will be compressed.
- If
, 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
.
- Multiply all range values by
.
- If
, the graph is stretched by a factor of
.
If, the graph is compressed by a factor of
.
If, the graph is either stretched or compressed and also reflected about the
-axis.
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 |
|
|
|
|
|
Analysis
TRY IT #9
|
2 | 4 | 6 | 8 |
|
12 | 16 | 20 | 0 |
Solution
TRY IT #10
Horizontal Stretches and Compressions

HORIZONTAL STRETCHES AND COMPRESSIONS
- If
, then the graph will be compressed by
.
- If
, then the graph will be stretched by
.
- If
, 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.
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

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.