In this section we are going to explore the graphical repercussions of alterations to a given function formula. Specifically, we are going to explore how the graph of the function \(g\) compares to the graph \(f\) where

for nonzero constants \(a\text{,}\) \(b\text{,}\) \(c\text{,}\) and \(d\text{.}\)

Before taking on the general cases, we need to examine the effects of minor, stand-alone, changes to the formula for \(f\text{.}\)

Transformations of type \(g(x)=f(x \pm h)\)

Assuming that \(h\) is a positive number, the graph of \(y=f(x-h)\) shifts every point on \(y=f(x)\) rightward by \(h\) units while the graph of \(y=f(x+h)\) shifts every point on \(y=f(x)\) leftward by \(h\) units.

The graphs of \(f(x)=\abs{x}\) and \(g(x)=\abs{x-3}\) are shown in FigureĀ 4.5.1. Notice that \(g\) is the result of shifting \(f\) to the right by 3 units. The graphs of \(f(x)=\abs{x}\) and \(h(x)=\abs{x+4}\) are shown in FigureĀ 4.5.2. Notice that \(h\) is the result of shifting \(f\) to the left by 4 units.

Assuming that \(k\) is a positive number, the graph of \(y=f(x)+k\) shifts every point on \(y=f(x)\) upward by \(hk\) units while the graph of \(y=f(x)-k\) shifts every point on \(y=f(x)\) downward by \(k\) units.

The graphs of \(f(x)=\abs{x}\) and \(g(x)=\abs{x}-5\) are shown in FigureĀ 4.5.3. Notice that \(g\) is the result of shifting \(f\) downward by 5 units. The graphs of \(f(x)=\abs{x}\) and \(h(x)=\abs{x}+2\) are shown in FigureĀ 4.5.4. Notice that \(h\) is the result of shifting \(f\) upward by 2 units.

Transformations of type \(g(x)=f(-x)\) and \(g(x)=-f(x)\)

The graph of \(y=f(-x)\) is a reflection of the graph of \(y=f(x)\) across the \(y\)-axis. The graph of \(y=-f(x)\) is a reflection of the graph of \(y=f(x)\) across the \(x\)-axis.

The graphs of \(f(x)=x+5\) and \(g(x)=-x+5\) are shown in FigureĀ 4.5.5. Notice that the two lines are reflections across the \(y\)-axis. The graphs of \(f(x)=x+5\) and \(g(x)=-(x+5)\) are shown in FigureĀ 4.5.6. Notice that the two lines are reflections across the \(x\)-axis.

Figure4.5.5\(\highlight{y=x+5}\) and \(\highlightr{y=-x+5}\)Figure4.5.6\(\highlight{y=x+5}\) and \(\highlightr{y=-(x+5)}\)

Transformations of type \(g(x)=f(bx)\) where \(b \gt 0, b \neq 1\)

The graph of \(y=f(bx), b \gt 0\) moves the \(x\)-coordinate of every point on \(f\) by the factor of \(\frac{1}{b}\text{.}\) When \(b \gt 1\) the result is a horizontal compression. When \(0 \lt b \lt 1\text{,}\) the result is a horizontal stretch.

The graphs of \(f(x)=x^2\) and \(g(x)=(2x)^2\) are shown in FigureĀ 4.5.7. Notice that every \(x\)-coordinate on \(f\) has been cut in half on the graph of \(g\text{.}\) The result is a horizontal compression of \(f\) by a factor of \(\frac{1}{2}\text{.}\) Three pairs of points have been highlighted to accentuate the effect. Specifically:

Figure4.5.7\(\highlight{y=x^2}\) and \(\highlightr{y=(2x)^2}\)

The graphs of \(f(x)=x^2\) and \(g(x)=\left(\frac{1}{3}x\right)^2\) are shown in FigureĀ 4.5.8. Notice that every \(x\)-coordinate on \(f\) has been tripled on the graph of \(g\text{.}\) The result is a horizontal stretch of \(f\) by a factor of \(3\text{.}\) Three pairs of points have been highlighted to accentuate the effect. Specifically:

Figure4.5.8\(\highlight{y=x^2}\) and \(\highlightr{y=\left(\frac{1}{3}x\right)^2}\)

Transformations of type \(g(x)=a \cdot f(x)\) where \(a \gt 0, a \neq 1\)

The graph of \(y=a \cdot f(x), a \gt 0\) moves the \(y\)-coordinate of every point on \(f\) by the factor of \(a\text{.}\) When \(a \gt 1\) the result is a vertical stretch. When \(0 \lt a \lt 1\text{,}\) the result is a vertical compression.

The graphs of \(f(x)=x^2\) and \(g(x)=2x^2\) are shown in FigureĀ 4.5.9. Notice that every \(y\)-coordinate on \(f\) has been doubled on the graph of \(g\text{.}\) The result is a vertical stretch of \(f\) by a factor of \(2\text{.}\) Three pairs of points have been highlighted to accentuate the effect. Specifically:

Figure4.5.9\(\highlight{y=x^2}\) and \(\highlightr{y=2x^2}\)

The graphs of \(f(x)=x^2\) and \(g(x)=\frac{1}{2}x^2\) are shown in FigureĀ 4.5.10. Notice that every \(y\)-coordinate on \(f\) has been cut in half on the graph of \(g\text{.}\) The result is a vertical compression of \(f\) by a factor of \(\frac{1}{2}\text{.}\) Three pairs of points have been highlighted to accentuate the effect. Specifically:

Figure4.5.10\(\highlight{y=x^2}\) and \(\highlightr{y=\frac{1}{2}x^2}\)

We now turn our attention to graphical transformations that involve multiple transformations. Let's make some observations based upon what we've already seen.

Every algebraic change made inside the function parentheses affects \(x\) and only \(x\text{;}\) i.e. these result in horizontal shifts, horizontal stretches, horizontal compressions, or horizontal reflections (across the \(y\)-axis).

Every algebraic change made outside the function parentheses affects \(y\) and only \(y\text{;}\) i.e. these result in vertical shifts, vertical stretches, vertical compressions, or vertical reflections (across the \(x\)-axis).

The changes that affect \(y\) behave in accordance with the way in which we usually think about graphs; addition results in an upward shift, subtraction results in a downward shift, multiplication by a constant greater than 1 results in a greater \(y\)-coordinate where as multiplication by a number between 0 and 1 results in a lesser \(y\)-coordinate.

The changes that affect \(x\) behave opposite of the way in which we usually think about graphs; addition results in a leftward shift, subtraction results in a rightward shift, multiplication by a constant greater than 1 results in a lesser \(x\)-coordinate whereas multiplication by a constant between 0 and 1 results in a greater \(x\)-coordinate.

A question that comes up when performing multiple transformations on the same function ā does order matter? It's fairly intuitive that the order does not matter when deciding between horizontal and vertical transformations ā the first only affects \(x\)-coordinates and the second only affects \(y\)-coordinates. Let's investigate where the order matters when there are multiple horizontal transformations (and by implication, multiple vertical transformations).

Example4.5.11

Suppose that \(f\) contains the point \((7,2)\text{.}\) Where does that point end up if it is shifted right by 4 units and then horizontally stretched by a factor of 2? What if the transformations are performed in the opposite order? What can we conclude from this example?

Shifting \((7,2)\) rightward by 4 units moves it to \((11,2)\text{.}\) Stretching \((11,2)\) horizontally by a factor of 2 moves it to \((22,2)\text{.}\)

Stretching \((1,2)\) horizontally by a factor of 2 moves it to \((2,2)\text{.}\) Shifting \((2,2)\) rightward by 4 units moves it to \((6,2)\text{.}\)

We can infer from this one example that if both a horizontal stretch/compression and a horizontal shift occur, the order does affect the outcome. It's reasonable to conclude that the same is true for a vertical stretch/compression and a vertical shifts.

Example4.5.12

Track the point \((7,2)\) through a reflection across the \(y\)-axis followed by a horizontal compression by a factor of \(\frac{2}{7}\text{.}\) Then track the same point performing the transformations in the opposite direction. What can we conclude?

Reflecting \((7,2)\) across the \(y\)-axis lands the point at \((-7,2)\) and the subsequent horizontal compression by a factor of \(\frac{2}{7}\) lands the point at \((-2,2)\text{.}\)

If we horizontally compress \((7,2)\) by a factor of \(\frac{2}{7}\) it moves to \((2,2)\text{.}\) Reflecting \((2,2)\) across the \(y\)-axis moves the point to \((-2,2)\text{.}\)

Our conclusion is that in either the horizontal or vertical direction, the order in which stretches/compressions and reflections occur does not matter.

Example4.5.13

Track the point \((7,2)\) through a leftward shift by 9 units followed by a reflection across the \(y\)-axis. Then track the same point performing the transformations in the opposite order. What can we conclude?

Shifting \((7,2)\) leftward by 9 units moves it to \((-2,2)\text{.}\) Reflecting \((-2,2)\) across the \(y\)-axis moves it to \((2,2)\text{.}\)

Reflecting \((7,2)\) across the \(y\)-axis moves it to \((-7,2)\) and shifting \((-7,2)\) leftward by 9 units moves it to \((-16,2)\text{.}\)

Our conclusion that when mixing reflections with shifts the order matters.

Summing up the last three examples, whether focused on the horizontal direction or vertical direction, the order matters when mixing transformations related to multiplication (stretches/compressions/reflections) with transformation related to addition/subtraction (shifts).

In the vertical direction, order of observation is observed. Consider \(g(x)=a \cdot f(x)+k\text{.}\) Because multiplication comes before addition (in order of operations), the stretch/compression/reflection comes before the shift.

Everything in the horizontal direction occurs opposite of the normal rules. So not only are the order of operations not followed, they are flat out reversed.

Consider \(g(x)=f(bx+c)\text{.}\) In order of operations, multiplication proceeds addition. Because horizontal transformations follow opposite-land rules, we need to address the addition first and then attend to the multiplication. To wit, the shift is performed before the stretch/compression/reflection.

Now consider \(g(x)=f\left(b(x-k)\right)\text{.}\) In order of operations, we attend to the expression inside the parentheses before addressing the multiplication. Horizontal transformations flaunt convention ā the multiplication is addressed before consideration is given to the expression inside the parentheses. So graphically, we perform the stretch/compression/refection before we perform the shift.

Let's see several examples.

Example4.5.14

Describe the graphical transformations (including order) affected upon \(f\) by \(g\) where \(g(x)=3f(x)+8\text{.}\)

Because all of the algebraic changes being made to \(f\) occur outside the parentheses, they affect \(y\)-coordinates and their application needs to follow the order of operations. To wit:

Perform a vertical stretch by a factor of 3.

Shift the resultant points upward by 8 units.

Example4.5.15

Describe the graphical transformations (including order) affected upon \(f\) by \(g\) where \(g(x)=f(3x+8)\text{.}\)

Because all of the algebraic changes being made to \(f\) occur inside the function parentheses, they affect \(x\)-coordinates and their application needs to be applied opposite of the order of operations. To wit:

Shift every point on \(f\) leftward by 8 units.

Horizontally compress the resultant points by a factor of \(\frac{1}{3}\text{.}\)

At least initially, most people find the opposite-land effects that occur in the horizontal direction annoying at best and totally confusing at worse. It can help one come to terms with the effects if they understand why they are opposite in nature to what most folks expect.

Let's consider the last example. Suppose that \(f(17)=23\) and that 17 is the only \(x\)-coordinate that has a function value of 23. What would the vale of \(x_{\text{new}}\) have to be so that \(g(x_{\text{new}})=23\text{.}\)

Since \(g(x_{\text{new}})=f(3x_{\text{new}}+8)\text{,}\) the only way that the value of \(g(x_{\text{new}})\) will be 23 is if

8 was subtracted from 17. The graphical result is the point being shifted to the left by 8 units.

That result was divided by 3. The graphical result is the point that resulted from step 1 being horizontally compressed by a factor of \(\frac{1}{3}\text{.}\)

Example4.5.16

Describe the graphical transformations (including order) affected upon \(f\) by \(g\) where \(g(x)=-2f\left(\frac{1}{4}x-5\right)-6\text{.}\)

Because all of the algebraic changes being made to \(f\) occur inside the function parentheses, they affect \(x\)-coordinates and their application needs to be applied opposite of the order of operations. Because order of operations tell us to attend to what's inside the parentheses first, in this opposite-land context we need to attend to the factor of \(-5\) first.

Compress every point on \(f\) by a factor of \(\frac{1}{5}\) and reflect every point across the \(y\)-axis. These two actions can be taken in either order.

Shift all of the resultant points leftward by 4 units.

Example4.5.18

Suppose that one point on \(f\) is \((-2,6)\) (i.e., \(f(-2)=6\)). What is one point that you know lies of \(g\) where \(g(x)=-f\left(\frac{1}{7}x-4\right)-12\text{.}\)

Because \(f\) graphs to a line segment, \(g\) will also graph to a line segment. (None of the transformations introduce a bend that was not already there.) As such, we can just track the endpoints through the transformations, plot the new endpoints, and connect those with a line segment. Let's begin with the horizontal transformations and follow up with the vertical transformations. To facilitate communication, let's give the endpoints labels.

Because \(f\) graphs to a V-shape, \(g\) will also graph to a V-shape. As such, we can just track the point of the V and one point on each arm of the V through the transformations, plot the new points, and connect into a V-shape. Let's begin with the horizontal transformations and follow up with the vertical transformations. To facilitate communication, let's give the key points labels.

The only two transformations that need to occur are a rightward shift by 3 units and an upward shift of 6 units. The point we know on \(g\) is \((4,7)\text{.}\)

The only two transformations that need to occur are a vertical stretch by a factor of 5 followed by a downward shift by 7 units. The point we know on \(g\) is \((1,-2)\text{.}\)

The only two transformations that need to occur are a rightward shift by a factor of 3 followed by a vertical compression by a factor of \(\frac{1}{4}\text{.}\) The point we know on \(g\) is \((1,1)\text{.}\)

There are two horizontal transformations and two vertical transformations that need to occur. Let's track \((1,1)\) through the four actions, starting with the horizontal transformations.

Shift rightward by four units. The point is now \((5,1)\text{.}\)

Horizontally stretch by a factor of 1.5. The point is now \((7.5,1)\text{.}\)

Reflect across the \(x\)-axis. The point is now \((7.5,-1)\text{.}\)

Shift upward by 7 units. The point \((1,1)\) from \(f\) ends up lying at \((7.5,6)\) on \(g\text{.}\)

There are three transformations in both the horizontal direction and the vertical direction. Let's track \((1,1)\) through the transformations starting with the horizontal transformations.

Shift rightward by 7 units. The point is now \((8,1)\text{.}\)

Reflect across the \(y\)-axis. The point is now \((-8,1)\text{.}\)

Horizontally compress by a factor of \(\frac{3}{4}\text{.}\) The point is now \((-6,1)\text{.}\)

Reflect across the \(x\)-axis. The point is now \((-6,-1)\text{.}\)

Vertically stretch by a factor of 8. The point is now \((-6,-8)\text{.}\)

Shift downward by 12 units. The point \((1,1)\) from \(f\) ends up lying at \((-6,-20)\) on \(g\text{.}\)

In each exercise a graph of a function named \(f\) is shown and a function named \(g\) is defined in terms of \(f\text{.}\) Draw onto the same set of axes the function \(g\text{.}\)

Since the function will stay linear, and two points determine a unique line, we can just track two points, plot their final location, and connect the dots. We'll start with the horizontal transformations and conclude with the vertical transformations. Let's identify our two points thus.

Since the function will stay linear, and two points determine a unique line, we can just track two points, plot their final location, and connect the dots. We'll start with the horizontal transformations and conclude with the vertical transformations. Let's identify our two points thus.

Since the function will retain its essential shape, we can track the two corner points and one point on each of the downward projecting rays. We'll start with the horizontal transformations and conclude with the vertical transformations. Let's identify our four points thus.