Lesson Objectives

- Demonstrate an understanding of how to graph a linear and quadratic function
- Learn how to sketch the graph of an elementary function
- Learn how to find horizontal and vertical shifts for an elementary function

## Applying Horizontal and Vertical Shifts to Elementary Functions

Up to this point, we have only worked with graphs of lines and parabolas. As we move into college-level algebra and higher-level mathematics, more complex graphs will be discussed. In general, we have a group of functions known as "elementary functions" or "basic functions", which come up often. In this lesson, we want to show how to apply a horizontal and or vertical shift to these functions. Essentially, a vertical shift occurs when the action happens outside of the function:

f(x) + k » vertical shift up k units (if k > 0)

f(x) - k » vertical shift down k units (if k > 0)

A horizontal shift occurs when the action happens inside of the function:

f(x + h) » horizontal shift left by h units (if h > 0)

f(x - h) » horizontal shift right by h units (if h > 0)

In most textbooks, the horizontal shift formula is given with a minus sign between the two terms. In other words, we can re-write our formula above as:

f(x - h) » horizontal shift left by |h| units (if h < 0)

Recall minus a negative is plus a positive:

(x - (-3)) = x + 3

f(x - h) » horizontal shift right by h units (if h > 0)

Let's begin by looking at the absolute value function.

f(x) = |x|

domain: (-∞, ∞)

range: [0, ∞)

Because of the absolute value operation, our graph is a V shape. Recall that opposites have the same absolute value. This means each y-value other than 0 will be associated with two different x-values. Let's look at a table of ordered pairs:

Notice how the x-values of 4 and -4 both produce a y-value of 4. Similarly, we see the same for the x-values of 2 and -2. They each produce a y-value of 2. Let's plot our ordered pairs and sketch the graph: When we learned how to graph parabolas, we learned about vertical and horizontal shifts. These shifts can be applied to any elementary function. The key is to understand what causes each type of shift. Let's continue to think about our absolute value function.

f(x) = |x|

What happens to the graph if we add something to the end?

f(x) = |x| + 4

This creates a vertical shift. The same x-value will now produce a y-value that is 4 units larger. This will move or shift the graph up by 4 units. Let's look at the graph of both f(x) = |x| and f(x) = |x| + 4 on the same coordinate plane. We will see the graph shifted up by 4 units. We know we have a vertical shift when the action happens "outside of the function". In general, for a vertical shift, we will see:

f(x) = |x| + k

is the graph of f(x) = |x|

shifted up k units if k > 0

shifted down k units if k < 0

Let's look at an example.

Example 1: Find the shift based on f(x) = |x|.

f(x) = |x| - 14

Based on the rules above, we can say this function is shifted 14 units down since the -14 happens outside of the function.

Additionally, we have horizontal shifts. These will happen "inside of the function". Horizontal shifts are a bit counterintuitive. What would happen to our graph if we add something inside of the absolute value operation?

f(x) = |x + 1|

One might think this produces a shift to the right by one unit, but it actually does the opposite. It will create a shift of 1 unit to the left. Why is this the case? Well if we think about it the same y-value is now produced from an x-value that is one unit less. This creates our shift of 1 unit left. Let's look at the graph of both f(x) = |x| and f(x) = |x + 1| on the same coordinate plane. We will see the graph shifted left by 1 unit. We know we have a horizontal shift when the action happens "inside of the function". In general, for a horizontal shift, we will see:

f(x) = |x - h|

is the graph of f(x) = |x|

shifted h units right if h > 0

shifted h units left if h < 0

Let's look at an example.

Example 2: Find the shift based on f(x) = |x|.

f(x) = |x - 12|

Based on the rules above, we can say this function is shifted 12 units to the right since the -12 happens inside of the function.

Of course, we can have both a vertical and a horizontal shift. We just look at what's happening inside of the function and outside of the function to determine the impact of each shift. Let's look at an example.

Example 3: Find the shift based on f(x) = |x|.

f(x) = |x - 9| + 13

Based on the rules above, we can say this function is shifted 9 units to the right and 13 units up. This is because we are subtracting 9 away inside of the function and adding 13 outside of the function.

domain: [0, ∞)

range: [0, ∞)

Let's gather a few ordered pairs and sketch the graph:

Let's sketch the graph of our function. This function follows the same process for horizontal and vertical shifts that were demonstrated with the absolute value function.

For a vertical shift: $$f(x)=\sqrt{x}+ k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=\sqrt{x - h}$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 4: Find the shift based on: $$f(x)=\sqrt{x}$$ $$f(x)=\sqrt{x - 1}+ 1$$ Based on the rules above, we can say the graph shifts one unit right and one unit up. This is because we are subtracting away 1 inside of the function and adding 1 outside of the function.

domain: (-∞, 0) ∪ (0, ∞)

range: (-∞, 0) ∪ (0, ∞)

Let's gather a few ordered pairs and sketch the graph:

Let's sketch the graph of our function. This function follows the same process for horizontal and vertical shifts that were demonstrated with the absolute value function.

For a vertical shift: $$f(x)=\frac{1}{x}+ k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=\frac{1}{x - h}$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 5: Find the shift based on: $$f(x)=\frac{1}{x}$$ $$f(x)=\frac{1}{x - 13}- 8$$ Based on the rules above, we can say the graph shifts 13 units right and 8 units down. This is because we are subtracting away 13 units inside of the function and subtracting 8 units away outside of the function.

range: {...,-2,-1,0,1,2,...}

The domain consists of all real numbers. We can plug anything we would like in for x. The range is the set of integers since this is the only output that is possible. To make a table of values is a bit different. Now a range of x-values produces the same y-value.

Let's sketch the graph of our function. Because the graph looks like a series of steps, this type of function is also called a "step function".

This function follows the same process for horizontal and vertical shifts that were demonstrated with the absolute value function.

For a vertical shift: $$f(x)=[\![x]\!] + k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=[\![x - h]\!]$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 6: Find the shift based on f(x) = [[x]]. $$f(x)=[\![x + 5]\!] + 17$$ Based on the rules above, we can say the graph shifts 5 units left and 17 units up. This is because we are adding 5 units inside of the function and adding 17 units outside of the function.

f(x) + k » vertical shift up k units (if k > 0)

f(x) - k » vertical shift down k units (if k > 0)

A horizontal shift occurs when the action happens inside of the function:

f(x + h) » horizontal shift left by h units (if h > 0)

f(x - h) » horizontal shift right by h units (if h > 0)

In most textbooks, the horizontal shift formula is given with a minus sign between the two terms. In other words, we can re-write our formula above as:

f(x - h) » horizontal shift left by |h| units (if h < 0)

Recall minus a negative is plus a positive:

(x - (-3)) = x + 3

f(x - h) » horizontal shift right by h units (if h > 0)

Let's begin by looking at the absolute value function.

### Absolute Value Function

The absolute value function:f(x) = |x|

domain: (-∞, ∞)

range: [0, ∞)

Because of the absolute value operation, our graph is a V shape. Recall that opposites have the same absolute value. This means each y-value other than 0 will be associated with two different x-values. Let's look at a table of ordered pairs:

x | y | (x, y) |
---|---|---|

-4 | 4 | (-4, 4) |

-2 | 2 | (-2, 2) |

0 | 0 | (0, 0) |

2 | 2 | (2, 2) |

4 | 4 | (4, 4) |

f(x) = |x|

What happens to the graph if we add something to the end?

f(x) = |x| + 4

This creates a vertical shift. The same x-value will now produce a y-value that is 4 units larger. This will move or shift the graph up by 4 units. Let's look at the graph of both f(x) = |x| and f(x) = |x| + 4 on the same coordinate plane. We will see the graph shifted up by 4 units. We know we have a vertical shift when the action happens "outside of the function". In general, for a vertical shift, we will see:

f(x) = |x| + k

is the graph of f(x) = |x|

shifted up k units if k > 0

shifted down k units if k < 0

Let's look at an example.

Example 1: Find the shift based on f(x) = |x|.

f(x) = |x| - 14

Based on the rules above, we can say this function is shifted 14 units down since the -14 happens outside of the function.

Additionally, we have horizontal shifts. These will happen "inside of the function". Horizontal shifts are a bit counterintuitive. What would happen to our graph if we add something inside of the absolute value operation?

f(x) = |x + 1|

One might think this produces a shift to the right by one unit, but it actually does the opposite. It will create a shift of 1 unit to the left. Why is this the case? Well if we think about it the same y-value is now produced from an x-value that is one unit less. This creates our shift of 1 unit left. Let's look at the graph of both f(x) = |x| and f(x) = |x + 1| on the same coordinate plane. We will see the graph shifted left by 1 unit. We know we have a horizontal shift when the action happens "inside of the function". In general, for a horizontal shift, we will see:

f(x) = |x - h|

is the graph of f(x) = |x|

shifted h units right if h > 0

shifted h units left if h < 0

Let's look at an example.

Example 2: Find the shift based on f(x) = |x|.

f(x) = |x - 12|

Based on the rules above, we can say this function is shifted 12 units to the right since the -12 happens inside of the function.

Of course, we can have both a vertical and a horizontal shift. We just look at what's happening inside of the function and outside of the function to determine the impact of each shift. Let's look at an example.

Example 3: Find the shift based on f(x) = |x|.

f(x) = |x - 9| + 13

Based on the rules above, we can say this function is shifted 9 units to the right and 13 units up. This is because we are subtracting 9 away inside of the function and adding 13 outside of the function.

### Square Root Function

The square root function: $$f(x)=\sqrt{x}$$ For the square root function, x must be non-negative. Taking the square root of a negative number will not yield a real solution.domain: [0, ∞)

range: [0, ∞)

Let's gather a few ordered pairs and sketch the graph:

x | y | (x, y) |
---|---|---|

0 | 0 | (0, 0) |

1 | 1 | (1, 1) |

4 | 2 | (4, 2) |

9 | 3 | (9, 3) |

For a vertical shift: $$f(x)=\sqrt{x}+ k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=\sqrt{x - h}$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 4: Find the shift based on: $$f(x)=\sqrt{x}$$ $$f(x)=\sqrt{x - 1}+ 1$$ Based on the rules above, we can say the graph shifts one unit right and one unit up. This is because we are subtracting away 1 inside of the function and adding 1 outside of the function.

### Reciprocal Function

The reciprocal function: $$f(x)=\frac{1}{x}$$ For the reciprocal function, x cannot be 0 since division by 0 is not defined. This also means that y can't be 0 as well.domain: (-∞, 0) ∪ (0, ∞)

range: (-∞, 0) ∪ (0, ∞)

Let's gather a few ordered pairs and sketch the graph:

x | y | (x, y) |
---|---|---|

-1/4 | -4 | (-1/4, -4) |

-1/2 | -2 | (-1/2, -2) |

-1 | -1 | (-1, -1) |

-2 | -1/2 | (-2, -1/2) |

-4 | -1/4 | (-4, -1/4) |

1/4 | 4 | (1/4, 4) |

1/2 | 2 | (1/2, 2) |

1 | 1 | (1, 1) |

2 | 1/2 | (2, 1/2) |

4 | 1/4 | (4, 1/4) |

For a vertical shift: $$f(x)=\frac{1}{x}+ k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=\frac{1}{x - h}$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 5: Find the shift based on: $$f(x)=\frac{1}{x}$$ $$f(x)=\frac{1}{x - 13}- 8$$ Based on the rules above, we can say the graph shifts 13 units right and 8 units down. This is because we are subtracting away 13 units inside of the function and subtracting 8 units away outside of the function.

### Greatest Integer Function

The greatest integer function, which is also known as the floor function: $$f(x)=[\![x]\!]$$ The greatest integer function pairs every real number x with the greatest integer that is less than or equal to x. In other words, if x is an integer, the y-value produced is just the x-value given. When x is not an integer, it will produce a y-value that is the next integer moving left on the number line. $$[\![9]\!]=9$$ $$[\![9.75]\!]=9$$ $$[\![9.9998]\!]=9$$ domain: (-∞, ∞)range: {...,-2,-1,0,1,2,...}

The domain consists of all real numbers. We can plug anything we would like in for x. The range is the set of integers since this is the only output that is possible. To make a table of values is a bit different. Now a range of x-values produces the same y-value.

x | y |
---|---|

-3 ≤ x < -2 | -3 |

-2 ≤ x < -1 | -2 |

-1 ≤ x < 0 | -1 |

0 ≤ x < 1 | 0 |

1 ≤ x < 2 | 1 |

2 ≤ x < 3 | 2 |

3 ≤ x < 4 | 3 |

This function follows the same process for horizontal and vertical shifts that were demonstrated with the absolute value function.

For a vertical shift: $$f(x)=[\![x]\!] + k$$ shifts up by k units when k > 0

shifts down by k units when k < 0

For a horizontal shift: $$f(x)=[\![x - h]\!]$$ shifts right by h units when h > 0

shifts left by h units when h < 0

Let's look at an example.

Example 6: Find the shift based on f(x) = [[x]]. $$f(x)=[\![x + 5]\!] + 17$$ Based on the rules above, we can say the graph shifts 5 units left and 17 units up. This is because we are adding 5 units inside of the function and adding 17 units outside of the function.

#### Skills Check:

Example #1

Find the shift based on: $$f(x)=|x|$$ $$f(x)=|x + 9| - 3$$

Please choose the best answer.

A

9 units right, 3 units down

B

9 units right, 3 units up

C

12 units right, 12 units down

D

9 units left, 3 units down

E

9 units left, 3 units up

Example #2

Find the shift based on: $$f(x)=\sqrt[3]{x}$$ $$f(x)=\sqrt[3]{x - 5}+ 1$$

Please choose the best answer.

A

5 units right, 1 unit down

B

5 units right, 1 unit up

C

1 unit right, 5 units down

D

1 unit left, 5 units up

E

4 units left, 4 units down

Example #3

Find the shift based on: $$f(x)=\frac{1}{x}$$ $$f(x)=\frac{1}{x - 3}+ 4$$

Please choose the best answer.

A

3 units left, 4 units down

B

3 units right, 4 units up

C

4 units left, 3 units up

D

1 unit right, 1 unit up

E

4 units right, 3 units up

Congrats, Your Score is 100%

Better Luck Next Time, Your Score is %

Try again?

Ready for more?

Watch the Step by Step Video Lesson Take the Practice Test