Graphing Functions Using Vertical and Horizontal Shifts

Combining Vertical and Horizontal Shifts

Now that we have two transformations, we can combine them. Vertical shifts are outside changes that affect the output (y-) values and shift the function up or down. Horizontal shifts are inside changes that affect the input ( x-) values and shift the function left or right. Combining the two types of shifts will cause the graph of a function to shift up or down and left or right.

HOW TO

Given a function and both a vertical and a horizontal shift, sketch the graph.

1. Identify the vertical and horizontal shifts from the formula.

2. The vertical shift results from a constant added to the output. Move the graph up for a positive constant and down for a negative constant.

3. The horizontal shift results from a constant added to the input. Move the graph left for a positive constant and right for a negative constant.

4. Apply the shifts to the graph in either order.

Example 7

Graphing Combined Vertical and Horizontal Shifts

Given f(x)=|x|, sketch a graph of h(x)=f(x+1)-3.

Solution

The function f is our toolkit absolute value function. We know that this graph has a V shape, with the point at the origin. The graph of h has transformed f in two ways: f(x+1) is a change on the inside of the function, giving a horizontal shift left by 1, and the subtraction by 3 in f(x+1)-3 is a change to the outside of the function, giving a vertical shift down by 3 . The transformation of the graph is illustrated in Figure 9.

Let us follow one point of the graph of f(x)=|x|.

  • The point (0,0) is transformed first by shifting left 1 unit: (0,0) \rightarrow(-1,0)
  • The point (-1,0) is transformed next by shifting down 3 units: (-1,0) \rightarrow(-1,-3)

Graph of an absolute function, y=|x|, and how it was transformed to y=|x+1|-3.

Figure 9

Figure 10 shows the graph of h.

The final function y=|x+1|-3.

Figure 10

Try It #3

Given f(x)=|x|, sketch a graph of h(x)=f(x-2)+4.

Example 8

Identifying Combined Vertical and Horizontal Shifts

Write a formula for the graph shown in Figure 11, which is a transformation of the toolkit square root function.

Graph of a square root function transposed right one unit and up 2.

Figure 11

Solution

The graph of the toolkit function starts at the origin, so this graph has been shifted 1 to the right and up 2. In function notation, we could write that as

h(x)=f(x-1)+2

Using the formula for the square root function, we can write

h(x)=\sqrt{x-1}+2

Analysis

Note that this transformation has changed the domain and range of the function. This new graph has domain [1, \infty) and range [2, \infty).

Try It #4

Write a formula for a transformation of the toolkit reciprocal function f(x)=\frac{1}{x} that shifts the function's graph one unit to the right and one unit up.