Compressions And Stretches of Functions

Last Updated : 24 Apr, 2026

Compressions and stretches are mathematical transformations that alter the scale of a function's graph. These transformations change the shape and position of graphs, providing a framework to analyze complex mathematical relationships and model real-world scenarios.

Vertical Compression and Vertical Stretch

A vertical transformation, written as y = a⋅f(x), scales all y-values by a factor of a while keeping the x-values unchanged. This creates one of two effects, depending on the value of a:

Type

Condition

Effect

Vertical Compression

0 < a < 1

Reduces each point's distance from the x-axis; graph appears squished vertically

Vertical Stretch

a > 1

Increases each point's distance from the x-axis; graph becomes taller

Steps to Graph a Function y = a·f(x):

  • Identify the function and factor: Note the value of a, whether it's a compression (0 < a < 1) or a stretch (a > 1).
  • Multiply y-coordinates: For each point on the original graph f(x), multiply its y-coordinate by a.
  • Plot the new points: Plot the transformed points on the graph.
  • Connect the points: Draw the new graph by connecting the transformed points.

Horizontal Compression & Horizontal Stretch

A horizontal transformation, written as y = f(b⋅x), scales the graph along the x-axis. Because the constant b directly multiplies the input, it creates one of two effects:

Type

Condition

Effect

Horizontal Compression

b > 1

Compresses the graph toward the y-axis, becomes narrower

Horizontal Stretch

0 < b < 1Stretches the graph away from the y-axis—becomes wider

Steps to Graph a Function y = f(b·x):

  • Identify the function and factor: Note the value of b, whether it's a compression (b > 1) or a stretch (0 < b < 1).
  • Divide the x-coordinates: For each point on the original graph f(x), divide its x-coordinate by b.
  • Plot the new points: Plot the transformed points on a graph.
  • Connect the points: Draw the new graph by connecting the transformed points.

Solved Examples

Example 1: Given the function f(x) = x,2 determine the new function after a vertical stretch by a factor of 3.

Solution:

The new function is:

g(x) = 3f(x) = 3(x2) = 3x2

Graph Analysis: The graph of g(x) is taller than f(x).

Compression-and-Stretching-1
Vertical Stretch

Example 2: For the function f(x) = 4x,2 apply a vertical compression by a factor of 1/2. What is the new function?

Solution:

The new function is:

g(x) = 1/2 f(x) = 1/2 (4x2) = 2x2

Graph Analysis: The graph of g(x) is shorter than f(x).

Compression-and-Stretching-2

Example 3: For the function f(x) = sin(x), apply a horizontal stretch by a factor of 2. What is the new function?

Solution:

The new function is:

g(x) = f( x/2) = sin(x/2)

Graph Analysis: The graph of g(x) is wider than f(x).

Compression-and-Stretching-3

Example 4: Given the function f(x) = x3 apply a horizontal compression by a factor of 3. What is the new function?

Solution:

The new function is:

g(x) = f(3x) = (3x)3 = 27x3

Graph Analysis: The graph of g(x) is narrower than f(x).

Compression-and-Stretching-4

Example 5: For the function f(x) = 2x − 3, first apply a vertical stretch by a factor of 2 and then a horizontal compression by the factor of 4. What is the resulting function?

Solution:

Vertical Stretch:

g1(x) = 2f(x) = 2(2x −3) = 4x − 6

Horizontal Compression:

𝑔2(x) = g1(4x) = 4(4x) − 6 = 16x − 6

Final Function: g(x) = 16x − 6

Compression-and-Stretching-5

Practice Questions

Question 1: Apply a vertical stretch by a factor of 5 to the function f(x) = x2. What is the new function?

Question 2: Given the function f(x) = cos(x), apply a vertical compression by a factor of 1/3. What is the resulting function?

Question 3: For the function f(x) = eˣ, perform a horizontal stretch by a factor of 2. What is the new function?

Question 4: Apply a horizontal compression by a factor of 2 to the function f(x) = ln(x). What is the resulting function?

Question 5: Given the function f(x) = 3x2 + 2, find the new function after a vertical compression by the factor of 1/4.

Question 6: For the function f(x) = x + 1, apply a vertical stretch by the factor of 4. What is the new function?

Question 7: Given f(x) = 5x,3 perform a horizontal stretch by a factor of 3. What is the resulting function?

Question 8: Apply a vertical compression by a factor of 1 / 2 to the function f(x) = x4. What is the new function?

Question 9: For the function f(x) = tan(x), apply a horizontal compression by the factor of 1/2. What is the resulting function?

Question 10: If f(x) = 2x − 3x + 1, apply a vertical stretch by a factor of 3. What is the new function?

Answer Key

1. f(x) = 5x2

6. f(x) = 4(x + 1)

2. f(x) = 3/1cos(x)

7. f(x) = 5( 3/x)3

3. f(x) = e2/x

8. f(x) = 2/1x4

4. f(x) = ln(2x)

9. f(x) = tan(2x)

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

10. f(x) = 3(2x2−3x + 1)

Comment
Article Tags:

Explore