Lesson Objectives
• Learn how to apply a horizontal shift to a function
• Learn how to apply a vertical shift to a function

## How to Apply a Horizontal or Vertical Shift

At this point, we have learned about two types of function transformations. A nonrigid transformation will cause a distortion or a change in the shape of the original graph. We saw that function dilations, which are also known as stretching/shrinking a graph are a nonrigid transformation. A rigid transformation changes only the position of the graph in the coordinate plane. The basic shape of the graph is unchanged. We have already seen that reflections are a type of rigid transformation. Another type of rigid transformation occurs when we have a horizontal or vertical shift, which is also known as a translation. A translation will not change the basic shape of the graph. It will only change the position of the graph in the coordinate plane.

### Vertical Shifts

When we think about shifting a graph up or down, this is known as a vertical shift or a vertical translation. This is the easier scenario to think about. Let's just start with our squaring function. $$f(x)=x^2$$ $$g(x)=x^2 - 5$$ How can we graph g(x) based on f(x)? We can see that g(x) is f(x) with -5 added to the right side. $$g(x)=f(x) + (-5)$$ For a given x-value, now the y-value in the function g(x) is 5 less when compared to the y-value in the function f(x). This creates a shift down by 5 units.
x f(x) g(x)
-394
-24-1
-11-4
00-5
11-4
24-1
394
We can sketch the graph of g(x) by shifting each point on the graph of f(x) down by 5 units. $$h(x)=x^2 + 3$$ How can we graph h(x) based on f(x)? We can see that h(x) is f(x) with 3 added to the right side. $$h(x)=f(x) + 3$$ For a given x-value, now the y-value in the function h(x) is 3 more when compared to the y-value in the function f(x). This creates a shift up by 3 units.
x f(x) h(x)
-3912
-247
-114
003
114
247
3912
We can sketch the graph of h(x) by shifting each point on the graph of f(x) up by 3 units. $$\text{for}\hspace{.2em}c > 0$$ $$y=f(x) + c$$ Shifts the graph of y = f(x) up by c units. $$y=f(x) - c$$ Shifts the graph of y = f(x) down by c units.
Example #1: Sketch the graph of g(x) and describe the transformation based on f(x). $$f(x)=\sqrt[3]{x}$$ $$g(x)=\sqrt[3]{x}+ 5$$ We can rewrite g(x) based on f(x): $$g(x)=f(x) + 5$$ This tells us that the graph of g(x) will be the graph of f(x) shifted up 5 units. In other words, for a given x-value, the y-value in g(x) will be 5 more than the y-value in f(x).
Desmos Link for More Detail Example #2: Sketch the graph of g(x) and describe the transformation based on f(x). $$f(x)=|x|$$ $$g(x)=|x| - 6$$ We can rewrite g(x) based on f(x): $$g(x)=f(x) - 6$$ This tells us that the graph of g(x) will be the graph of f(x) shifted down 6 units. In other words, for a given x-value, the y-value in g(x) will be 6 less than the y-value in f(x).

### Horizontal Shifts

When we think about shifting a graph left or right, this is known as a horizontal shift or a horizontal translation. This is the more challenging scenario to think about. Let's revisit our squaring function. $$f(x)=x^2$$ $$g(x)=(x - 5)^2$$ How can we graph g(x) based on f(x)? We can see that g(x) is f(x - 5). In other words, we are plugging the quantity (x - 5) in for x in our function f(x). Based on the x - 5, you might expect that we are shifting to the left by 5 units. This is not the correct shift. When we have transformations on the inside of the function, we need to undo what is being done to x. Since we need to add 5 to undo the -5, the shift is actually 5 units to the right.
x - 5 + 5 = x
In other words, when comparing g(x) to f(x), to obtain a given y-value, the x-value must be 5 units larger.
x f(x) x g(x)
-3929
-2434
-1141
0050
1161
2474
3989
We can sketch the graph of g(x) by shifting each point on the graph of f(x) right by 5 units. $$h(x)=(x + 3)^2$$ How can we graph h(x) based on f(x)? We can see that h(x) is f(x + 3). In other words, we are plugging the quantity (x + 3) in for x in our function f(x). Just like we saw earlier, we have to undo what is being done to x. To undo +3, we need to subtract away 3, which creates a shift left by 3 units.
x + 3 - 3 = x
In other words, when comparing h(x) to f(x), to obtain a given y-value, the x-value must be 3 units less.
x f(x) x h(x)
-39-69
-24-54
-11-41
00-30
11-21
24-14
3909
We can sketch the graph of h(x) by shifting each point on the graph of f(x) left by 3 units. Example #3: Sketch the graph of g(x) and describe the transformation based on f(x). $$f(x)=x^3$$ $$g(x)=(x - 2)^3$$ We can rewrite g(x) based on f(x): $$g(x)=f(x - 2)$$ This tells us that the graph of g(x) will be the graph of f(x) shifted right 2 units. In other words, for a given y-value, the x-value in g(x) will be 2 more than the x-value in f(x).
Desmos Link for More Detail Example #4: Sketch the graph of g(x) and describe the transformation based on f(x). $$f(x)=\sqrt{x}$$ $$g(x)=\sqrt{x + 3}- 4$$ We can rewrite g(x) based on f(x): $$g(x)=f(x + 3) - 4$$ This tells us that the graph of g(x) will be the graph of f(x) shifted left 3 units and down 4 units. In other words, for a given point on f(x), (x, y), the point on g(x) will be (x - 3, y - 4).

#### Skills Check:

Example #1

Describe the transformation.

Please choose the best answer. $$f(x)=\frac{1}{x}$$ $$g(x)=\frac{1}{x + 1}- 2$$

A
shifts 1 unit right, shifts 2 units up
B
shifts 1 unit right, shifts 2 units down
C
shifts 1 unit left, shifts 2 units down
D
shifts 2 units right, shifts 1 unit down
E
shifts 2 units left, shifts 1 unit up

Example #2

Describe the transformation. $$f(x)=x^2$$ $$g(x)=(x + 3)^2 - 3$$

A
shifts 3 units left, shifts 3 units up
B
shifts 3 units right, shifts 3 units up
C
shifts 3 units left, shifts 3 units down
D
shifts 6 units right, shifts 3 units up
E
shifts 3 units left, shifts 6 units down

Example #3

Describe the transformation. $$f(x)=\sqrt{x}$$ $$g(x)=\sqrt{x + 3}+ 2$$

A
shifts 3 units right, shifts 2 units up
B
shifts 3 units left, shifts 2 units up
C
shifts 3 units left, shifts 2 units down
D
shifts 2 units right, shifts 3 units up
E
shifts 2 units right, shifts 3 units down