Graphing Functions Using Stretches and Compressions
Site: | Saylor Academy |
Course: | MA001: College Algebra |
Book: | Graphing Functions Using Stretches and Compressions |
Printed by: | Guest user |
Date: | Thursday, 3 April 2025, 12:02 AM |
Description
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.
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.