In the previous section we discussed the result of multiplying the output of the function by a constant value. However, what happens when we multiply the input of the function? To explore this idea, we look at the graphs of
As we can see above, compared to the graph of \(f(x)\text{,}\) the graph of \(f(2x) \) is compressed horizontally by a factor of \(2 \text{.}\) Effectively, if we are given a point \((x,y) \) on the graph of \(f(x) \) then \(\left(\dfrac{1}{2}x,y\right) \) is a point on the graph of \(f(2x)\text{.}\)
Looking at the table above we can verify this for a few points. For example, the point \((2,1)\) is on the graph of \(f(x)\text{.}\) Then
The graph of \(f\left(\dfrac{1}{2}x\right)\) is stretched horizontally by a factor of \(2 \) compared to the graph of \(f(x) \text{.}\) Further, if \((x,y) \) is a point on the graph of \(f(x)\text{,}\) then \((2x,y) \) is a point on the graph of \(f\left(\dfrac{1}{2}x\right)\text{.}\)
We can see this playing out in our example above. Notice that \((2,1) \) is a point on \(f(x)\text{,}\) and
\begin{equation*}
(2(2),1)=(4,1)
\end{equation*}
is a point on the graph of \(f\left(\dfrac{1}{2}x\right)\) as shown in the table and graph above. In general we have:
Horizontal Stretches, Compressions, and Reflections
Compared with the graph of \(y = f (x)\text{,}\) the graph of \(y = f (a\cdot x)\text{,}\) where \(a \ne 0\text{,}\) is
compressed horizontally by a factor of \(\abs{a}\) if \(\abs{a}\gt 1\text{,}\)
stretched horizontally by a factor of \(\abs{\dfrac{1}{a}}\) if \(0\lt\abs{a}\lt 1\text{,}\) and
reflected about the \(y\)-axis (and stretched or compressed) if \(a\lt 0\text{.}\)
As you may have notice by now through our examples, a horizontal stretch or compression will never change the \(y\) intercepts. This is a good way to tell if such a transformation has occurred.
Example272
The graph of \(f(x)\) is shown along with either a horizontal stretch of compression of \(f(x) \text{.}\) Decide if \(g(x) \) is a stretch or a compression, and give a formula for \(g(x)\) in terms of \(f(x)\text{.}\)
First, notice that the \(y\)-intercept stays fixed while the \(x\)-intercepts shift closer to the \(y\)-axis. This tells us that \(g(x)\) is a horizontal compression. The \(x \)-intercepts of \(f(x)\) are \(x=-1,1,2 \) while the \(x\)-intercepts of \(g(x)\) are \(x=-.5,.5,1\text{.}\)
So, the \(x\)-intercepts of \(g(x) \) can be achieved by taking the intercepts of \(f(x) \) and divide each by 2. This tells us that \(g(x)\) is a horizontal compression by a factor of \(2 \text{.}\) Hence, we may write
\begin{equation*}
g(x)=f(2x).
\end{equation*}
Figure274Explore the properties of horizontal stretches and compressions discussed in this section with this applet. You can change the base function \(f(x)\) using the input box and see many different stretches/compressions of \(f(x)\) by moving around the \(a\) slider.