topic badge

6.05 Graphs of logarithms

Lesson

Graphs of logarithmic functions

For any given base, $b$b, the graph of a logarithmic function $y=\log_bx$y=logbx is related to the graph of the exponential function $y=b^x$y=bx. In particular, they are a reflection of each other across the line $y=x$y=x. This is because exponential and logarithmic functions are inverse functions. It may be useful to re-visit exponential graphs and their transformations before working through this section.

Graphs of $b^x$bx and $\log_bx$logbx, for $b>1$b>1

As $b^x$bx and $\log_bx$logbx are a reflection of each other, we can observe the following properties of the graphs of logarithmic functions of the form $y=\log_bx$y=logbx:

  • Domain: the argument, $x$x, is restricted to only positive values. That is, $x>0$x>0.
  • Range: all real $y$y values can be obtained.
  • Asymptotes: there is a vertical asymptote at $x=0$x=0 (on the $y$y-axis) for any logarithmic function of the form $y=\log_bx$y=logbx, regardless of the base. As a result, there is no $y$y-intercept.
  • $x$x-intercept: The logarithm of $1$1 is $0$0, irrespective of the base used. As a result, the graph of $y=\log_bx$y=logbx intersects the $x$x-axis at $\left(1,0\right)$(1,0).

Two particular log curves from the family of log functions with $b>1$b>1 are shown below. The top curve is the graph of the function $f\left(x\right)=\log_2\left(x\right)$f(x)=log2(x), and the bottom curve is the graph of the function $g\left(x\right)=\log_4\left(x\right)$g(x)=log4(x), as labelled.

The points shown on each curve help to demonstrate the way the gradient of the curve changes as $b$b increases in value. The larger the value of the base the less steep the graph is. Each graph will pass through $\left(b,1\right)$(b,1), since the $\log_bb=1$logbb=1. Thus, the higher base graph will appear closer to the $x$x-axis.

Just as for exponential functions if the base $b$b is greater than $1$1 then the function increases across the entire domain and for $00<b<1 the function decreases across its domain. This course will focus on logarithmic functions with bases greater than $1$1.

 

Practice question

Question 1

Consider the function $y=\log_4x$y=log4x, the graph of which has been sketched below.

Loading Graph...

  1. Complete the following table of values.

    $x$x $\frac{1}{16}$116 $\frac{1}{4}$14 $4$4 $16$16 $256$256
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  2. Determine the $x$x-value of the $x$x-intercept of $y=\log_4x$y=log4x.

  3. How many $y$y-intercepts does $\log_4x$log4x have?

  4. Determine the $x$x value for which $\log_4x=1$log4x=1.

Question 2

The functions $y=\log_2x$y=log2x and $y=\log_3x$y=log3x have been graphed on the same set of axes.

Loading Graph...

  1. Using the labels $A$A and $B$B, state which graph corresponds to each function.

    $y=\log_2x$y=log2x is labelled $\editable{}$ and $y=\log_3x$y=log3x is labelled $\editable{}$.

  2. Which of the following multiple choice answers completes the statement?

    "The larger the base $a$a of the function $y=\log_ax$y=logax, ..."

    ...the further the asymptote is from the $y$y-axis.

    A

    ...the less steep the graph.

    B

    ...the steeper the graph.

    C

    ...the further the $x$x-intercept is from the $y$y-axis

    D

 

Transformations of the logarithmic graph $y=\log_bx$y=logbx

The logarithmic graph can be transformed in a number of ways. The following summarises and revises these transformations:

Transformations of the logarithmic function

To obtain the graph of $y=a\log_b\left(x-h\right)+k$y=alogb(xh)+k from the graph of $y=\log_bx$y=logbx:

  • $a$a dilates (stretches) the graph by a factor of $a$a from the $x$x-axis, parallel to the $y$y-axis
  • When $a<0$a<0 the graph is reflected across the $x$x-axis
  • $h$h translates the graph $h$h units horizontally, the graph shifts $h$h units to the right when $h>0$h>0 and $|h|$|h| units to the left when $h<0$h<0
  • $k$k translates the graph $k$k units vertically, the graph shifts $k$k units upwards when $k>0$k>0 and $\left|k\right|$|k| units downwards when $k<0$k<0.

 

Translations

Recall that adding a constant to a function corresponds to translating the graph vertically. So the graph of $g\left(x\right)=\log_bx+k$g(x)=logbx+k is a vertical translation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx. The translation is upwards if $k$k is positive, and downwards if $k$k is negative.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=\log_bx+k$g(x)=logbx+k, for $k<0$k<0.

Notice that the asymptote is not changed by a vertical translation, and is still the line $x=0$x=0. The $x$x-intercept has changed however, and now occurs at a point further along the $x$x-axis, this can be found by solving for $x$x when $y=0$y=0. The original $x$x-intercept (which was at $\left(1,0\right)$(1,0)) has now been translated vertically to $\left(1,k\right)$(1,k).

Adding a constant to the argument of a logarithmic function corresponds to translating the graph horizontally. So the graph of $g\left(x\right)=\log_b\left(x-h\right)$g(x)=logb(xh) is a horizontal translation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx. The translation is to the right if $h$h is positive, and to the left if $h$h is negative.

Graphs of $f\left(x\right)=\log_b\left(x\right)$f(x)=logb(x) and $g\left(x\right)=\log_b\left(x-h\right)$g(x)=logb(xh), for $h>0$h>0.

Notice that the asymptote is changed by a horizontal translation, and is translated to the line $x=h$x=h. The $x$x-intercept has also changed, it has been translated horizontally by $h$h units and now occurs at $\left(1+h,0\right)$(1+h,0).

 

Worked example

The graphs of the function $f\left(x\right)=\log_3\left(x\right)$f(x)=log3(x) and another function $g\left(x\right)$g(x) are shown below.

 

(a) Describe the transformation used to get from $f\left(x\right)$f(x) to $g\left(x\right)$g(x).

Think: $g\left(x\right)$g(x) has the same general shape as $f\left(x\right)$f(x), just translated upwards. We can figure out how far it has been translated by looking at the distance between corresponding points.

Do: The point on $g\left(x\right)$g(x) that is directly above the $x$x-intercept of $f\left(x\right)$f(x) is at $\left(1,5\right)$(1,5), which is $5$5 units higher. In fact, we can see the constant distance of $5$5 units all the way along the function:

So $f\left(x\right)$f(x) has been translated $5$5 units upwards to give $g\left(x\right)$g(x).

 

(b) Determine the equation of the function $g\left(x\right)$g(x).

Think: We know that $f\left(x\right)$f(x) has been vertically translated $5$5 units upwards to give $g\left(x\right)$g(x). That is, the function has been increased by $5$5.

Do: This means that $g\left(x\right)=\log_3\left(x\right)+5$g(x)=log3(x)+5. This function has an asymptote at $x=0$x=0.

 

Practice questions

Question 3

Use the applet below to describe the transformation of $g\left(x\right)=\log_3x$g(x)=log3x into $f\left(x\right)=\log_3x+k$f(x)=log3x+k, where $k>0$k>0.

  1. $f\left(x\right)$f(x) is the result of a translation $k$k units to the right.

    A

    $f\left(x\right)$f(x) is the result of a translation $k$k units to the left.

    B

    $f\left(x\right)$f(x) is the result of a translation $k$k units downwards.

    C

    $f\left(x\right)$f(x) is the result of a translation $k$k units upwards.

    D

Question 4

Consider the function $y=\log_3x-1$y=log3x1.

  1. Solve for the $x$x-coordinate of the $x$x-intercept.

  2. Complete the table of values for $y=\log_3x-1$y=log3x1.

    $x$x $\frac{1}{3}$13 $1$1 $3$3 $9$9
    $y$y $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
  3. State the equation of the vertical asymptote.

  4. Sketch the graph of $y=\log_3x-1$y=log3x1.

    Loading Graph...

Question 5

Use the applet below to describe the transformation of $g\left(x\right)=\log_{10}x$g(x)=log10x to $f\left(x\right)=\log_{10}\left(x-h\right)$f(x)=log10(xh), for $h<0$h<0.

  1. $f\left(x\right)$f(x) is the result of a translation $\left|h\right|$|h| units downwards.

    A

    $f\left(x\right)$f(x) is the result of a translation $\left|h\right|$|h| units to the left.

    B

    $f\left(x\right)$f(x) is the result of a translation $\left|h\right|$|h| units to the right.

    C

    $f\left(x\right)$f(x) is the result of a translation $\left|h\right|$|h| units upwards.

    D

Question 6

The graph of $f\left(x\right)=\log x$f(x)=logx (grey) and $g\left(x\right)$g(x) (black) is drawn below.

$g\left(x\right)$g(x) is a transformation of $f\left(x\right)$f(x).

Loading Graph...

  1. What sort of transformation is $g\left(x\right)$g(x) of $f\left(x\right)$f(x)?

    Horizontal translation.

    A

    Reflection.

    B

    Vertical translation.

    C

    Horizontal dilation.

    D
  2. Hence state the equation of $g\left(x\right)$g(x).

 

Vertical dilation

Recall that multiplying a function by a constant corresponds to vertically rescaling the function (stretching) from the horizontal axis. The graph of $g\left(x\right)=a\log_bx$g(x)=alogbx is a vertical dilation of the graph of $f\left(x\right)=\log_bx$f(x)=logbx if $\left|a\right|$|a| is greater than $1$1, and a vertical compression if $\left|a\right|$|a| is between $0$0 and $1$1.

Graphs of $f\left(x\right)=\log_bx$f(x)=logbx and $g\left(x\right)=a\log_bx$g(x)=alogbx, for $00<a<1.

Does this graph look familiar? How does it compare to the graph near the start of the lesson comparing logarithmic functions with different bases? In fact, we can consider a change of base as a vertical dilation. We can show the equivalence using the change of base rule, which states:

$\log_b(x)=\frac{\log_d(x)}{\log_d(b)}$logb(x)=logd(x)logd(b)

That is, if we compare the graph of $f\left(x\right)=\log_d\left(x\right)$f(x)=logd(x) to $g\left(x\right)=\log_b\left(x\right)$g(x)=logb(x), $g(x)$g(x) will be a dilation of $f(x)$f(x) by a factor of $\frac{1}{\log_d\left(b\right)}$1logd(b) from the $x$x-axis.

For example, if we compare the graphs of $f\left(x\right)=\log_2\left(x\right)$f(x)=log2(x) to $g\left(x\right)=\log_4\left(x\right)$g(x)=log4(x), we can see the graph of $g\left(x\right)$g(x) is a dilation of $f\left(x\right)$f(x) by a factor of $\frac{1}{2}=\frac{1}{\log_24}$12=1log24.

 

Reflection

If the coefficient $a$a is negative this will result in a reflection across the $x$x-axis.

Graphs of $f\left(x\right)=\log_2x$f(x)=log2x and $g\left(x\right)=-\log_2x$g(x)=log2x, example of $a=-1$a=1.

Notice that the asymptote is not changed by this type of transformation, and is still the line $x=0$x=0. The $x$x-intercept also remains unchanged, since multiplying a $y$y-coordinate of $0$0 by any constant $a$a results in $0$0.

 

Horizontal dilation

Horizontal dilations are not a focus of this course, but we will briefly consider them. From our previous work of transformations of general functions, the graph of $g\left(x\right)=\log_b\left(cx\right)$g(x)=logb(cx) can be obtained from the graph of $f\left(x\right)=\log_bx$f(x)=logbx as follows:

  • $c$c dilates (stretches) the graph by a factor of $\frac{1}{c}$1c from the $y$y-axis, parallel to the $x$x-axis

  • When $c<0$c<0 the graph is reflected across the $y$y-axis

However, with our knowledge of logarithm laws, we can treat this dilation factor as a vertical shift.

For example, $g\left(x\right)=\log_3\left(9x\right)$g(x)=log3(9x) can be rearranged using our log laws as follows:

$g\left(x\right)$g(x) $=$= $\log_3\left(9x\right)$log3(9x)
  $=$= $\log_3\left(x\right)+\log_3\left(9\right)$log3(x)+log3(9)
  $=$= $\log_3\left(x\right)+2$log3(x)+2

Hence, the graph of $g\left(x\right)$g(x) is equivalent to a vertical translation of $2$2 units upwards of the graph of $f(x)=\log_3\left(x\right)$f(x)=log3(x).

 

Practice question

Question 7

The graph of $y=\log_7x$y=log7x is shown below.

Loading Graph...

  1. What transformation of the graph of $y=\log_7x$y=log7x is needed to get the graph of $y=-3\log_7x$y=3log7x?

    Reflection across the $x$x-axis only.

    A

    Vertical compression by a factor of $3$3 and reflection across the $x$x-axis.

    B

    Vertical dilation by a factor of $3$3 and reflection across the $x$x-axis.

    C

    Vertical dilation by a factor of $3$3 only.

    D

    Vertical compression by a factor of $3$3 only.

    E
  2. Now draw the graph of $y=-3\log_7x$y=3log7x on the same plane as $y=\log_7x$y=log7x:

     

    Loading Graph...

Question 8

Consider the function $f\left(x\right)=\log_3\left(\frac{x}{9}\right)$f(x)=log3(x9).

  1. By using logarithmic properties, rewrite $\log_3\left(\frac{x}{9}\right)$log3(x9) as a difference of two terms.

    Fully simplify your answer.

  2. How can the graph of $y=f\left(x\right)$y=f(x) be obtained from the graph of $g\left(x\right)=\log_3x$g(x)=log3x.

    The graph of $y=f\left(x\right)$y=f(x) can be obtained by stretching $y=g\left(x\right)$y=g(x) vertically by a factor of $9$9.

    A

    The graph of $y=f\left(x\right)$y=f(x) can be obtained by stretching $y=g\left(x\right)$y=g(x) horizontally by a factor of $9$9.

    B

    The graph of $y=f\left(x\right)$y=f(x) can be obtained by translating $y=g\left(x\right)$y=g(x) by $2$2 units up.

    C

    The graph of $y=f\left(x\right)$y=f(x) can be obtained by translating $y=g\left(x\right)$y=g(x) by $2$2 units down.

    D

Outcomes

3.1.1.4

recognise the qualitative features of the graph of 𝑦=log_𝑎(𝑥) (𝑎>1), including asymptotes, and of its translations 𝑦=log_𝑎(𝑥)+𝑏 and 𝑦=log_𝑎(𝑥+𝑐)

What is Mathspace

About Mathspace