Horizontal and Vertical Stretches or Compressions


In the next example, we will graph a function of the form \(y=af(bx)\), that is, a graph where we need to apply both a horizontal stretch or compression, and a vertical stretch or compression. 

Example 9

The graph of \(f(x)\) is shown. Sketch the graph of \(g(x)=3f\left(\dfrac12x\right)\).

Solution

The function f of x is the line segment that connects the points (negative 2, negative 1) to (0, 2) to (3, 2) to (6, negative 4).

\(g(x)=af(bx)\), with \(a=3\) and \(b=\dfrac12\).

Remember that \(a=3\) represents a vertical stretch by a factor of \(3\). 

\(b=\dfrac12\) represents a horizontal stretch by a factor of \(2\). 

It is possible to apply these transformations separately, or both at the same time. 

Each point needs to be moved so that it is three times farther from the \(x\)-axis and \(\)two times farther from the \(y\)-axis.

For the point \((-2, -1)\),

  • the \(x\)-coordinate will change from \(-2\) to \(-4\) (twice as far from the \(y\)-axis)
  • the \(y\)-coordinate will change from \(-1\) to \(-3\) (three times as far from the \(x\)-axis)

So the point \((-2, -1)\) becomes \((-4, -3)\).

Similar calculations can be made for the other points:

  • The point \((0, 2)\) becomes \((0, 6)\)
  • The point \((3, 2)\) becomes \((6, 6)\)
  • The point \((6, -4)\) becomes \((12, -12)\)

Sketch and join these four points to form the graph of \(g(x)=3f\left(\dfrac12x\right)\).

The function g of x equals 3 times f of open brackets 1 over 2 times x close bracket is sketched. It is a line segment that connects (negative 4, negative 3) to (0, 6) to (6, 6) to (12, negative 12).

Alternate Solution: 

This thinking can also be organized using a table.

Enter the \(x\)-coordinates of key points on the original graph as inputs; i.e., as \(\dfrac12x\).

Enter the \(y\)-coordinates of these same key points as outputs; i.e., as \(f\left(\dfrac12x\right)\).

\(x\) \(\dfrac12x\) \(f\left(\dfrac12x\right)\) \(y=3f\left(\dfrac12x\right)\)
  \(-2\) \(-1\)  
  \(0\) \(2\)  
  \(3\) \(2\)  
  \(6\) \(-4\)  

Calculate the values of \(x\) using the values of \(\dfrac12x\).

Then, calculate the values of \(y=3f\left(\dfrac12x\right)\) using the values of \(f\left(\dfrac12x\right)\).

\(x\) \(\dfrac12x\) \(f\left(\dfrac12x\right)\) \(y=3f\left(\dfrac12x\right)\)
\(-4\) \(-2\) \(-1\) \(-3\)
\(0\) \(0\) \(2\) \(6\)
\(6\) \(3\) \(2\) \(6\)
\(12\) \(6\) \(-4\) \(-12\)

The shaded columns represent the coordinates of key points on the graph of \(y=3f\left(\dfrac12x\right)\).


Check Your Understanding 5



Slide Notes

Glossary

All Slides

Comparing \(y=af(x)\) and \(y=f(bx)\)

Comparing \(y=af(x)\) and \(y=f(bx)\)

Comparing \(y=af(x)\) and \(y=f(bx)\)

Consider \(y=\dfrac13g(x)\) and \(y=g\left(\dfrac19x\right)\), where \(g(x)=\sqrt x\).

Comparing \(y=af(x)\) and \(y=f(bx)\)

Comparing \(y=af(x)\) and \(y=f(bx)\)

Consider \(y=2h(x)\) and \(y=h(0.5x)\), where \(h(x)=\dfrac1 x\)

 

 

Comparing \(y=af(x)\) and \(y=f(bx)\)

Since \(h(x)=\dfrac1x\),

\(y=2h(x)\) can be written as \(y=\dfrac2x\).

Summary

Paused Finished
Slide /

Example 10

Write a single vertical stretch or compression that is equivalent to the following:

  1. Applying a vertical stretch by a factor of \(4\) and a horizontal compression by a factor of \(2\) to the function \(f(x)=\dfrac1x\).
  2. Applying a vertical compression by a factor of \(54\) and a horizontal compression by a factor of \(3\) to the function \(g(x)=x^2\).

Solution — Part A

A vertical stretch by a factor of \(4\) and a horizontal compression by a factor of \(2\) can be written as \(4f(2x)\).

For the function \(f(x)=\dfrac1x\), this looks like \(4f(2x)=\dfrac4{2x}\).

Simplify:

\(\begin{align*} 4f(2x)&=\dfrac4{2x} \\ &= \dfrac2x \\ &= 2f(x) \end{align*}\)

Thus, the equivalent transformation is a vertical stretch by a factor of \(2\).

Solution — Part B

A vertical compression by a factor of \(54\) and a horizontal compression by a factor of \(3\) can be written as \(\dfrac1{54}g(3x)\).

For the function \(g(x)=x^2\), this looks like \(\dfrac1{54}g(3x)= \dfrac1{54}(3x)^2\).

Simplify

\(\begin{align*} \dfrac1{54}g(3x)&= \dfrac1{54}(3x)^2 \\ &= \dfrac1{54}(9x^2) \\ &= \dfrac9{54} x^2 \\ &= \dfrac16x^2 \\ &= \dfrac16 g(x) \end{align*} \)

Thus, the equivalent transformation is a vertical compression by a factor of \(6\).