3.5 Graphing Functions Using Stretches and Compressions – Math 3080 Preparation (2024)

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 3-13 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 [latex]\text{}f\left(x\right),\text{}[/latex] a new function [latex]\text{}g\left(x\right)=af\left(x\right),\text{}[/latex] where [latex]\text{}a\text{}[/latex] is a constant, is a vertical stretch or vertical compression of the function [latex]\text{}f\left(x\right)[/latex].

  • If [latex]\text{}a>1\text{}[/latex], then the graph will be stretched.
  • If [latex]\text{}0 < a<1\text{}[/latex], then the graph will be compressed.
  • If [latex]\text{}a<0\text{}[/latex], then there will be combination of a vertical stretch or compression with a vertical reflection.

How To

Given a function, graph its vertical stretch.

  1. Identify the value of [latex]\text{}a[/latex].
  2. Multiply all range values by [latex]\text{}a[/latex].
  3. If [latex]\text{}\text{}a>1\text{}\text{}[/latex], the graph is stretched by a factor of [latex]\text{}a[/latex]. If [latex]\text{} 0 < a < 1\text{}[/latex], the graph is compressed by a factor of [latex]\text{}a[/latex]. If [latex]a < 0[/latex], the graph is either stretched or compressed and also reflected about the x-axis.

Example 1: Graphing a Vertical Stretch

A function [latex]\text{}P\left(t\right)\text{}[/latex] models the population of fruit flies. The graph is shown in Figure 3-14.

A scientist is comparing this population to another population, [latex]\text{}Q\text{}[/latex], whose growth follows the same pattern, but is twice as large. Sketch a graph of this population.

Solution

How To

Given a tabular function and assuming that the transformation is a vertical stretch or compression, create a table for a vertical compression.

  1. Determine the value of [latex]\text{}a[/latex].
  2. Multiply all of the output values by [latex]\text{}a[/latex].

Example 2: Finding a Vertical Compression of a Tabular Function

A function [latex]\text{}f\text{}[/latex] is given as Table 5. Create a table for the function [latex]\text{}g\left(x\right)=\frac{1}{2}f\left(x\right)[/latex].

Table 5
[latex]x[/latex]2468
[latex]f\left(x\right)\text{}[/latex]13711

Analysis

The result is that the function [latex]\text{}g\left(x\right)\text{}[/latex] has been compressed vertically by [latex]\text{}\frac{1}{2}\text{}[/latex]. Each output value is divided in half, so the graph is half the original height.

2. A function [latex]\text{}f\text{}[/latex] is given as Table 6. Create a table for the function[latex]\text{}g\left(x\right)=\frac{3}{4}f\left(x\right)[/latex].

Table 6
[latex]x[/latex]2468
[latex]f\left(x\right)[/latex]1216200

Solution

Example 3: Recognizing a Vertical Stretch

The graph in Figure 3-15 is a transformation of the toolkit function [latex]\text{}f\left(x\right)={x}^{3}\text{}[/latex]. Relate this new function [latex]\text{}g\left(x\right)\text{}[/latex] to [latex]\text{}f\left(x\right)\text{}[/latex], and then find a formula for [latex]\text{}g\left(x\right)[/latex].

Solution

Example 4: Vertical Stretch

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.

Solution

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 [latex]\text{}y=f\left(x\right)\text{}[/latex], the form [latex]\text{}y=f\left(bx\right)\text{}[/latex] results in a horizontal stretch or compression. Consider the function [latex]\text{}y={x}^{2}\text{}[/latex]. Observe Figure 3-16. The graph of [latex]\text{}y={\left(0.5x\right)}^{2}\text{}[/latex] is a horizontal stretch of the graph of the function [latex]\text{}y={x}^{2}\text{}[/latex] by a factor of 2. The graph of [latex]\text{}y={\left(2x\right)}^{2}\text{}[/latex] is a horizontal compression of the graph of the function [latex]\text{}y={x}^{2}\text{}[/latex] by a factor of [latex]\text{}\frac{1}{2}[/latex].

Horizontal Stretches and Compressions

Given a function [latex]\text{}f\left(x\right)\text{}[/latex], a new function [latex]\text{}g\left(x\right)=f\left(bx\right)\text{}[/latex], where [latex]\text{}b\text{}[/latex] is a constant, is a horizontal stretch or horizontal compression of the function [latex]\text{}f\left(x\right)[/latex].

  • If [latex]\text{}b>1\text{}[/latex], then the graph will be compressed by [latex]\text{}\frac{1}{b}[/latex].
  • If [latex]\text{}0 < b < 1\text{}[/latex], then the graph will be stretched by [latex]\text{}\frac{1}{b}[/latex].
  • If [latex]\text{}b<0\text{}[/latex], 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.

  1. Write a formula to represent the function.
  2. Set [latex]\text{}g\left(x\right)=f\left(bx\right)\text{}[/latex] where [latex]\text{}b>1\text{}[/latex] for a compression or [latex]\text{}0 < b < 1\text{}[/latex] for a stretch.

Example 5: 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, [latex]\text{}R\text{}[/latex], 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.

Solution

Example 6: Finding a Horizontal Stretch for a Tabular Function

A function [latex]\text{}f\left(x\right)\text{}[/latex] is given as Table 7. Create a table for the function [latex]\text{}g\left(x\right)=f\left(\frac{1}{2}x\right)[/latex].

Table 7
[latex]x[/latex]2468
[latex]f\left(x\right)[/latex]13711

Analysis

Because each input value has been doubled, the result is that the function [latex]\text{}g\left(x\right)\text{}[/latex] has been stretched horizontally by a factor of 2.

Solution

Example 7: Recognizing a Horizontal Compression on a Graph

Relate the function [latex]\text{}g\left(x\right)\text{}[/latex] to [latex]\text{}f\left(x\right)\text{}[/latex] in Figure 3-17.

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 [latex]\text{}\frac{1}{4}\text{}[/latex] in our function: [latex]\text{}f\left(\frac{1}{4}x\right)\text{}[/latex]. 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.

Solution

Example 8: Horizontal Stretch

Write a formula for the toolkit square root function horizontally stretched by a factor of 3.

Solution

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 [latex]\text{}\text{}2f\left(x\right)+3\text{}[/latex], which transformation should we start with? The answer here follows nicely from the order of operations. Given the output value of [latex]\text{}f\left(x\right)\text{}[/latex], 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 [latex]\text{}g\left(x\right)=f\left(2x+3\right)\text{}[/latex], for example, we have to think about how the inputs to the function [latex]\text{}g\text{}[/latex] relate to the inputs to the function [latex]\text{}\text{}f\text{}[/latex]. Suppose we know [latex]\text{}f\left(7\right)=12\text{}[/latex]. What input to [latex]\text{}g\text{}[/latex] would produce that output? In other words, what value of [latex]\text{}x\text{}[/latex] will allow [latex]\text{}g\left(x\right)=f\left(2x+3\right)=12\text{}[/latex]? We would need [latex]\text{}2x+3=7\text{}[/latex]. To solve for [latex]\text{}x\text{}[/latex], 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.

[latex]f\left(bx+p\right)=f\left(b\left(x+\frac{p}{b}\right)\right)[/latex]

Let’s work through an example.

[latex]f\left(x\right)={\left(2x+4\right)}^{2}[/latex]

We can factor out a 2.

[latex]f\left(x\right)={\left(2\left(x+2\right)\right)}^{2}[/latex]

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 [latex]\text{}af\left(x\right)+k,\text{}[/latex] first vertically stretch by [latex]\text{}a\text{}[/latex] and then vertically shift by [latex]\text{}k[/latex].

When combining horizontal transformations written in the form [latex]\text{}f\left(bx-h\right)\text{}[/latex], first horizontally shift by [latex]\text{}h\text{}[/latex] and then horizontally stretch by [latex]\text{}\frac{1}{b}[/latex].

When combining horizontal transformations written in the form [latex]\text{}f\left(b\left(x-h\right)\right)\text{}[/latex], first horizontally stretch by [latex]\text{}\frac{1}{b}\text{}[/latex] and then horizontally shift by [latex]\text{}h[/latex].

Horizontal and vertical transformations are independent. It does not matter whether horizontal or vertical transformations are performed first.

Example 9: Finding a Triple Transformation of a Tabular Function

Given Table 8 for the function [latex]\text{}f\left(x\right)\text{}[/latex], create a table of values for the function [latex]\text{}g\left(x\right)=2f\left(3x\right)+1[/latex].

Table 8
[latex]x[/latex]6121824
[latex]f\left(x\right)[/latex]10141517

Solution

Example 10: Finding a Triple Transformation of a Graph

Use the graph of [latex]\text{}f\left(x\right)\text{}[/latex] in Figure 3-18 to sketch a graph of [latex]\text{}k\left(x\right)=f\left(\frac{1}{2}x+1\right)-3[/latex].

Solution

Access for free at https://openstax.org/books/precalculus/pages/1-introduction-to-functions

3.5 Graphing Functions Using Stretches and Compressions – Math 3080 Preparation (2024)

FAQs

How do you know if a graph is stretching or compressing? ›

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.

How to do compressions math? ›

In math terms, you can stretch or compress a function horizontally by multiplying x by some number before any other operations. To stretch the function, multiply by a fraction between 0 and 1. To compress the function, multiply by some number greater than 1.

How to stretch a graph by a factor of 3? ›

If g(x) = 3f (x): For any given input, the output iof g is three times the output of f, so the graph is stretched vertically by a factor of 3. If g(x) = f (3x): For any given output, the input of g is one-third the input of f, so the graph is shrunk horizontally by a factor of 3.

What does stretch mean in math? ›

A stretch or compression is a function transformation that makes a graph narrower or wider, without translating it horizontally or vertically.

How does stretching a graph work? ›

Multiplying the x by a number between 0 and 1 will make the graph wider, or stretched horizontally. For example, multiplying the input by 2 would produce a graph that is half as wide. But multiplying the input by 0.5 results in a graph that is twice as wide, or stretched horizontally .

Is a negative a stretch or compression? ›

If the constant is greater than one (k > 1), a horizontal compression will occur. If the constant is between 0 and 1 (0 < k < 1), a horizontal stretch will occur. (FYI: If it appears that k is negative, you are looking at a horizontal stretch, or compress, followed by a horizontal reflection (in the y-axis).

What are compressions in math? ›

Compression (Mathematical Object) Initial Definition. A compression occurs when a mathematical object is scaled by a scale factor less in absolute value than one. When a compression occurs, the image is smaller than the original mathematical object.

What is the compression function? ›

A compression function mixes two fixed length inputs and produces a single fixed length output of the same size as one of the inputs. This can also be seen as that the compression function transforms one large fixed-length input into a shorter, fixed-length output.

How do you stretch a function vertically by 3? ›

For the vertical stretch of 3, we multiply the x^2 by 3 to get y=3x^2, and for the horizontal translation right 2 units we subtract 2 from the x to get y=3(x-2)^2.

How do you show stretches on a graph? ›

Multiplying a function by a number greater than 1 makes the graph taller, or stretched vertically . Multiplying the function by a number between 0 and 1 makes the graph shorter, or shrunk vertically . For example, multiplying the function by 2 would produce a graph that is twice as tall.

What is a compression or stretch in exponential functions? ›

A General Note: Transformations of Exponential Functions

stretched vertically by a factor of |a| if |a| > 0. compressed vertically by a factor of |a| if 0 < |a| < 1.

How to apply horizontal stretch to graph? ›

Start with the equation y=f(x). Replace every x by xk to give the new equation y=f(xk). This causes the x -values on the graph to be MULTIPLIED by k, which moves the points farther away from the y -axis. This is called a horizontal stretch.

Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 5703

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.