Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Algebra 1

4.11.5 Horizontal Stretches and Compressions

Algebra 14.11.5 Horizontal Stretches and Compressions

Search for key terms or text.

Horizontal Stretches and Compressions

Access the Desmos guide PDF for tips on solving problems with the Desmos graphing calculator.

1. On the same coordinate grid, graph the following linear functions. You do not need to label the lines in the graphing tool.

Line Label Function
Line i i f ( x ) = x f ( x ) = x
Line j j f ( 2 x ) f ( 2 x )
Line k k f ( 1 2 x ) f ( 1 2 x )

2. What is the difference between what you entered for the functions of lines j j and k k in comparison to the function for line j j ?

3. Now, graph lines m m and n n on the same graph as i k i k .

Line Label Function
Line m m m ( x ) = 2 x m ( x ) = 2 x
Line n n n ( x ) = 1 2 x n ( x ) = 1 2 x

4. How does line j j , representing f ( 2 x ) f ( 2 x ) , compare to line m m , representing m ( x ) = 2 x m ( x ) = 2 x ?

5. How does line k k , representing f ( 1 2 x ) f ( 1 2 x ) , compare to line n n , representing n ( x ) = 1 2 x n ( x ) = 1 2 x ?

Horizontal dilations that stretch and compress linear functions are difficult to identify from graphs because they can appear as if they are vertical dilations. However, they are different because:

  • The changes to the function are applied to the input values of a function when the transformation is a horizontal dilation.
  • The changes to the function are applied to the output values of a function when the transformation is a vertical dilation.

6. Now graph the lines given below on the same coordinate grid.

Line Label Function
Line i i f ( x ) = x f ( x ) = x
Line j j f ( 2 x ) f ( 2 x )
Line p p f ( 3 x ) f ( 3 x )
Line q q f ( 4 x ) f ( 4 x )

7. As the coefficient on the input increases, what is happening to the graph?

8. Graph the lines given below on the same coordinate grid.

Line Label Function
Line i i f ( x ) = x f ( x ) = x
Line k k f ( 1 2 x ) f ( 1 2 x )
Line r r f ( 1 4 x ) f ( 1 4 x )
Line s s f ( 1 10 x ) f ( 1 10 x )

9. As the coefficient on the input approaches 0, what is happening to the graph?

10. Graph the lines given below on the same coordinate grid.

Line Label Function
Line t t f ( 1 2 x ) f ( 1 2 x )
Line u u f ( 1 2 x ) f ( 1 2 x )

In the function f ( b x ) f ( b x ) , the b b is acting as the horizontal stretch or horizontal compression of the parent function. It dilates the graph.

  • When b b is negative, there is also a horizontal reflection of the graph over the y y -axis.
  • Multiplying the function's input by b b horizontally compresses the graph of f f by a factor of b b units if b > 1 b > 1 .
  • The b b horizontally expands the graph of f f by a factor of b b units if 0 < b < 1 0 < b < 1 .
Graph with eight colorful lines showing transformations of f of x equals a times x. Each line, labeled in matching colors, represents different functions: f of one-tenth times x, f of one-fourth times x, f of one-half times x, f of 2 times x, f of 3 times x, f of negative x, f of negative one-half times x.

Horizontal Dilations of a Function

A horizontal stretch or compression “transforms” the parent function into another function by horizontally dilating the graph by “b” units.

Horizontal Dilation → f ( b x ) f ( b x )

If the b b value is negative, the graph is reflected over the y y -axis. If the b b value is greater than 1, the graph is horizontally compressed. If the b b value is between 0 and 1, the graph is horizontally stretched.

Self Check

Self Check

Which function represents g ( x ) , a function transformed from f ( x ) by a horizontal compression?

  1. g ( x ) = f ( x + 5 )
  2. g ( x ) = f ( x ) + 5
  3. g ( x ) = f ( 5 x )
  4. g ( x ) = 5 f ( x )

Additional Resources

Horizontal Transformations of Linear Functions

Horizontal transformations are the result of altering the input values before applying the function rule. Vertical transformations result from altering the output values after the function rule has been applied.

Example 1

Describe how f ( x ) f ( x ) is transformed into f ( x 3 ) f ( x 3 ) .

Solution

First, graph the given function, f ( x ) f ( x ) , the parent linear function.

A thick, red dashed line with a positive slope passes through the origin on an x-y grid, extending from the lower left to the upper right. Both axes are labeled and ticked from negative 4 to 5 for x and negative 4 to 7 for y.

Now, let’s examine an input value of x = 2 x = 2 using f ( x ) f ( x ) .

  • For the parent function f ( x ) f ( x ) , all points on the line are represented by ( x , f ( x ) ) ( x , f ( x ) ) .
  • So, when x = 2 x = 2 , then f ( x ) f ( x ) becomes f ( 2 ) f ( 2 ) .
  • That means this point is located at ( 2 , f ( 2 ) ) ( 2 , f ( 2 ) ) or ( 2 , 2 ) ( 2 , 2 ) .

In order to get the same output value for f ( x 3 ) f ( x 3 ) as we had for f ( x ) f ( x ) , we need to figure out how to change the input value.

  • Because our transformed equation is subtracting three from what we input, we have to increase the prior input value by 3 units to yield the same output as f ( x ) f ( x ) .
  • The input value that is 3 units larger than x = 2 x = 2 is 5. In the transformed equation, we must use x = 5 x = 5 .

So, in the original equation where x = 2 x = 2 resulted in f ( 2 ) = 2 f ( 2 ) = 2 , in the transformed equation, we have to use x = 5 x = 5 in order for f ( x 3 ) = f ( 5 3 ) = f ( 2 ) f ( x 3 ) = f ( 5 3 ) = f ( 2 ) .

A graph shows two lines: a red dashed line with open circles at (2,2), and a blue solid line passing through the points (2, negative 1) and (5,2) with an open circle.

On the graph, x = 5 x = 5 is located 3 units to the right of x = 2 x = 2 . So, the transformed equation of f ( x 3 ) f ( x 3 ) is 3 units to the right of f ( x ) f ( x ) .

Horizontal transformations are represented by the rule f ( x c ) f ( x c ) where c c indicates the number of units to the right or left that the graph is shifted.

Example 2

Graph f ( x + 2 ) f ( x + 2 ) when f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3 . Then, determine the equation of the transformed function.

Solution

Step 1 - Graph the given function, f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3 .

The y-intercept is (0, -3) and the slope is 1 2 1 2 .

For horizontal shifts, it is helpful to identify the x-intercept. On our graph, the x-intercept or zero is located at (6,0).

A graph with a dashed red line with a positive slope. There is a white open circle on the line at the point (6, 0).

Step 2 - Apply the designated transformation. Remember that the rule for a horizontal shift is f ( x c ) f ( x c ) . If we rewrite f ( x + 2 ) f ( x + 2 ) in an equivalent form, we can make it is easier to see x c x c .

f ( x + 2 ) = f ( x ( 2 ) ) f ( x + 2 ) = f ( x ( 2 ) ) That means c = 2 c = 2 .

So, f ( x + 2 ) f ( x + 2 ) represents a horizontal shift of two units to the left. On our graph, we move the x-intercept two units left from (6, 0) to (4, 0).

A graph with a solid blue line and a dashed red line are parallel on a grid. The blue line passes through points (4, 0), and (6,0), which are marked with open circles. Axes range from -2 to 8 on x and -5 to 6 on y.

The orange dashed line is the graph of the original function and the blue solid line is the transformed function.

Step 3 - Determine the equation of the transformed function.

The y-intercept of the transformed line is (0, -2) and the slope of the line is 2 4 2 4 or 1 2 1 2 .

That means the equation f ( x + 2 ) = 1 2 x 2 f ( x + 2 ) = 1 2 x 2

Want to check your work? We can check our equation algebraically by substituting x + 2 x + 2 into f ( x ) f ( x ) .

f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3

f ( x + 2 ) = 1 2 ( x + 2 ) 3 = 1 2 x + 1 3 = 1 2 x 2 f ( x + 2 ) = 1 2 ( x + 2 ) 3 = 1 2 x + 1 3 = 1 2 x 2

Example 3

Graph f ( 4 x ) f ( 4 x ) when f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3 . Then, determine the equation of the transformed function.

Solution

Step 3 - Graph the given function, f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3 .

The y-intercept is (0, -3) and the slope is 1 2 1 2 .

For horizontal shifts, it is helpful to identify the x-intercept. On our graph, the x-intercept or zero is located at (6,0).

A graph with a dashed red line with a positive slope. There is a white open circle on the line at the point (6, 0).

Step 2 - Apply the designated transformation. Remember that the rule for a horizontal shift is f ( b x ) f ( b x ) . And, when the value of b b is greater than 1, the function experiences a horizontal compression.

As a result of the horizontal compression, the linear function should look steeper because it is being compressed by a scale factor of 4.

On our graph, this means the x-intercept is compressed from (6, 0) to (1.5, 0).

A graph showing a blue line with positive slope crossing the y-axis at -3, and a red dashed line with positive slope crossing the y-axis at negative 3. The lines intersect at point (0, negative 3) with an open white circle. There are also open white circles at (1.5, 0) and (6, 0).

The orange dashed line is the graph of the original function and the blue solid line is the transformed function.

Step 3 - Determine the equation of the transformed function.

The y-intercept of the transformed line is (0, -3) and the slope of the line is 3/1.5 or 2.

That means the equation f ( 4 x ) = 2 x 3 f ( 4 x ) = 2 x 3 .

Want to check your work? We can check our equation algebraically by substituting 4x into f ( x ) f ( x ) .

f ( x ) = 1 2 x 3 f ( x ) = 1 2 x 3

f ( 4 x ) = 1 2 ( 4 x ) 3 = 2 x 3 f ( 4 x ) = 1 2 ( 4 x ) 3 = 2 x 3

Try it

Try It: Horizontal Transformations of Linear Functions

Name the transformation to go from the parent function, f ( x ) = x f ( x ) = x , to f ( x 1 ) f ( x 1 ) .

Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:

    Access for free at https://openstax.org/books/algebra-1/pages/about-this-course

  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:

    Access for free at https://openstax.org/books/algebra-1/pages/about-this-course

Citation information

© May 21, 2025 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.