Skip to main content

Section 7.1 Vertical and Horizontal Shifts

Subsection Vertical Shifts

What happens if we change the function \(f(x) = x^2\) by adding or subtracting a number from it? For instance, what would the graphs of \(g(x) = x^2 + 1\) and \(h(x) = x^2 - 3\) look like? In this case, the graph of \(g(x) = x^2 + 1\) is the graph of \(f(x) = x^2\) shifted up one unit and the graph of \(h(x) = x^2 - 3\) is the graph of \(f(x) = x^2\) shifted down 3 units.
In general, if we begin with the graph of a function \(y = f(x)\text{,}\) then the function \(g(x) = f(x) + k\) can be given by the formula \(g(x) = y + k\text{.}\) That is, the \(y\)-values of \(g(x)\) are the \(y\)-values of \(f(x)\) adjusted by the addition of the number \(k\text{.}\) Hence, the graph of \(g(x) = f(x) + k\) is the graph of \(f(x)\) shifted either upward or downward depending upon the value of \(k\text{.}\)

Instructions.

Drag the dot to see the effect of vertical shifts on \(f(x) = x^2\text{.}\)
Figure 7.1.1.

Definition 7.1.2. Vertical Shift.

Given a function \(f(x)\) and a constant \(k\text{,}\) \(g(x) = f(x) + k\) is a vertical shift of the graph of \(f(x)\text{.}\) If \(k\) is positive, then:
  • the graph of \(g(x) = f(x) + k\) is the graph of \(f(x)\) shifted UP \(k\) units.
  • the graph of \(g(x) = f(x) - k\) is the graph of \(f(x)\) shifted DOWN \(k\) units.

Example 7.1.3.

The graph of a function \(f(t)\) is given below. Plot \(G(t) = f(t) - 4\) and \(H(t) = f(t) + 1.5\text{.}\)
Solution.
The graph of \(G(t) = f(t) - 4\) is the graph of \(f(t)\) shifted down 4 units while the graph of \(H(t) = f(t) + 1.5\) is the graph of \(f(t)\) shifted up 1.5 units. Hence, we have the following.

Example 7.1.4.

The total monthly cost \(C\) to operate a company depends upon the fixed costs for facility rental and equipment as well as the number of units, \(p\text{,}\) that the company produces that month. The table below shows this relationship for a typical month.
\(p\) \(0\) \(10\) \(20\) \(30\)
\(C\) \(2500\) \(2650\) \(2800\) \(2950\)
Suppose the rent on the facility went up by \(\$200\) per month. Create a table for the resulting total monthly cost function \(S\) as a function of the number of units produced, \(p\text{.}\)
Solution.
The outputs in the original table give the original total monthly cost as a function of the number of units produced, \(p\text{.}\) If the rent were to go up by \(\$200\) per month, then the resulting total monthly cost function would be \(S = C + 200\text{.}\) This is a vertical shift of the original cost function \(C\text{,}\) and values for it can be obtained by adding 200 to each of the outputs in the original table, as can be seen below.
\(p\) \(0\) \(10\) \(20\) \(30\)
\(S\) \(2700\) \(2850\) \(3000\) \(3150\)

Subsection Horizontal Shifts

We saw that adding or subtracting a number from the output of a function results in a vertical shift. What happens if we add or subtract a number from the input of a function instead?
For instance, we know that \(y = \sqrt{x} + 2\) would result in shifting the function \(f(x) = \sqrt{x}\) up two units. But what if we added or subtracted a number under the square root insteadβ€”that is, from the input of the function rather than the output?
To illustrate, we will consider the functions \(g(x) = \sqrt{x + 2}\) and \(h(x) = \sqrt{x - 3}\text{.}\) The graph of \(g(x) = \sqrt{x + 2}\) is the graph of \(f(x) = \sqrt{x}\) shifted left two units while \(h(x) = \sqrt{x - 3}\) is the graph of \(f(x) = \sqrt{x}\) shifted right 3 units.
To help explain why this is the case, notice that the formula \(f(x) = \sqrt{x} = y\) is solved for \(y\) and not \(x\text{.}\) We can change this by squaring both sides of \(\sqrt{x} = y\text{:}\)
\begin{equation*} x = y^2. \end{equation*}
If we were then to solve the formula \(g(x) = \sqrt{x + 2} = y\) for \(x\text{,}\) we would square both sides of \(\sqrt{x+2} = y\) and then subtract 2:
\begin{align*} x + 2 \amp= y^2\\ x + 2 \textcolor{blue}{-2} \amp= y^2 \textcolor{blue}{-2}\\ x \amp= y^2 - 2. \end{align*}
Notice that the formula for the \(x\)-values of \(g(x) = \sqrt{x + 2}\) involves subtracting \(2\) from the formula for the \(x\)-values of the original function \(f(x) = \sqrt{x}\text{.}\) This means that for each specific \(y\)-value, the corresponding \(x\)-value of \(g(x) = \sqrt{x + 2}\) is two units in the negative direction from that of the original function \(f(x) = \sqrt{x}\text{;}\) that is, two units to the left.

Instructions.

Drag the dot to see the effect of horizontal shifts on \(f(x) = \sqrt{x}\text{.}\)
Figure 7.1.5.

Definition 7.1.6. Horizontal Shifts.

Given a function \(f(x)\) and a constant \(h\text{,}\) \(g(x) = f(x + h)\) is a horizontal shift of the graph of \(f(x)\text{.}\) If \(h\) is positive, then
  • the graph of \(g(x) = f(x + h)\) is the graph of \(f(x)\) shifted LEFT \(h\) units.
  • the graph of \(g(x) = f(x - h)\) is the graph of \(f(x)\) shifted RIGHT \(h\) units.

Example 7.1.7.

In an effort to save on heating costs, the thermostat in a professor’s home has been programmed to keep his house at 65 degrees while he is home from 4pm to 8am the following day and to drop the temperature to 55 degrees while he is at work from 8am to 4pm each day. This is illustrated in the graph below, where \(t\) corresponds to hours past since midnight and \(S\) corresponds to the thermostat setting.
Due to a schedule change requiring him to teach a night class, the professor needs to shift his entire work schedule later by four hours and hence adjust his thermostat setting accordingly. Sketch a graph reflecting this change.
Solution.
Shifting his entire work schedule forward by 4 hours is equivalent to moving it forward in time by 4 hours. This corresponds to a horizontal shift to the right 4 units. This means that we must graph the corresponding horizontal shift \(S(t - 4)\text{.}\)
Note that the original graph shows a thermostat setting of 55 degrees between times \(t = 8\) and \(t = 16\text{,}\) corresponding to a work day stretching from 8am to 4pm. The shifted graph shows a thermostat setting of 55 degrees between times \(t = 12\) and \(t = 20\text{,}\) corresponding to a work day stretching from 12pm to 8pm (pushed back 4 hours, as it was intended).

Example 7.1.8.

Consider the function \(f(x)\) given in the table below. Construct a table of values for \(g(x) = f(x + 6.2)\text{.}\)
\(x\) \(0\) \(5\) \(10\) \(15\)
\(f(x)\) \(6\) \(-16.5\) \(7.3\) \(10.4\)
Solution.
The function \(g(x) = f(x + 6.2)\) is a horizontal shift of \(f(x)\text{;}\) its graph would be the graph of \(f(x)\) shifted to the left \(6.2\) units. This means that to construct a table for \(g(x)\text{,}\) we should take the table for \(f(x)\) and subtract \(6.2\) from each of the inputs while leaving the outputs unchanged.
\(x\) \(-6.2\) \(-1.2\) \(3.8\) \(8.8\)
\(g(x)\) \(6\) \(-16.5\) \(7.3\) \(10.4\)

Subsection Combining Vertical and Horizontal Shifts

Shifting vertically and shifting horizontally are two illustrations of transformations of functions; they take an original function and transform (or change) it by shifting it in some way. Multiple transformations may be applied to an original function; for instance, both a vertical and a horizontal shift can be applied to an original function: The graph of the function \(y = (x + 2)^2 - 7\) is obtained by shifting the graph of \(f(x) = x^2\) down \(7\) units and left \(2\) units.

Example 7.1.9.

For each of the following, identify the function being transformed and describe the transformations being applied to it.
  1. \(\displaystyle y = (x - 10)^5 + 4\)
  2. \(\displaystyle y = 2^{t + 1} + 3\)
Solution.
  1. The original function is \(f(x) = x^5\text{.}\) Since \(4\) is being added on the end, the vertical shift is up \(4\) units. Since \(10\) is being subtracted from the input variable \(x\text{,}\) the horizontal shift is right \(10\) units.
  2. The original function is \(f(t) = {2}^{t}\text{.}\) Since \(3\) is being added on the end, the vertical shift is up \(3\) units. Since \(1\) is being added to the input variable \(t\text{,}\) the horizontal shift is left \(1\) unit.

Example 7.1.10.

Write the formula for the function obtained when \(\dots\)
  1. the graph of \(f(t) = 10(0.5)^t\) is shifted up \(1\) unit and to the left \(4\) units.
  2. the graph of \(g(x) = \sqrt[3]{x}\) is shifted down \(4\) units and to the right \(3\) units.
Solution.
  1. To shift up \(1\) unit, we add \(1\) to the whole function and to shift to the left \(4\) units we add \(4\) to the input variable \(t\) in the exponent. Hence, the new function will have formula \(y = 10{(0.5)}^{t + 4} + 1\text{.}\)
  2. To shift down \(4\) units, we subtract \(4\) from the whole function and to shift to the right \(3\) units we subtract \(3\) from the input variable \(x\) under the cube root. Hence, the new function will have the formula \(y = \sqrt[3]{x - 3} - 4\text{.}\)

Exercises Exercises

Translating Functions.

For each of the following, give the formula for the function \(g(x)\) satisfying the given condition.

5.

The graph of \(g(x)\) is the graph of \(f(x)\) shifted up \(2.3\) units and shifted right \(6\) units.
Solution.
\(g(x)=f(x-6)+2.3\)

6.

The graph of \(g(x)\) is the graph of \(f(x)\) shifted down \(1.63\) units and right \(0.5\) units.
Solution.
\(g(x)=f(x-0.5)-1.63\)

7.

The graph of \(g(x)\) is the graph of \(f(x)\) shifted up \(12\) units and right \(10\) units.
Solution.
\(g(x)=f(x-10)+12\)

8.

The graph of \(g(x)\) is the graph of \(f(x)\) shifted down \(3.2\) units and left \(7.1\) units.
Solution.
\(g(x)=f(x+7.1)-3.2\)

Identifying Transformations.

For each of the following, identify the function being transformed and describe the transformations being applied to it.

11.

\(h(w)=\sqrt{w-4.1}+5.2\)
Solution.
The graph of \(h(w)\) is the graph of \(y=\sqrt{w}\) shifted right \(4.1\) units and up \(5.2\) units.

12.

\(y=(0.9)^{t+1}-3\)
Solution.
The graph of \(y\) is the graph of \(f(t)=(0.9)^t\) shifted left \(1\) unit and down \(3\) units.

Sketching Graphs.

Use the graph of \(f(x)\) shown below to sketch the graph of each of the following transformations of \(f(x)\text{.}\)

Transformations done Numerically.

Use the table of values of \(f(t)\) shown below to write the table of values for each of the following transformations of \(f(t)\text{.}\)
\(t\) \(0\) \(5\) \(10\) \(15\)
\(f(t)\) \(0.1\) \(0.2\) \(0.4\) \(0.8\)

17.

\(y=f(t+3)\)
Solution.
\(t\) \(-3\) \(2\) \(7\) \(12\)
\(y\) \(0.1\) \(0.2\) \(0.4\) \(0.8\)

18.

\(y=f(t)-2\)
Solution.
\(t\) \(0\) \(5\) \(10\) \(15\)
\(y\) \(-1.9\) \(-1.8\) \(-1.6\) \(-1.2\)

19.

\(y=f(t-2)+6\)
Solution.
\(t\) \(2\) \(7\) \(12\) \(17\)
\(y\) \(6.1\) \(6.2\) \(6.4\) \(6.8\)

20.

\(y=f(t+3.1)+1.1\)
Solution.
\(t\) \(-3.1\) \(1.9\) \(6.9\) \(11.9\)
\(y\) \(1.2\) \(1.3\) \(1.5\) \(1.9\)

21.

The function \(H=f(t)\) gives the temperature (in degrees Fahrenheit) of the water in a spa \(t\) minutes after the spa heater has been turned on.

(a)

Write the formula for a function \(g(t)\) that represents the temperature (in degrees Fahrenheit) of the water in the spa if the spa heater is turned on \(15\) minutes earlier.
Solution.
\(g(t)=f(t+15)\)

(b)

Write a formula for the function \(h(t)\) that represents the temperature (in degrees Fahrenheit) of the water in the spa if the temperature of the water in the spa were \(5\) degrees warmer at the time that the heater was turned on.
Solution.
\(h(t)=f(t)+5\)

22.

The function \(C(t)\) gives the concentration (in nanograms per milliliter) of a certain medication in a patient’s bloodstream \(t\) minutes after a dose of the medication has been administered to a patient, assuming that the patient has \(0\) nanograms per milliliter in their bloodstream at time \(t=0\text{.}\) Write the formula for the function \(g(t)\) that supposes that at time \(t=0\) the patient had \(2.3\) nanograms per milliliter of the medication in their bloodstream.
Solution.
\(g(t)=C(t)+2.3\)
You have attempted of activities on this page.