# Manipulating Graphs

#### Scatter Plot

Contents: This page corresponds to § 1.5 (p. 128) of the text.

Suggested Problems from Text

p. 135 #1, 2, 4, 9, 11, 13, 15, 18, 21, 25, 28, 31, 36, 38, 41, 44

## Common Graphs

There are several functions that appear very frequently and you should know the shapes of their graphs. Of course, you could use a graphing utility to draw these graphs; but, that would be like getting out your calculator to multiply 3*4.

 f(x) = c, where c is a constant f(x) = x. f(x) = | x | = abs(x). Use abs(x) for |x| in the Java Tools. f(x) = sqrt(x). f(x) = x2 = x^2. f(x) = x3 = x^3. Throughout this page we will be starting with a function f(x), usually one of the common graphs listed above, then building new functions from f. The idea is that if we know the shape of the graph of f, then we know the shapes of the new graphs.

For the rest of this lesson, c will denote a positive number.

## Shifting

Vertical Shifts:

Let g(x) = f(x) + c. The graph of g is obtained from the graph of f by shifting up c units.

Example 1. f(x) = x2, g(x) = x2 + 3 If we subtract c from f(x), then we shift the graph down.

Let h(x) = f(x) - c. The graph of h is obtained from the graph of f by shifting down c units.

Exercise 1:

(a) Sketch the graphs of f(x) = x2, g(x) = f(x) + 2, and h(x) = f(x) - 5 in the same coordinate plane.

(b) Sketch the graphs of f(x) = abs(x), g(x) = f(x) + 4, and h(x) = f(x) - 3 in the same coordinate plane.

You can use a graphing utility to check your work, but you should be able to sketch these graphs without help. To check your work with the Java Grapher, you type the formula for f in the f box. Then in the g box you may use f(x) instead of retyping the formula for f, then add or subtract the appropriate constant.

Horizontal Shifts:

Let g(x) = f(x - c). Then the graph of g is obtained from the graph of f by shifting right c units.

Example 2.  f(x) = x2, g(x) = f(x - 2) = (x - 2)2 Notice the difference between f(x) - 2, and f(x - 2). If f(x) = x2, then

f(x) - 2 = x2 - 2, while

f(x - 2) = (x - 2)2 = x2 - 4x + 4.

For instance, f(3) - 2 means "evaluate f at 3, then subtract 2," while f(3 - 2) means "subtract 2 from 3, then evaluate f at the result."

Let h(x) = f(x + c). The graph of h is obtained from the graph of f by shifting left c units.

Exercise 2:

Sketch the graphs of f(x) = x3, g(x) = f(x - 4), and h(x) = f(x) - 4 in the same coordinate plane.

Horizontal and Vertical shifts can be used together, as in the following example.

Example 3.

Let f(x) = x2 and g(x) = f(x + 3) - 2 = (x + 3)2 - 2. The graph of g is obtained from the graph of f by shifting 3 units to the left, then shifting 2 units down, as pictured below. Exercise 3:

Sketch the graphs of f(x) = abs(x) and g(x) = f(x + 5) + 3 in the same coordinate plane.

## Reflecting

If g(x) = -f(x), then the graph of g is obtained from the graph of f by reflecting about the x-axis.

Suppose, for example, that f(2) = 3, so the point (2,3) is on the graph of f. Since g(x) = -f(x), then g(2) = -f(2) = -3, and the point (2,-3) is on the graph of g. These two points are reflections of each other about the x-axis. So, if you choose any point on the graph of f, the reflection about the x-axis of that point is on the graph of g, and vice versa. Therefore, the graph of g is the reflection of the graph of f.

If g(x) = f(-x), then the graph of g is obtained from the graph of f by reflecting about the y-axis.

Exercise 4:

Graph the functions f(x) = x2 -2x +2, g(x) = f(-x), and h(x) = -f(x). Answer

Exercise 5:

Look again at the graph of f(x) = x2 -2x +2 from Exercise 4. This graph is the result of shifting the graph of x2. Find the shifts and show that the formula obtained from shifts is equal to the formula for f. Answer

Exercise 6:

Find a function whose graph is Verify your answer by graphing the function you find and comparing with the graph above.

## Stretching

Let g(x) = cf(x). Then the graph of g is obtained from the graph of f by a vertical stretch if c > 1, and a vertical shrink if 0 < c < 1.

Stretching and shrinking change the distance a point is from the x-axis by a factor of c. For example, if g(x) = 2f(x), and f(5) = 3, then (5,3) is on the graph of f. Since g(5) = 2f(5) = 2*3 = 6, (5,6) is on the graph of g. We think of the point (5,3) as being stretched away from the x axis by a factor of 2 to reach the point (5,6). Exercise 7:

The graphs of two functions, f and g, are are shown below. How are these functions related? Videos: Animated Gif, MS Avi File, or Real Video File