6.2: Transformations of the Logarithmic Function

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(xh)+kf(x)=alogb(xh)+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 xx-coordinates remain the same. Therefore, the equation of the function f(x)=log2xf(x)=log2x after it has been shifted up 5 units transforms to f(x)=log2x+5f(x)=log2x+5. The vertical asymptote at x=0x=0 remains the same. Table 1 shows the changes to specific values of this function, which are replicated on the graph in figure 1.

xx log2xlog2x log2x+5log2x+5

Figure 1. Shifting the graph of f(x)=log2xf(x)=log2x up 5 units.

1818 33 22
1414 22 33
1212 11 44
11 00 55
22 11 66
44 22 77
88 33 88
Table 1. f(x)=log2xf(x)=log2x is transformed to f(x)=log2x+5f(x)=log2x+5.

If we shift the graph of the function f(x)=log2xf(x)=log2x down 6 units, all of the points on the graph decrease their yy-coordinates by 6, but their xx-coordinates remain the same. Therefore, the equation of the function f(x)=log2xf(x)=log2x after it has been shifted down 6 units transforms to f(x)=log2x6f(x)=log2x6.The vertical asymptote at x=0x=0 remains the same. Table 2 shows the changes to specific values of this function, which are replicated on the graph in figure 2.

xx log2xlog2x log2x6log2x6

Figure 2. Shifting the graph of f(x)=log2xf(x)=log2x down 6 units.

1818 33 99
1414 22 88
1212 11 77
11 00 66
22 11 55
44 22 44
88 33 33
Table 2. f(x)=log2xf(x)=log2x is transformed to f(x)=log2x6f(x)=log2x6.

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 bb and kk. Pay attention to what happens to the graph and the relationship between the value of kk and the transformed function.

Manipulation 1. Vertical shifts

Vertical shifts

We can represent a vertical shift of the graph of f(x)=log2xf(x)=log2x by adding or subtracting a constant, kk, to the function:

f(x)=log2x+kf(x)=log2x+k

 If k>0k>0, the graph shifts upwards and if k<0k<0 the graph shifts downwards.

Example 1

  1. If f(x)=log3xf(x)=log3x is shifted vertically up by 7 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted vertically down by 4 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5x+9f(x)=log5x+9?
  4. What transformation was made to the parent function f(x)=log2xf(x)=log2x if the transformed function is f(x)=log2x3f(x)=log2x3?

Solution

With vertical shifts, the parent function f(x)=logbxf(x)=logbx is transformed to f(x)=logbx+kf(x)=logbx+k.

  1. k=7k=7 so the transformed function is f(x)=log3x+7f(x)=log3x+7
  2. k=4k=4 so the transformed function is f(x)=log7x4f(x)=log7x4
  3. k=9k=9 so the transformation was a vertical shift up by 9 units.
  4. k=3k=3 so the transformation was a vertical shift down by 3 units.

Try It 1

  1. If f(x)=log3xf(x)=log3x is shifted vertically up by 2 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted vertically down by 9 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5x+3f(x)=log5x+3?
  4. What transformation was made to the parent function f(x)=log2xf(x)=log2x if the transformed function is f(x)=log2x8f(x)=log2x8?

Horizontal Shifts

If we shift the graph of the function f(x)=log2xf(x)=log2x right 8 units, all of the points on the graph increase their xx-coordinates by 8, but their yy-coordinates remain the same. The xx-intercept (1, 0) in the original graph is moved to (9, 0) (figure 3). The vertical asymptote at x=0x=0 shifts right by 8 units to x=8x=8. Any point (x,y)(x,y) on the original graph is moved to (x+8,y)(x+8,y).

But what happens to the original function f(x)=log2xf(x)=log2x? An automatic assumption may be that since xx moves to x+8x+8 that the function will become f(x)=log2(x+8)f(x)=log2(x+8). But that is NOT the case. Remember that the xx-intercept is moved to (9, 0) and if we substitute x=9x=9 into the function f(x)=log2(x+8)f(x)=log2(x+8) we get f(9)=log2(9+8)=4.08751f(9)=log2(9+8)=4.08751!! The way to get a function value of 0 is for the transformed function to be f(x)=log2(x8)f(x)=log2(x8). Then f(9)=log2(98)=0f(9)=log2(98)=0. So the function f(x)=log2xf(x)=log2x transforms to f(x)=log2(x8)f(x)=log2(x8) after being shifted 8 units to the right. The reason is that when we move the function 8 units to the right, the xx-value increases by 8 and to keep the corresponding yy-coordinate the same in the transformed function, the xx-coordinate of the transformed function needs to subtract 8 to get back to the original xx that is associated with the original yy-value. Table 3 shows the changes to specific values of this function, and the graph is shown in figure 3.

xx x8x8 log2(x8)log2(x8)

Figure 3. Shifting the graph right 8 units.

658658 1818 33
334334 1414 22
172172 1212 11
99 11 00
1010 22 11
1212 44 22
1616 88 33
Table 3. Shifting the graph right by 8 units transforms f(x)=log2xf(x)=log2x into f(x)=log2(x8)f(x)=log2(x8).

Notice that the vertical asymptote also shifts from x=0x=0 to x=8x=8.

On the other hand, if we shift the graph of the function f(x)=log2xf(x)=log2x left by 11 units, all of the points on the graph decrease their xx-coordinates by 11, but their yy-coordinates remain the same. So any point (x,y)(x,y) on the original graph moves to (x11,y)(x11,y). Consequently, to keep the same yy-values we need to increase the xx-value by 11 in the transformed function. The equation of the function after being shifted left 11 units is f(x)=log2(x+11)f(x)=log2(x+11). Table 4 shows the changes to specific values of this function, and the graph is shown in figure 4.

xx x+11x+11 f(x)=log2(x+11)f(x)=log2(x+11)

Figure 4. Shifting the graph left 11 units.

878878 1818 –3
434434 1414 –2
212212 1212 –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)=log2xf(x)=log2x into f(x)=log2(x+11)f(x)=log2(x+11).

Notice that the vertical asymptote also shifts from x=0x=0 to x=11x=11.

Move the red dots in manipulation 2 to change the values of bb and hh. Pay attention to what happens to the graph and the relationship between the value of hh and the transformed function.


Manipulation 2. Horizontal shifts

horizontal shifts

We can represent a horizontal shift of the graph of f(x)=log2xf(x)=log2x by adding or subtracting a constant, hh, to the variable xx.

f(x)=log2(xh)f(x)=log2(xh)

If h>0h>0 the graph shifts toward the right and if h<0h<0 the graph shifts to the left. The vertical asymptote x=0x=0 shifts to x=hx=h.

Example 2

  1. If f(x)=log3xf(x)=log3x is shifted right by 2 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted left by 9 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5(x+3)f(x)=log5(x+3)?
  4. What transformation was made to the parent function f(x)=log2xf(x)=log2x if the transformed function is f(x)=log2(x8)f(x)=log2(x8)?

Solution

With horizontal shifts, the parent function f(x)=logbxf(x)=logbx is transformed to f(x)=logb(xh)f(x)=logb(xh).

  1. h=2h=2 so the transformed function is f(x)=log3(x2)f(x)=log3(x2)
  2. h=9h=9 so the transformed function is f(x)=log7(x+9)f(x)=log7(x+9)
  3. h=3h=3 so the transformation was a horizontal shift left by 3 units.
  4. h=8h=8 so the transformation was a horizontal shift right by 8 units

Try It 2

  1. If f(x)=log3xf(x)=log3x is shifted right by 7 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted left by 4 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5(x5)f(x)=log5(x5)?
  4. What transformation was made to the parent function f(x)=log2xf(x)=log2x if the transformed function is f(x)=log2(x+4)f(x)=log2(x+4)?

We can combine vertical and horizontal shifts by transforming f(x)=logb(xh)+kf(x)=logb(xh)+k.

Move the red dots in manipulation 3 to change the values of b,hb,h and kk. Pay attention to what happens to the graph and the relationship between the values of hh andhh and the transformed function.


Manipulation 3. Vertical and horizontal shifts

Example 3

  1. If f(x)=log3xf(x)=log3x is shifted vertically down by 3 units and right by 2 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted left by 9 units and up by 6 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5(x2)+7f(x)=log5(x2)+7?
  4. What transformation was made to the parent function f(x)=log2xf(x)=log2x if the transformed function is f(x)=log2(x+5)4f(x)=log2(x+5)4?

Solution

With horizontal and vertical shifts, the parent function f(x)=logbxf(x)=logbx is transformed to f(x)=logb(xh)+kf(x)=logb(xh)+k.

  1. h=2,k=3h=2,k=3 so the transformed function is f(x)=log3(x2)3f(x)=log3(x2)3
  2. h=9,k=6h=9,k=6 so the transformed function is f(x)=log7(x+9)+6f(x)=log7(x+9)+6
  3. h=2,k=7h=2,k=7 so the transformation was a horizontal shift right by 2 units and up by 7 units.
  4. h=5,k=4h=5,k=4 so the transformation was a horizontal shift left by 5 units and down by 4 units.

Try It 3

  1. If f(x)=log3xf(x)=log3x is shifted down by 7 units and right by 5 units, what is the equation of the transformed function?
  2. If f(x)=log7xf(x)=log7x is shifted left by 4 units and up by 3 units, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5xf(x)=log5x if the transformed function is f(x)=log5(x2)1f(x)=log5(x2)1?
  4. What transformation was made to the parent function f(x)=log2xf(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

  1. If f(x)=log3x is stretched by a factor of 7, what is the equation of the transformed function?
  2. If f(x)=log7x is compressed to one-third its height, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=16log5x?
  4. 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.

  1. a=7 so the transformed function is f(x)=7log3x
  2. a=13 so the transformed function is f(x)=13log7x
  3. a=16 so the transformation was a compression to one-sixth its height
  4. a=5 so the transformation was a vertical stretch by a factor of 5

Try It 4

  1. If f(x)=log3x is stretched by a factor of 2, what is the equation of the transformed function?
  2. If f(x)=log7x is compressed to one-eighth its height, what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=14log5x?
  4. 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

  1. 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?
  2. 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?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=15log5(x9)6?
  4. 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(xh)+k.

  1. a=7,k=5 so the transformed function is f(x)=7log3x5
  2. a=13,h=4,k=2 so the transformed function is f(x)=13log7(x+4)+2
  3. 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
  4. 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

  1. 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?
  2. 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?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=13log5(x2)3?
  4. 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)
Notice that reflecting across the x-axis does not change the vertical asymptote.

Example 6

  1. If f(x)=log3x is reflected across the x-axis what is the equation of the transformed function?
  2. If f(x)=log7x is reflected across the y-axis what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5x6?
  4. What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=3log2x?

Solution

  1. The y-values change sign so the transformed function is f(x)=log3x
  2.  The x-values change sign so the transformed function is f(x)=log7(x)
  3. a=1,k=6 so the transformation was a reflection across the x-axis and a shift down by 6 units
  4. 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

  1. If f(x)=log9x is reflected across the x-axis what is the equation of the transformed function?
  2. If f(x)=log4x is reflected across the y-axis what is the equation of the transformed function?
  3. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5(x)+4?
  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(xh)+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(xh)+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

  1. What transformation was made to the parent function f(x)=log5x if the transformed function is f(x)=log5x+7?
  2. What transformation was made to the parent function f(x)=log2x if the transformed function is f(x)=2log2(x5)4?

Example 8

  1. 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?
  2. 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

  1. 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.
  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

  1. 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?
  2. 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