Learning Objectives
For the logarithmic function f(x)=logbxf(x)=logbx,
- Perform vertical and horizontal shifts
- Perform vertical compressions and stretches
- Perform reflections across the xx-axis
- Perform reflections across the yy-axis
- Determine the transformations of the logarithmic function f(x)=alogb(x−h)+kf(x)=alogb(x−h)+k
- Determine the equation of a function given the transformations
- Determine what happens to the vertical asymptote as transformations are made
Vertical Shifts
If we shift the graph of the logarithmic function f(x)=log2xf(x)=log2x up 5 units, all of the points on the graph increase their yy-coordinates by 5, but their x-coordinates remain the same. Therefore, the equation of the function f(x)=log2x after it has been shifted up 5 units transforms to f(x)=log2x+5. The vertical asymptote at x=0 remains the same. Table 1 shows the changes to specific values of this function, which are replicated on the graph in figure 1.
x | log2x | log2x+5 |
Figure 1. Shifting the graph of f(x)=log2x up 5 units. |
---|---|---|---|
18 | −3 | 2 | |
14 | −2 | 3 | |
12 | −1 | 4 | |
1 | 0 | 5 | |
2 | 1 | 6 | |
4 | 2 | 7 | |
8 | 3 | 8 | |
Table 1. f(x)=log2x is transformed to f(x)=log2x+5. |
If we shift the graph of the function f(x)=log2x down 6 units, all of the points on the graph decrease their y-coordinates by 6, but their x-coordinates remain the same. Therefore, the equation of the function f(x)=log2x after it has been shifted down 6 units transforms to f(x)=log2x−6.The vertical asymptote at x=0 remains the same. Table 2 shows the changes to specific values of this function, which are replicated on the graph in figure 2.
x | log2x | log2x−6 |
Figure 2. Shifting the graph of f(x)=log2x down 6 units. |
---|---|---|---|
18 | −3 | −9 | |
14 | −2 | −8 | |
12 | −1 | −7 | |
1 | 0 | −6 | |
2 | 1 | −5 | |
4 | 2 | −4 | |
8 | 3 | −3 | |
Table 2. f(x)=log2x is transformed to f(x)=log2x−6. |
Notice that vertical shifts up or down do not change the vertical asymptote.
Move the red dots in manipulation 1 to change the values of b and k. Pay attention to what happens to the graph and the relationship between the value of k and the transformed function.
Manipulation 1. Vertical shifts
Vertical shifts
We can represent a vertical shift of the graph of f(x)=log2x by adding or subtracting a constant, k, to the function:
f(x)=log2x+k
If k>0, the graph shifts upwards and if k<0 the graph shifts downwards.
Example 1
- If f(x)=log3x is shifted vertically up by 7 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted vertically down by 4 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5x+9?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2x−3?
Solution
With vertical shifts, the parent function f(x)=logbx is transformed to f(x)=logbx+k.
- k=7 so the transformed function is f(x)=log3x+7
- k=−4 so the transformed function is f(x)=log7x−4
- k=9 so the transformation was a vertical shift up by 9 units.
- k=−3 so the transformation was a vertical shift down by 3 units.
Try It 1
- If f(x)=log3x is shifted vertically up by 2 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted vertically down by 9 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5x+3?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2x−8?
Horizontal Shifts
If we shift the graph of the function f(x)=log2x right 8 units, all of the points on the graph increase their x-coordinates by 8, but their y-coordinates remain the same. The x-intercept (1, 0) in the original graph is moved to (9, 0) (figure 3). The vertical asymptote at x=0 shifts right by 8 units to x=8. Any point (x,y) on the original graph is moved to (x+8,y).
But what happens to the original function f(x)=log2x? An automatic assumption may be that since x moves to x+8 that the function will become f(x)=log2(x+8). But that is NOT the case. Remember that the x-intercept is moved to (9, 0) and if we substitute x=9 into the function f(x)=log2(x+8) we get f(9)=log2(9+8)=4.0875≠1!! The way to get a function value of 0 is for the transformed function to be f(x)=log2(x−8). Then f(9)=log2(9−8)=0. So the function f(x)=log2x transforms to f(x)=log2(x−8) after being shifted 8 units to the right. The reason is that when we move the function 8 units to the right, the x-value increases by 8 and to keep the corresponding y-coordinate the same in the transformed function, the x-coordinate of the transformed function needs to subtract 8 to get back to the original x that is associated with the original y-value. Table 3 shows the changes to specific values of this function, and the graph is shown in figure 3.
x | x−8 | log2(x−8) |
Figure 3. Shifting the graph right 8 units. |
---|---|---|---|
658 | 18 | −3 | |
334 | 14 | −2 | |
172 | 12 | −1 | |
9 | 1 | 0 | |
10 | 2 | 1 | |
12 | 4 | 2 | |
16 | 8 | 3 | |
Table 3. Shifting the graph right by 8 units transforms f(x)=log2x into f(x)=log2(x−8). |
Notice that the vertical asymptote also shifts from x=0 to x=8.
On the other hand, if we shift the graph of the function f(x)=log2x left by 11 units, all of the points on the graph decrease their x-coordinates by 11, but their y-coordinates remain the same. So any point (x,y) on the original graph moves to (x−11,y). Consequently, to keep the same y-values we need to increase the x-value by 11 in the transformed function. The equation of the function after being shifted left 11 units is f(x)=log2(x+11). Table 4 shows the changes to specific values of this function, and the graph is shown in figure 4.
x | x+11 | f(x)=log2(x+11) |
Figure 4. Shifting the graph left 11 units. |
---|---|---|---|
−878 | 18 | –3 | |
−434 | 14 | –2 | |
−212 | 12 | –1 | |
–10 | 1 | 0 | |
–9 | 2 | 1 | |
–7 | 4 | 2 | |
–3 | 8 | 3 | |
Table 4. Shifting the graph left by 11 units transforms f(x)=log2x into f(x)=log2(x+11). |
Notice that the vertical asymptote also shifts from x=0 to x=−11.
Move the red dots in manipulation 2 to change the values of b and h. Pay attention to what happens to the graph and the relationship between the value of h and the transformed function.
Manipulation 2. Horizontal shifts
horizontal shifts
We can represent a horizontal shift of the graph of f(x)=log2x by adding or subtracting a constant, h, to the variable x.
f(x)=log2(x−h)
If h>0 the graph shifts toward the right and if h<0 the graph shifts to the left. The vertical asymptote x=0 shifts to x=h.
Example 2
- If f(x)=log3x is shifted right by 2 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted left by 9 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(x+3)?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2(x−8)?
Solution
With horizontal shifts, the parent function f(x)=logbx is transformed to f(x)=logb(x−h).
- h=2 so the transformed function is f(x)=log3(x−2)
- h=−9 so the transformed function is f(x)=log7(x+9)
- h=−3 so the transformation was a horizontal shift left by 3 units.
- h=8 so the transformation was a horizontal shift right by 8 units
Try It 2
- If f(x)=log3x is shifted right by 7 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted left by 4 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(x−5)?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2(x+4)?
We can combine vertical and horizontal shifts by transforming f(x)=logb(x−h)+k.
Move the red dots in manipulation 3 to change the values of b,h and k. Pay attention to what happens to the graph and the relationship between the values of h andh and the transformed function.
Manipulation 3. Vertical and horizontal shifts
Example 3
- If f(x)=log3x is shifted vertically down by 3 units and right by 2 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted left by 9 units and up by 6 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(x−2)+7?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2(x+5)−4?
Solution
With horizontal and vertical shifts, the parent function f(x)=logbx is transformed to f(x)=logb(x−h)+k.
- h=2,k=−3 so the transformed function is f(x)=log3(x−2)−3
- h=−9,k=6 so the transformed function is f(x)=log7(x+9)+6
- h=2,k=7 so the transformation was a horizontal shift right by 2 units and up by 7 units.
- h=−5,k=−4 so the transformation was a horizontal shift left by 5 units and down by 4 units.
Try It 3
- If f(x)=log3x is shifted down by 7 units and right by 5 units, what is the equation of the transformed function?
- If f(x)=log7x is shifted left by 4 units and up by 3 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(x−2)−1?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=log2(x+4)+7?
Vertical Stretching and Compressing
If we vertically stretch the graph of the function f(x)=log2x by a factor of 2, all of they-coordinates of the points on the graph are multiplied by 2, but their x-coordinates remain the same. The equation of the function after the graph is stretched up by a factor of 2 is f(x)=2log2x. The reason for multiplying log2x by 2 is that each y-coordinate is doubled, and since y=log2x, log2x is doubled. Table 5 shows this change and the graph is shown in figure 5.
x | log2x | f(x)=2log2x |
Figure 5. Stretching the graph vertically. |
---|---|---|---|
18 | -3 | -6 | |
14 | -2 | -4 | |
12 | -1 | -2 | |
1 | 0 | 0 | |
2 | 1 | 2 | |
4 | 2 | 4 | |
8 | 3 | 6 | |
Table 5. Stretching the graph vertically by a factor of 2 transforms f(x)=log2x into f(x)=2log2x. |
On the other hand, if we vertically compress the graph of the function f(x)=log2x to half of its original height, we multiply the function by the factor 12. All of the y-coordinates of the points on the graph are halved, but their x-coordinates remain the same. This means the y-coordinates are divided by 2, or multiplied by 12. The equation of the function after being compressed is f(x)=12×log2x. The reason for multiplying log2x by 12 is that each y-coordinate becomes half of the original value when it is divided by 2. Table 6 shows this change and the graph is shown in figure 6.
x | log2x | f(x)=12log2x |
Figure 6. Compressing the graph vertically. |
---|---|---|---|
18 | -3 | −32 | |
14 | -2 | -1 | |
12 | -1 | −12 | |
1 | 0 | 0 | |
2 | 1 | 12 | |
4 | 2 | 1 | |
8 | 3 | 32 | |
Table 6. Compressing the graph vertically by a factor of 12 transforms f(x)=log2x into f(x)=12log2x. |
Notice that vertical stretching and compressing do not change the vertical asymptote.
Move the red dots in manipulation 4 to change the values of b and a. Pay attention to what happens to the graph and the relationship between the value of a and the transformed function.
Manipulation 4. Vertical stretching and compressing
vertical stretching and compressing
A stretch or compression of the graph of f(x)=log2x can be represented by multiplying the function by a constant, a>0.
f(x)=alog2x
The magnitude of a indicates the stretch/compression of the graph. If a>1, the graph is stretched up by a factor of a. If [latex]0
Example 4
- If f(x)=log3x is stretched by a factor of 7, what is the equation of the transformed function?
- If f(x)=log7x is compressed to one-third its height, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=16log5x?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=5log2x?
Solution
With stretching and compression, the parent function f(x)=logbx is transformed to f(x)=alogbx.
- a=7 so the transformed function is f(x)=7log3x
- a=13 so the transformed function is f(x)=13log7x
- a=16 so the transformation was a compression to one-sixth its height
- a=5 so the transformation was a vertical stretch by a factor of 5
Try It 4
- If f(x)=log3x is stretched by a factor of 2, what is the equation of the transformed function?
- If f(x)=log7x is compressed to one-eighth its height, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=14log5x?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=7log2x?
Now we can combine vertical stretches and compressions with horizontal and vertical shifts.
Example 5
- If f(x)=log3x is stretched by a factor of 7, and moved down by 5 units what is the equation of the transformed function?
- If f(x)=log7x is compressed to one-third its height, moved left by 4 units and moved up by 2 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=15log5(x−9)−6?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=3log2(x+5)+7?
Solution
With stretching and compression, combined with shifting the parent function f(x)=logbx is transformed to f(x)=alogb(x−h)+k.
- a=7,k=−5 so the transformed function is f(x)=7log3x−5
- a=13,h=−4,k=2 so the transformed function is f(x)=13log7(x+4)+2
- a=15,h=9,k=−6 so the transformation was a compression to one-fifth its height, a shift right by 9 units, and a shift down by 6 units
- a=3,−5,k=7 so the transformation was a vertical stretch by a factor of 3, a shift left by 5 units, and a shift up by 7 units
Try It 5
- If f(x)=log3x is stretched by a factor of 5, and moved down by 2 units what is the equation of the transformed function?
- If f(x)=log7x is compressed to one-half its height, moved left by 7 units and moved up by 3 units, what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=13log5(x−2)−3?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=9log2(x+1)+5?
Reflections
Across the x-axis
When the graph of the function f(x)=log2x is reflected across the x-axis, the y-coordinates of all of the points on the graph change their signs, from positive to negative values or from negative to positive values, while the x-coordinates remain the same. The equation of the function after f(x)=log2x is reflected across the x-axis is f(x)=−log2x. The graph changes from increasing upwards to decreasing downwards. Table 7 shows the effect of such a reflection on the functions values and the graph is shown in figure 7.
x | log2x | −log2x |
Figure 7. Reflecting the graph of f(x)=log2x across the x-axis. |
---|---|---|---|
18 | -3 | 3 | |
14 | -2 | 2 | |
12 | -1 | 1 | |
1 | 0 | 0 | |
2 | 1 | -1 | |
4 | 2 | -2 | |
8 | 3 | -3 | |
Table 7. Reflecting the graph of f(x)=log2x across the x-axis transforms f(x)=log2x into f(x)=−log2x. |
Notice that reflecting across the x-axis does not change the vertical asymptote.
Across the y-axis
When the graph of the function f(x)=log2x is reflected across the y-axis, the x-coordinates of all of the points on the graph change their signs, from positive to negative values, while the y-coordinates remain the same. The equation of the function after f(x)=log2x is reflected across the y-axis is f(x)=log2(−x). The graph changes from increasing from the left to decreasing from the left. Table 8 shows the effect of such a reflection on the functions values and the graph is shown in figure 8.
x | −x | log2(−x) |
Figure 8. Reflecting the graph of f(x)=log2x across the y-axis. |
---|---|---|---|
−18 | 18 | –3 | |
−14 | 14 | –2 | |
−12 | 12 | –1 | |
–1 | 1 | 0 | |
–2 | 2 | 1 | |
–4 | 4 | 2 | |
–8 | 8 | 3 | |
Table 8. Reflecting the graph of f(x)=log2x across the y-axis transforms f(x)=log2x into f(x)=log2(−x) |
Example 6
- If f(x)=log3x is reflected across the x-axis what is the equation of the transformed function?
- If f(x)=log7x is reflected across the y-axis what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=−log5x−6?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=−3log2−x?
Solution
- The y-values change sign so the transformed function is f(x)=−log3x
- The x-values change sign so the transformed function is f(x)=log7(−x)
- a=−1,k=−6 so the transformation was a reflection across the x-axis and a shift down by 6 units
- a=−3 and x is −x so the transformation was a vertical stretch by a factor of 3, a reflection across the x, and a reflection across the y-axis
Try It 6
- If f(x)=log9x is reflected across the x-axis what is the equation of the transformed function?
- If f(x)=log4x is reflected across the y-axis what is the equation of the transformed function?
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(−x)+4?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=2log2(−x)?
Combining Transformations
After learning all the transformations for the function f(x)=logbx, we should be able to write a transformed function given specific transformations, and also determine what transformations have been performed on the function f(x)=logbx, given an arbitrary transformed function f(x)=alogb(x−h)+k.
Example 7
What transformations have been done to the parent function f(x)=log2x to get the transformed function f(x)=−3log2(x+3)−6?
Solution
We need to identify a,h,k and whether or not x has a negative sign in front of it. To do this we line up the transformed function f(x)=−3log2(x+3)−6 with the standard function f(x)=alog2(x−h)+k:
a=−3 means it has been stretched by a factor of 3 and reflected across the x-axis.
h=−3 means it has been shifted left by 3 units.
k=−6 means it has been shifted down by 6 units.
Try It 7
- What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5−x+7?
- What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=−2log2(x−5)−4?
Example 8
- If f(x)=log3x is reflected across the x-axis, stretched by a factor of 3, and shifted left by 2 units, what is the equation of the transformed function? What happens to the vertical asymptote?
- If f(x)=log7x is reflected across the y-axis, compressed to half its height, and shifted up by 7 units, what is the equation of the transformed function? What happens to the vertical asymptote?
Solution
- a=−3,h=−2 so the transformed function is −3log3(x+2). The vertical asymptote is shifted left by 2 units from x=0 to x=−2.
- a=12,k=7 and x has a negative coefficient so the transformed function is f(x)=12log7(−x)+7. Since there are no horizontal shifts, nothing happens to the vertical asymptote.
Try It 8
- If f(x)=log3x is stretched by a factor of 7, shifted right by 4 units and shifted down by 4 units, what is the equation of the transformed function? What happens to the vertical asymptote?
- If f(x)=log7x is reflected across the x-axis, compressed to one-sixth its height, shifted left by 1 unit, and shifted up by 7 units, what is the equation of the transformed function? What happens to the vertical asymptote?
Move the red dots in manipulation 5 to change the values of a,h,k and b or to reflect the graph across the y-axis. Pay attention to what happens to the graph and the relationship between the values of a,h,k and the transformed function.
Manipulation 5. Transformations on f(x)=logbx
Candela Citations
- Transformations of the logarithmic function f(x)=log_b{x}. Authored by: Leo Chang and Hazel McKenna. Provided by: Utah Valley University. License: CC BY: Attribution
- All graphs created using desmos graphing calculator. Authored by: Leo Chang. Provided by: Utah Valley University. Located at: http://www.desmos.com/calculator. License: CC BY: Attribution
- All Examples and Try Its: hjm624; hjm832; hjm302; 442; hjm356; hjm098; hjm529; hjm831. Authored by: Hazel McKenna. Provided by: Utah Valley University. License: CC BY: Attribution
- All manipulations created using Desmos. Authored by: Hazel McKenna. Provided by: Utah Valley University. Located at: http://desmos.com. License: CC BY: Attribution