In the previous section, we got familiar with the graphs of many important functions. We may use these graphs and simply shift, reflect, or stretch them to sketch the graphs of many more functions. In this section, we will learn how to do that. As we discussed before graphs of functions provide much valuable information about the functions.
In this section, suppose the graph of is known.
Table of Contents
Graph of y = f(x) ± c: Vertical Shift
Consider some function . If the point is on the graph of , it means . If the function is defined such that
then we immediately conclude that the point is on the graph of because
In general, if is on the graph of (meaning ,then we know that the point is on the graph of because
So the graph of is the graph of shifted upward 2 units.
Figure 1: Vertical shift of the graph of . If we add a positive number to the formula of a function, the graph of the function will shift upward units and if we subtract from its formula, its graph will shift downward units.
In general, we can obtain the graph of () by shifting the graph of upward units because for each , the value of the function is units larger than the value of the function . Similarly to get the graph of (), we just need to shift the graph of downward units. This is illustrated in Figure 1.
Graph of y = f(x ∓ c): Horizontal Shift
Consider some function . If the point is on the graph of , it means . If the function is defined such that
then we know that the point is on the graph of because .
In general, if the point is on the graph of , then the point is on the graph of :
So the graph of is the graph of shifted 2 units to the right.
More generally if then
Graphically this means that:
We can obtain the graph of () by shifting the graph of to the right units. Similarly to get the graph of ,we just need to shift the graph of to the left units.
Note that when we subtract a constant from the input of a function, the graph shifts to the right (not to the left), and when we add to the input of a function, its graph shifts to the left! In other words, shifts in the argument (= input) of a function are horizontal shifts to its graph opposite the sign. This is illustrated in Figure 2.
Figure 2: Horizontal shift of the graph of
Example 1
Use the graph of to sketch the graph of each function:
(a)
(b)
(c)
(d)
Solution
In the previous section, we learned how the graph of looks like. (a) We observe that
Therefore to sketch the graph of , we need to shift the graph of downward 1 unit.
Figure 3
(b) We observe that
Therefore to sketch the graph of , we need to shift the graph of to the left 2 units. Note that .
Figure 4
(c) We observe that
Therefore to sketch the graph of , we need to shift the graph of to the right 2 units. Note that .
Figure 5
(d) We observe that
In (c), we obtained the graph of . Thus to get the graph of ,we just need to shift the graph of upward 2 unit.
Figure 6
Graph of y = – f(x): Reflection in the x-axis
Consider some function . Suppose the points and are on the graph of meaning and . If the function is defined such that , we then conclude that and are on the graph of because and .
or generally
Graphically it means:
We can obtain the graph of by reflecting the graph of in the -axis using the -axis as our mirror because for each , the value of is the negative of the value of ,as illustrated in Figure 7.
Figure 7: The graph of is obtained by reflecting the graph of in the -axis.
Graph of y = f(-x): Reflection in the y-axis.
Consider some function . If the points and are on the graph of , it means and .If the function is defined such that , we conclude that and are on the graph of because and .
In general, if
Graphically this means:
We can obtain the graph of by reflecting the graph of in the -axis, as illustrated in Figure 8.
Figure 8: The graph of is obtained by reflecting the graph of in the -axis.
Example 2
Sketch the graph of each function and determine the domain and range:
(a)
(b)
(c)
Solution
(a) We begin with the graph of that we know how it looks like (shown in black in Figure 9).
If the graph of contains the point , then the graph of contains the point . Therefore, the graph of is obtained by reflecting the graph of in the -axis. As we can see in Figure 9,the domain of is all real numbers, and the range is .
Figure 9
(b) We begin with the graph of , as shown in black in Figure 10. If the graph of
contains the point , then the graph of contains the point . Therefore, the graph of is obtained by reflecting the graph of in the -axis. As we can see in Figure 10, the domain of is and its range is the set of all nonnegative numbers or .
Figure 10
(c) Let . In part (b), we learned how the graph of looks like, shown as dashed curve in Figure 11(a).To get the graph of , we need to shift the graph of to the left 2 units (Figure 11(a)).
Let , then the graph of is obtained by reflecting the graph of in the -axis, as shown in Figure 11(b).Now, to get the graph of , we need to shift the graph of upward 1 unit (Figure 11(c)).
As we can see, the domain of is and its range is .
Figure 11(a)Figure 11(b)Figure 11(c)
Graph of y = c f(x): Vertical Scaling
Suppose the function is defined such that
Then
because
So we can obtain the graph of by replacing every point that is on the graph of by the point .That is, the -coordinate of each point on the graph of has been enlarged times if or reduced times if .
To obtain the graph from the graph of
If , vertically stretch the graph of (away from the -axis) by a factor of (Figure 12(a)).
If ,vertically compress the graph of (toward the -axis) by a factor of (Figure 12(b)).
If , first by vertically stretching or compressing to obtain the graph of and then reflect the result in the -axis.
Obviously has no effect.
(a)
(b)
Figure 12: The graph ofis obtained by stretching the graph ofvertically ifand by compressing it vertically if.
Example 3
Use the graph of to obtain the graph of .
Solution
For each , the -coordinate of a point on the graph of is half of the coordinate of the corresponding point on the graph of . That is, to obtain the graph of , we vertically compress the graph of (toward the -axis) by a factor of . The result is shown in the following figure.
Figure 13
Graph of y = f (cx): Horizontal Scaling
Suppose the function is defined such that
Then
because In other words, we can obtain the graph of by replacing every point that is on the graph of by the point . That is, the -coordinate of each point on the graph of has been reduced times if or enlarged times if .
Graphically this means:
To obtain the graph of :
If , horizontally compress the graph of (toward the -axis) by a factor of (Figure 14(a)).
If , horizontally stretch the graph of (away from the -axis) by a factor of (Figure 14(b)).
If , first horizontally compress or stretch by a factor of and reflect the result in the -axis.
(a)
(b)
Figure 14: The graph ofis obtained by horizontally compressing the graph oftoward the -axis ifand by stretching it if .
Example 4
Use the graph of to obtain the graph of each function:
(a)
(b)
Solution
(a) The graph of is obtained by horizontally compressing the graph of (toward the -axis) by a factor of . The result is shown in Figure 15(a).
Note that because , we could obtain the same result by vertically stretching the graph of by a factor as illustrated in Figure 15(b).
Figure 15 (a): Graph of is obtained from the graph of by horizontally compressing by a factor of Figure 15 (b): Graph of is obtained from the graph of by vertically compressing by a factor of
(b) Let . In part (a), we obtained the graph of , so to get the graph of , we just need to reflect the graph of in the -axis (see the following figure). For this specific example, because ,we can obtain the graph of by reflecting the graph of in the -axis as well.
Figure 16 : Graph of can be obtained by reflecting the graph of in the -axis or in the -axis.
Example 5
The graph of is shown in Figure 17. (a) Find the function whose graph is obtained by stretching the graph of horizontally by a factor of followed by a reflection
in the -axis.
(b) Find the function whose graph is obtained by compressing the graph of vertically by a factor of followed by a reflection in the -axis.
Figure 17 : Graph of
Solution
(a) Dividing by gives the horizontal stretch, and multiplying the value of the resulting function by gives the reflection in the -axis. Therefore, the new function is
See Figure 18 (a).
Figure 18 : Graph of
(b) Multiplying by gives the vertical compression and multiplying by gives the reflection in the -axis:
See Figure 19 .
Figure 19 : Graph of
Combining Transformations
Now we consider the general case:
Suppose we have the graph of and we wish to obtain the graph of
It is important to apply these transformations to the graph of in the following order:
1. Horizontal scaling by a factor of (If , it will be followed by a reflection in the -axis)
2.Horizontal shift by units
3. Vertical scaling by a factor of (followed by a reflection in the -axis if )
4. Vertical shift by units
Why such a sequence of transformations?
We first rewrite it as
Consider the function defined as
The graph of is obtained by horizontally scaling by a factor of (followed by a reflection in the axis if ).
Now consider the function defined as
So the graph of is the graph of horizontally shifted by units. Finally consider the function defined as
The graph of is what we are looking for and is obtained by a vertical scaling by a factor of (followed by a reflection in the -axis if ) and then a vertical shift by units.
Example 6
Use the graph of to obtain the graph of and determine its domain and range.
Solution
Rewrite as Step 1: Start with the graph of . Step 2: (Horizontally compress by a factor of toward the -axis or stretch vertically by a factor of )
Step 3: (Horizontally shift the graph of to the left 2 units)
Step 4: (Reflect in the -axis)
Step 5: (Vertically shift up 2 units)
Graph of y = |f(x)|: Reflection of the Negative Part
Taking the absolute value of changes all negative outputs of into their opposites and leaves nonnegative outputs unchanged.
Graphically, this means:
We can obtain the graph of by reflecting every point on the graph of that is below the -axis up to the above -axis,as illustrated in Figure 20.
Figure 20 : The graph of is obtained by reflection of every point on the graph of that is below the -axis to above.
Graph of y = f(|x|): Duplication and Reflection of the Right Part
Suppose the function is defined such that
If, for example, is on the graph of , then and are on the graph of because .
In general, if is on the graph of and then . Also Therefore:
Graphically it means:
We can obtain the graph of by removing the graph of for (deleting the points that are on the left of the -axis) and reflecting the graph of for in the -axis while keeping this part of the graph of as well, as illustrated in Figure 21.
Figure 21 : The graph of is obtained by reflecting every point on the graph of that is on the right of the -axis in the -axis.
Note that if , then is an even function because for all in the domain of we have
So the graph of has to be symmetric about the -axis.
Graphs of two functions and are shown in Figure 22(a,b). Because the parts of these two graphs that are left of the-axis coincide, the graphs of and are the same (Figure 22(c)).
(a) Graph of
(b) Graph of
(c) Graph of or
Figure 22
Example 7
Sketch the graph of each function:
(a)
(b)
Solution
(a) We use the following steps to get the graph of Step 1: Start with the graph of that we know what it looks like. Step 2: (Horizontally shift to the right 1 unit) Step 3: (Vertically shift down 2 units. See Figure 23(a)) Step 4: }(Ignore the part that is left of the -axis, keep the right part and reflect it in the -axis. See Figure 23 (b)
Figure 23(a)Figure 23(b)
(b) Because in (a) we obtained the graph of , to get the graph of , we just need to reflect any portion of the graph of that is below the -axis up to above the -axis, using the -axis as our mirror while leaving the rest of the graph of unchanged. The result is shown in the following figure.