topic badge
iGCSE (2021 Edition)

6.05 Graphs of logarithmic and exponential functions

Lesson

Graphs of exponential functions

A base form of an exponential function is $f\left(x\right)=a^x$f(x)=ax, where $a$a is a positive number and the variable is in the exponent. What distinguishes an exponential function from other functions is the fact that the exponent (index) is the independent variable. Unlike linear functions which increase or decrease by a constant, exponential functions increase or decrease by a constant multiplier. Let's first look at cases where we have exponential growth and identify key characteristics of such functions.

Graphs of $y=a^x$y=ax

Let's create a table for the function $y=2^x$y=2x:

$x$x $-4$4 $-3$3 $-2$2 $-1$1 $0$0 $1$1 $2$2 $3$3 $4$4
$y$y $\frac{1}{16}$116 $\frac{1}{8}$18 $\frac{1}{4}$14 $\frac{1}{2}$12 $1$1 $2$2 $4$4 $8$8 $16$16

We can see our familiar powers of two and as $x$x increases by one, the $y$y values are increasing by a constant multiplier - here they are doubling. This causes the differences between successive $y$y values to grow and hence, $y$y is increasing at an increasing rate. Let's look at what this function looks like when we graph it.

Key features:

  • As the $x$x-values increase, the $y$y-values increase at an increasing rate.
  • The $y$y-intercept is $\left(0,1\right)$(0,1), since when $x=0$x=0, $y=2^0=1$y=20=1.
  • As $x$x becomes a larger and larger negative number, $y$y becomes a smaller and smaller fraction. In the graph we see as $x$x becomes a larger negative number the graph approaches but does not reach the line $y=0$y=0. Hence, $y=0$y=0 is a horizontal asymptote. We can write this asymptotic behaviour mathematically as follows: As $x\ \rightarrow-\infty,y\ \rightarrow0^+$x ,y 0+ (As $x$x approaches negative infinity, $y$y approaches zero from above).
  • Domain: $x$x is any real number.
  • Range: $y>0$y>0

How does this compare to other values of $a$a? Let's sketch graphs of $y=2^x$y=2x, $y=3^x$y=3x, and $y=5^x$y=5x on the same set of axes. It may help to create a table of values for each, to confirm the functions sketched below:

We can see all of the key features mentioned above were not unique to the graph of $y=2^x$y=2x.

Key features:

  • As the $x$x-values increase, the $y$y-values increase at an increasing rate.
  • The $y$y-intercept is $\left(0,1\right)$(0,1), since when $x=0$x=0, $y=a^0=1$y=a0=1, for any positive value $a$a.
  • $y=0$y=0 is a horizontal asymptote for each graph. As $x\ \rightarrow-\infty,y\ \rightarrow0^+$x ,y 0+
  • Domain: $x$x is any real number.
  • Range: $y>0$y>0

The difference is that, for $x>0$x>0, the higher the $a$a value the faster the graph increases. Each graph goes through the point $\left(1,a\right)$(1,a) and we can see the larger the $a$a value the higher this point will be.

For $x<0$x<0, the higher the $a$a value the quicker the graph approaches the horizontal asymptote.

Graphs of $y=a^{-x}$y=ax

Things can work in reverse as well. Consider the function given by $y=2^{-x}$y=2x. This table shows what happens to $y$y for integer values between $-5$5 and $1$1.

$x$x $-5$5 $-4$4 $-3$3 $-2$2 $-1$1 $0$0 $1$1
$y$y $32$32 $16$16 $8$8 $4$4 $2$2 $1$1 $\frac{1}{2}$12


In contrast to $y=2^x$y=2x the function $y=2^{-x}$y=2x on the other hand is a continuously falling curve (exponential decay). Its rate of falling slows as $x$x gets larger and larger.

The graph of $y=2^{-x}$y=2x has all the same features as $y=2^x$y=2x, but it has been reflected across the $y$y-axis and so it is decreasing instead of increasing.

The same behaviour is exhibited by any exponential graph of the forms $y=b^x$y=bx or $y=b^{-x}$y=bx where $b$b is called the base of the function. The base can be any positive number not equal to $1$1.

Practice questions

Question 1

Consider the graph of the equation $y=4^x$y=4x.

Loading Graph...
A plot of $y=4^x$y=4x on a Cartesian plane is an upward-sloping curve that represents exponential growth. As x increases, the y values rise rapidly. The graph passes through the point (0, 1), since $4^0=1$40=1, and approaches the x-axis asymptotically from above as x decreases, but never touches the x-axis. The curve is smooth and continuous.
  1. What can we say about the $y$y-value of every point on the graph?

    The $y$y-value of most points of the graph is greater than $1$1.

    A

    The $y$y-value of every point on the graph is positive.

    B

    The $y$y-value of every point on the graph is an integer.

    C

    The $y$y-value of most points on the graph is positive, and the $y$y-value at one point is $0$0.

    D
  2. As the value of $x$x gets large in the negative direction, what do the values of $y$y approach but never quite reach?

    $4$4

    A

    $-4$4

    B

    $0$0

    C
  3. What do we call the horizontal line $y=0$y=0, which $y=4^x$y=4x gets closer and closer to but never intersects?

    A horizontal asymptote of the curve.

    A

    An $x$x-intercept of the curve.

    B

    A $y$y-intercept of the curve.

    C

Question 2

Using technology, sketch the functions $y=2^x$y=2x, $y=3^x$y=3x and $y=5^x$y=5x.

Then answer the following questions:

  1. Which of the following statements are true for all of the functions?

    Select all correct answers.

    None of the curves cross the $x$x-axis.

    A

    They all have the same $y$y-intercept.

    B

    All of the curves pass through the point $\left(1,2\right)$(1,2).

    C

    All of the curves have a maximum value.

    D
  2. What is the value of the shared $y$y-intercept?

Transformations of the exponential function $y=a^x+c$y=ax+c

There are some simple variations that we can discuss with these functions.

We can also consider adding a constant to the function to produce, for example, curves given by $y=2^x+3$y=2x+3. In such instances the whole curve is translated upward or downward according to the value of the added constant. Everything else remains the same.

Use the following applet to vary the curve given by the general function $y=b^x+k$y=bx+k. Try to make some different combinations, such as $y=3^x+2$y=3x+2 and $y=0.8^x-2$y=0.8x2, to get a feel for what happens as the values of $b$b and $k$k vary.

Practice questions

Question 3

This is a graph of $y=3^x$y=3x.

Loading Graph...
A number plane with the exponential function y=3^x plotted.
  1. How do we shift the graph of $y=3^x$y=3x to get the graph of $y=3^x-4$y=3x4?

    Move the graph $4$4 units to the right.

    A

    Move the graph downwards by $4$4 units.

    B

    Move the graph $4$4 units to the left.

    C

    Move the graph upwards by $4$4 units.

    D
  2. Hence, plot $y=3^x-4$y=3x4 on the same graph as $y=3^x$y=3x.

     

    Loading Graph...
    A number plane with the exponential function y=a^x plotted.

Question 4

If the graph of $y=2^x$y=2x is moved down by $7$7 units, what is its new equation?

  1. $y=2^{\left(x-7\right)}$y=2(x7)

    A

    $y=2^x-7$y=2x7

    B

    $y=2^x+7$y=2x+7

    C

    $y=2^{7x}-7$y=27x7

    D

Transformations of the exponential function $y=ka^{x+b}$y=kax+b

Let's look at these more closely in relation to the graphs $f(x)=a^x$f(x)=ax and $f(x)=ka^{x+b}$f(x)=kax+b and the impact the parameters have on the key features.

Use the applet below to observe the impact of changing $k$k, and $b$b for a particular base $a$a.

Did varying the parameters $k$k and $b$b have the results that you expected?

Here is a summary of the observations we have seen so far, using specific examples with the function $y=3^x$y=3x:

Specific Example Observation
$y=-3^x$y=3x Reflect $y=3^x$y=3x across the $x$x-axis
$y=3^{x-5}$y=3x5 Translate $y=3^x$y=3x horizontally to the right by $5$5 units
$y=3^x-5$y=3x5 Translate $y=3^x$y=3x vertically downward by $5$5 units
$y=2\times3^x$y=2×3x Double every $y$y value of $y=3^x$y=3x
$y=8-3^x$y=83x Reflect $y=3^x$y=3x across the $x$x axis then translate $8$8 units upward

Sketching exponential functions

Here are some tips for sketching exponential graphs:

  • Is the graph increasing or decreasing? (That is, is it of the form $y=a^x$y=ax or $y=a-x$y=ax?) Knowing this will give you an idea of the approximate shape of the curve.
  • Find the $y$y-intercept by substituting $x=0$x=0
  • Find the horizontal asymptote by looking at the $c$c term in $y=ka^x+c$y=kax+c
  • Use a table of values to find two more points on the curve

Worked examples

Example 1

Sketch the graph of $y=2^{x+3}$y=2x+3.

Think: How does this graph compare to $y=2^x$y=2x? Is the graph increasing or decreasing? What effect does the $+3$+3 have on the asymptote and $y$y-intercept?

Do: The exponent is positive therefore the graph is going to be increasing.

Substituting $x=0$x=0 into the equation to find the $y$y-intercept gives us $y=2^3=8$y=23=8. This gives us one point on the curve.

Since there is no constant term shifting the curve up or down, we can be confident that the new curve will have the same horizontal asymptote as $y=2^x$y=2x.

We can use a table of values to find two more points on the graph besides the $y$y-intercept by substituting any other $x$x-values:

$x$x $-2$2 $1$1
$y$y $2$2 $16$16

Plot the $y$y-intercept and the other two points and sketch the increasing curve:

Example 2

Sketch the graph of $y=-2\times3^{x+2}$y=2×3x+2.

Think: What does the base graph of $y=3^x$y=3x look like? And what transformations would take $y=3^x$y=3x to $y=-2\times3^{x+2}$y=2×3x+2?

Do: The coefficient of $-2$2 tells us that the increasing graph of $y=3^x$y=3x has been now reflected across the $x$x-axis, such that all of the $y$y-values are now negative. Hence, the graph will be close to the $x$x-axis but below for negative values of $x$x, and then decrease as $x$x increases.

Substituting $x=0$x=0 into the equation gives us the $y$y-intercept of $y=-2\times3^2=-18$y=2×32=18. This gives us our first point on the curve.

The asymptote for this equation will remain at the $x$x-axis. However the $+2$+2 in the power means that the curve has been shifted $2$2 units to the left. Using a table of values will help us locate two other points:

$x$x $-2$2 $-1$1
$y$y $-2$2 $-6$6

We can now plot these points and join them to form a decreasing curve below the $x$x-axis.

 

Note: Neither of the examples above included an $x$x-intercept. This is often true for exponential curves, but there can be an $x$x-intercept if there is a vertical translation, such as $y=3\times2^x-12$y=3×2x12. In such a case, we can solve for $y=0$y=0 (such as by rearranging the equation so that both sides are written with the same base) and use this to label the $x$x-intercept, if necessary.

Exponential equations with bases between $0$0 and $1$1

One final point that should be noted is that a curve like $y=\left(0.5\right)^x$y=(0.5)x is none other than $y=2^{-x}$y=2x in disguise. That is,

$y=\left(0.5\right)^x=\left(\frac{1}{2}\right)^x=\frac{1}{2^x}=2^{-x}$y=(0.5)x=(12)x=12x=2x

In a similar way we can say that $y=\left(\frac{1}{b}\right)^x=b^{-x}$y=(1b)x=bx, and so every exponential curve of the form $y=b^x$y=bx, with a base $b$b in the interval $00<b<1, can be equivalently expressed in the form $y=\left(\frac{1}{b}\right)^{-x}$y=(1b)x. Since $b$b is a positive number, this means that exponential functions of the form $y=b^x$y=bx where $00<b<1 are in fact decreasing curves.

Practice questions

Question 5

Of the two functions $y=2^x$y=2x and $y=4\times2^x$y=4×2x, which is increasing more rapidly for $x>0$x>0?

  1. $y=2^x$y=2x

    A

    $y=4\times2^x$y=4×2x

    B

Question 6

Consider the function $y=\left(\frac{1}{2}\right)^x$y=(12)x

  1. Which two functions are equivalent to $y=\left(\frac{1}{2}\right)^x$y=(12)x ?

    $y=\frac{1}{2^x}$y=12x

    A

    $y=2^{-x}$y=2x

    B

    $y=-2^x$y=2x

    C

    $y=-2^{-x}$y=2x

    D
  2. Sketch a graph of $y=2^x$y=2x on the coordinate plane.

    Loading Graph...

  3. Using the result of the first part, sketch $y=\left(\frac{1}{2}\right)^x$y=(12)x on the same coordinate plane.

    Loading Graph...

Graphs of logarithmic functions

The graph of a logarithmic function $y=\log_ax$y=logax is unsurprisingly related to the graph of the exponential function $y=a^x$y=ax. 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.

Graphs of $a^x$ax and $\log_ax$logax, for $a>1$a>1

As these functions 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 by a logarithm
  • Asymptotes: there is a vertical asymptote at $x=0$x=0 (on the $y$y-axis) for all logarithmic functions. As a result, there is no $y$y-intercept.
  • $x$x-intercept: The logarithm of $1$1 is $0$0, regardless of the base used. As a result, the graph of a logarithmic function intersects the $x$x-axis at $\left(1,0\right)$(1,0).

If the base $b$b is greater than $1$1 then the function increases across the entire domain $x>0$x>0. For $00<b<1 the function decreases across its domain.

The following graph shows $y=\log_2\left(x\right)$y=log2(x) and $y=\log_{0.5}\left(x\right)$y=log0.5(x) illustrating the distinctive shape of the log curve.

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

The points shown on each curve shown help to demonstrate the way the gradient of the curve changes as $b$b increases in value.

The following log graph applet allows you to experiment with different bases. You should note that as the base increases beyond $1$1 the rate of increase in the size of the logarithm decreases.

As you move the base back again closer and closer to $1$1 from above, the rate increases so that the curve becomes more and more vertical. You should be able to see why the function cannot exist for bases equal to $1$1.

For positive bases less than $1$1, try moving the slider across the full range of values. What do you notice?

Practice question

Question 7

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.

Transformations of the logarithmic graph $y=k\log_ax+c$y=klogax+c

Vertical translation

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

Graphs of $f\left(x\right)=\log_ax$f(x)=logax and $g\left(x\right)=\log_ax+c$g(x)=logax+c, for $c<0$c<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. 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) and is no longer on the $x$x-axis.

Worked example

example 3

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-intercepts 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, and the negative coefficient of $x$x means that it takes values to the left of the asymptote, just like $f\left(x\right)$f(x).
 

Functions of the form $y=k\log_ax+c$y=klogax+c

A function of the form $y=k\log_ax+c$y=klogax+c represents a vertical translation by $c$c units of the function $y=\log_ax$y=logax.

  • The translation is upwards if $c$c is positive, and downwards if $c$c is negative.
  • The asymptote of the translated function remains at $x=0$x=0.

Practice questions

Question 8

Which of the following options shows the graph of $y=\log_3x$y=log3x after it has been translated $2$2 units up?

  1. Loading Graph...

    A

    Loading Graph...

    B

    Loading Graph...

    C

    Loading Graph...

    D

Question 9

The function $y=\log_5x$y=log5x is translated downwards by $2$2 units.

  1. State the equation of the function after it has been translated.

  2. The graph of $y=\log_5x$y=log5x is shown below. Draw the translated graph on the same plane.

     

    Loading Graph...

Dilation

Recall that multiplying a function by a constant corresponds to vertically rescaling the function (making it larger or smaller). The graph of $g\left(x\right)=k\log_ax$g(x)=klogax is a vertical dilation of the graph of $f\left(x\right)=\log_ax$f(x)=logax if $\left|k\right|$|k| is greater than $1$1, and a vertical compression if $\left|k\right|$|k| is between $0$0 and $1$1.

Graphs of $f\left(x\right)=\log_ax$f(x)=logax and $g\left(x\right)=k\log_ax$g(x)=klogax, for $00<k<1.

Additionally, if the coefficient $k$k is negative there is also a reflection across the $x$x-axis.

Graphs of $f\left(x\right)=\log_ax$f(x)=logax and $g\left(x\right)=k\log_ax$g(x)=klogax, for $k<-1$k<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 $k$k results in $0$0.

Every other point on the graph, however, moves further away from the $x$x-axis (if $\left|k\right|>1$|k|>1) or closer to the $x$x-axis (if $0<\left|k\right|<1$0<|k|<1).

Let's look at an example involving a horizontal reflection too.

Worked example

Example 4

Sketch the graph of $y=3\times2^x+1$y=3×2x+1.

Think: What does the base graph of $y=2^x$y=2x look like? And what transformations would take $y=2^x$y=2x to $y=3\times2^x+1$y=3×2x+1?

Do: Looking at the sign of the $x$x in the equation tells us that this is an increasing graph.

The "$+1$+1" in the equation of the graph has the effect of shifting the whole curve up 1 unit. The new horizontal asymptote is now $x=1$x=1. Sketch a dotted line on the number plane for the asymptote.

Multiplying $2^x$2x by 3 will result in higher values, therefore we can expect this graph to increase at a faster rate than $y=2^x$y=2x meaning a steeper curve. We can use a table of values to find 2 other points to help us sketch the graph:

$x$x $1$1 $2$2
$y$y $7$7 $13$13

 

Example 5

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

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

Think: $g\left(x\right)$g(x) is upside down relative to $f\left(x\right)$f(x), and is stretched so that its corresponding points are further away from the $x$x-axis. So there has been a vertical dilation and a reflection about the $x$x-axis. This means that $g\left(x\right)$g(x) will be of the form $g\left(x\right)=a\log_4\left(-x\right)$g(x)=alog4(x) where $a<-1$a<1.

Do: To determine the particular dilation, let's look at the point $\left(-4,1\right)$(4,1) on the graph of $f\left(x\right)$f(x). The corresponding point on the graph of $g\left(x\right)$g(x) is $\left(-4,-3\right)$(4,3).

To get from a $y$y-value of $1$1 to a $y$y-value of $-3$3, we have multiplied by $-3$3. So the value of $a$a must be $-3$3, and therefore the function is $g\left(x\right)=-3\log_4\left(-x\right)$g(x)=3log4(x).

Functions of the form $y=k\log_ax$y=klogax

A function of the form $y=k\log_ax$y=klogax represents a vertical rescaling of the function $y=\log_ax$y=logax.

  • $\left|k\right|>1$|k|>1 corresponds to a vertical dilation.
  • $0<\left|k\right|<1$0<|k|<1 corresponds to a vertical compression.
  • If the sign of $k$k is negative, then there is also a reflection across the $x$x-axis.

Practice question

Question 10

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

Outcomes

0606C7.1A

Know simple properties and graphs of the logarithmic function including lnx and graphs of k ln(ax + b) where n, k, a and b are integers.

0606C7.1B

Know simple properties and graphs of the exponential function including e^x and graphs of ke^(nx) + a where n and k are integers.

What is Mathspace

About Mathspace