Graphs of exponential and logarithmic functions

Graphs of Exponential and Logarithmic Functions

Graphs of exponential functions and logarithmic functions provide a visual insight into their properties, such as growth, decay, and the inverse relationship between them. Graphs of exponential functions allow us to examine the distinctive curve of exponential growth and decay, while graphs of logarithmic functions facilitate analysis of the inverse of exponentials.


Use this page to revise the following concepts of graphing exponential and logarithmic functions:


Graphs of Exponential Functions

An exponential function is a mathematical function in the form of \( f(x) = a^x \) where \(x\) is an exponent and \(a\) is a constant (also known as the base) and where \( a \in \mathbb{R}^+ \setminus \{ 1 \}\). The most commonly used base is the Euler’s number, \(e\), which is approximately equal to \(2.71828\).

Generally, there are two scenarios of exponential functions, exponential growth and exponential decay. Each scenario is modelled by a specific graph.

Exponential growth is modelled by functions of the form \( f(x) = a^x\) where \( a \) is greater than \(1\).

For example, the graph of \( f(x) = 2^x \) is shown below.

Graph of \( y=f(x) = 2^x \) Key features of \( y=f(x) = a^x \) where \(a > 1\)
A graph of f(x) = x squared. The points (-2,0.25), (-1,0.5), (0,1), (1,2), (2,4) and (3,8) are marked on the curve.  
  • As the \(x\)-values increase, \(f(x)\) grows exponentially, meaning the rate of increase becomes larger over time.
  • The \(y\)-intercept is \((0,1)\) since when \(x = 0, y = a^0 = 1\).
  • No \(x\)-intercepts
  • As the \(x\)-values decrease, the \(y\)-values grow smaller, and approaches but does not reach the line \( y = 0 \). Hence, \(y = 0\) is a horizontal asymptote.
  • Domain: \(x\) is any real number.
  • Range: \(y > 0\).

Note

These features hold for the form \( f(x) = a^x \). However, if transformations are applied, the \(y\)-intercept and range will change accordingly.

Exponential decay is modelled by functions of the \( f(x) = a^x\) where \( a \) is greater than \(0\) but less than \(1\). For example, the graph of \(f(x)=\left(\frac{1}{2}\right)^x\) is shown below and key features are summarised.

Graph of \( y=f(x) = \left(\frac{1}{2}\right)^x \) Key features of \( y=f(x) = a^x \) where \(0 <  a < 1\)
A graph of F9X0 = 1/2 to the power of x. The coordinates (2,0.25), (1,0.5), (0,1), (-1,2), (-2,4) and (-3,8) are marked on the curve.
  • As the \(x\)-values increase, the \(y\)-values decrease at a decreasing rate.
  • The \(y\)-intercept is \((0,1)\) since when \(x = 0, y = a^0 = 1\).
  • No \(x\)-intercepts
  • As the \(x\)-values decrease, the \(y\)-values grow without bound, and approaches but does not reach the line \( y = 0 \). Hence, \(y = 0\) is a horizontal asymptote.
  • Domain: \(x\) is any real number.
  • Range: \(y > 0\).

Note

These features hold for the form \( f(x) = a^x \). However, if transformations are applied, the \(y\)-intercept and range will change accordingly.

Note that \(\left(\frac{1}{a}\right)^x\) is equivalent to \(a^{-x}\). When it is graphed, it can be seen that it is a reflection of \(a^x\) across the \(y\)-axis.

Graphs of Logarithmic Functions

The logarithmic function is the inverse function to the exponential function. The logarithmic function is defined as \(f(x) = \log_a(x)\) where \(x \in \mathbb{R}^+\) and \(a \in \mathbb{R} \setminus \{ 1\}\). The base of the logarithm is \(a\), this can be read as "\(\log\) base \(a\) of \(x\)". The most two common bases used in logarithmic functions are base 10 and base \(e\).

The logarithmic function with base \(10\) is called the common logarithmic function and it is denoted by \(f(x) = \log_{10}(x)\).

The logarithmic function with base \(e\) is called the natural logarithmic function and it is denoted by \(f(x) = \log_e(x)\) or \(f(x) = \ln(x)\).

Generally, there are two types of graphs of logarithmic functions of the form \(f(x) = \log_a(x)\), depending on the value of \(a\).

  • If \(a > 1\), the graph is going up and passing through \((1,0)\)
  • If \(0 < a < 1\), the graph is going down and passing through \((1,0)\)

This behaviour can be changed by transformations, which are discussed later.

The logarithmic function (going up) is denoted by \(f(x) = \log_a(x)\) where \( a > 1 \). The graph of \(f(x) = \log_2(x)\) is shown below, and key features summarised.

For example, the graph of \( f(x) = \log_2(x) \) is shown below.

Graph of \(y=f(x) = \log_2(x)\) Key features of \(y=f(x) = \log_a(x)\) where \(a > 1\)
A graph of f(x) = log 2 (x). On the curve the coordinates (0,1), the x intercept and (4,2) and (8,3) are marked.  
  • The graph is an increasing function.
  • The \(x\)-intercept is (1.0) since when \(x = 0, y =\log_a(1) = 0\)
  • No \(y\)-intercepts
  • As the \(x\)-values increase, \(y\)-values are approaching positive infinity, so the line \( x = 0 \) is a vertical asymptote.
  • Domain: \(x > 0\).
  • Range: \(y\) is any real number.

The logarithmic function (going down) is denoted by \(f(x) = \log_a(x)\) where \( 0 < a < 1 \). The graph of \(f(x) = \log_{\frac{1}{2}}(x)\) is shown below, and key features summarised.

Graph of \(y=f(x) = \log_{\frac{1}{2}}(x)\) Key features of \(y=f(x) = \log_a(x)\) where \(0 < a < 1\)
A graph of f(x) = log 1/2 (x) with the coordinates (1,0) which is the x intercept, (4, -2) and (8, -3) marked on the curve.  
  • The graph is a decreasing function.
  • The \(x\)-intercept is (1.0) since when \(x = 1, y =\log_a(1) = 0\)
  • No \(y\)-intercepts
  • As the \(x\)-values increase, \(y\)-values are approaching negative infinity, so the line \( x = 0 \) is a vertical asymptote.
  • Domain: \(x > 0\).
  • Range: \(y\) is any real number.

Transformations of graphs of exponential and logarithmic functions

Transformations of exponential and logarithmic function graphs involve dilating (also known as stretching or compressing), reflecting, and translating (also known as shifting or moving) to create new versions of the original graphs.

Generally, there are three types of transformations that could be applied to each function.

  • Dilations – stretches or compresses
  • Reflections – flip the graph
  • Translations – shifts or movements

For example:

  • Horizontal and vertical shifts move the graph left, right, up or down
  • Stretching or compressing alters the steepness or width of a graph
  • Reflections flip the graph across an axis, changing its orientation

Graph transformations of exponential functions

Transformations of exponential graphs behave similarly to those of other functions.

Three types of transformations can be applied to the original exponential function given by \(f(x) = \log_a(x)\) where \( a \in \mathbb{R}^+ \setminus \{ 1 \}\).

  • Shifts – horizontal and vertical
  • Reflections – in the \(x\)-axis and \(y\)-axis
  • Stretches/compressions – horizontal and vertical
StretchesCompressions
Suppose \(a > 1\), to obtain the graphs of:
\[y = m \times f(x) = mx^x\]
Stretch the graph of \(y = f(x)\) vertically by a factor of \(m\).
For example, to obtain \(y = 3 \times 2^x\) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = 3 times 2 to the power of x. The graph of y = 2 to the power x intercepts the y axis at (0,1), where as y = 3 times 2 to the power of x intercepts the y axis at (0,3).
The blue curve represents \(y = 2^x\), and the green represents \(y = 3 \times 2^x\).

The original graph of \(y = 2^x \) is now stretching vertically by a factor of \(3\) (triple in \(x-\)values).
Suppose \(a > 1\), to obtain the graphs of:
\[ y = \frac{1}{m} \times f(x) = \frac{1}{m} \times a^x \]
Stretch the graph of \(y = f(x)\) vertically by a factor of \(m\).
For example, to obtain \(y = \frac{1}{2} \times 2^x \) from \(y = 2^x\).

A graph of y = 2 to the power of x and y= 1/2 times 2 to the power of x. When x = 2, y = 4 on the graph y = 2 to the power of x. When x = 2, y =2 on the graph y= 1/2 times 2 to the power of x.
The blue curve represents \(y = 2^x\), and the green represents \(y = \frac{1}{2} \times 2^x \).

The original graph of \(y = 2^x \) is now compressed vertically by a factor of \(2\) (half in \(y-\)values).
\[ y = f\left(\frac{x}{m}\right) = a^{\left(\frac{x}{m}\right)} \]

Stretch the graph of \(y = f(x)\) horizontally by a factor of \(m\).
For example, to obtain \( y = 2^{\frac{x}{3}} \) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = 2 to the power of x/3. When y = 4, x = 2 on the graph. y = 2 to the power of x. When y = 4, x = 6 on the graph y = 2 to the power of x/3.

The blue curve represents \(y = 2^x\), and the green represents \( y = 2^{\frac{x}{3}} \).

The original graph of \(y = 2^x \) is now stretching horizontally by a factor of \(3\) (triple in \(x\)-values).

\[ y = f(mx) = a^{mx} \]

Compress the graph of \(y = f(x)\) horizontally by a factor of \(m\).
For example, to obtain \( y = 2^{2x} \) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = 2 to the power of 2x. When y = 4, x = 2 in the function y = 2 to the power of x. In the function y = 2 to the power of 2x when y = 4, x = 1.

The blue curve represents \(y = 2^x\), and the green represents \( y = 2^{2x} \).

The original graph of \(y = 2^x \) is now compressing horizontally by a factor of \(2\) (halve in \(x\)-values).

In the \(x\)-axis In the \(y\)-axis
Reflect the graph of \(y = f(x)\) in the \(x\)-axis.
\[y=-f(x)=-a^x\]
For example, to obtain \(y = -2^x\) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = - 2 to the power of x. y = 2 to the power of x intercepts the y axis at (0,1) and x and y = - 2 to the power of x intercepts the y axis at (0, -1)
The blue curve represents \(y = 2^x\), and the green represents \(y = -2^x\).

The original graph of \(y = 2^x \) is now reflected in the \(x\)-axis (flipped upside down).
Reflect the graph of \(y = f(x)\) in the \(x\)-axis.
\[y=f(-x)=a^{-x}\]
 For example, to obtain \(y = -2^x\) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = 2 to the power of -x. The original graph y=2^x is now reflected in the y-axis.
The blue curve represents \(y = 2^x\), and the green represents \(y = 2^{-x}\).

The original graph of \(y = 2^x \) is now reflected in the \(y\)-axis.
In the \(x\)-axis In the \(y\)-axis
Shift the graph of \(y = f(x)\) to the right by \(h\) units.

\[y = f(x - h) = a^{(x-h)} \]

For example, to obtain \(y = 2^{(x - 2)} \) from \(y = 2^x\).

A graph of the functions y = 2 to the power of x and y = 2 to the power of x - 2. On the graph y = x to the power of 2, the coordinates (1,2). The coordinates (3,2) are marked on the curve of  y = 2 to the power of x - 2

The blue curve represents \(y = 2^x\), and the green represents \(y = 2^{(x-2)}\).

The original graph of \(y = 2^x \) is now shifted to the right by \(2\) units.
Shift the graph of \(y = f(x)\) up by \(k\) units.

\[y = f(x) + k = a^x + k \]

For example, to obtain \(y = 2^x + 2 \) from \(y = 2^x\).

A graph of y = 2 to the power of x and y = y = 2 to the power + 2. y = 2 to the power of x passes through the y axis at (0,1) and  y = y = 2 to the power + 2 passes through the y axis at (0,3).

The blue curve represents \(y = 2^x\), and the green represents \(y = 2^x + 2\).

The original graph of \(y = 2^x \) is now shifted up by \(2\) units.
Shift the graph of \(y = f(x)\) to the left by \(h\) units.

\[y = f(x - h) = a^{(x-h)} \]

For example, to obtain \(y = 2^{(x + 2)} \) from \(y = 2^x\).

Blue curve is y=2^x. Curve rises up to cross the y-axis from the left. Curve passes through (2,4). Green curve is y=2^{(x+2)}. This is the same curve shifted left by 2 units to pass through (0,4).”>

The blue curve represents \(y = 2^x\), and the green represents \(y = 2^{(x+2)}\).

The original graph of \(y = 2^x \) is now shifted to the left by \(2\) units.
Shift the graph of \(your = f(x)\) down by \(k\) units.

\[y = f(x) - k = a^x - k \]

For example, to obtain \(y = 2^x - 2 \) from \(y = 2^x\).

Blue curve is y=2^x. Curve rises up to cross the y-axis from the left. Curve intercepts y-axis as (0,1). Green curve is y=2^x-2. This is the same curver shifted down by 2 units to intercept y-axis as (0,-1) and to intercept x-axis at (1,0).
The blue curve represents \(y = 2^x\), and the green represents \(y = 2^x - 2\).

The original graph of \(y = 2^x \) is now shifted down by \(2\) units.

Graph transformations of logarithmic functions

Transformations of logarithmic graphs behave similarly to those of other functions.

Three types of transformations can be applied to the original logarithmic function given by \(f(x) = a^x\) where \(a \in \mathbb{R}^+\) and \(a \neq 1\).

  • Shifts – horizontal and vertical
  • Reflections – in the \(x\)-axis and \(y\)-axis
  • Stretches/compressions – horizontal and vertical
StretchesCompressions

Suppose \(a > 1\), to obtain the graphs of:
\[y = m \times f(x) = m \times \log_{a}(x)\]
Stretch the graph of \(y = f(x)\) vertically by a factor of \(m\).
For example, to obtain \(y = 3 \times \log_{2} (x)\) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, intercepts x-axis at (1,0), and passes through (4.2). Green curve is y=3\times\log_2{(x)}. x-intercept is also (1,0) but curve plateaus more gradually to passes through (4,6).

The blue curve represents \(y = \log_{2}(x)\), and the green represents \(y = 3 \times \log_{2}(x)\).

The original graph of \(y = \log_{2}(x) \) is now stretching vertically by a factor of \(3\) (the \(x\)-values are tripled).

Suppose \(a > 1\), to obtain the graphs of:
\[
y = \frac{1}{m} \times f(x) = \frac{1}{m} \times \log_a(x)
\]
Compress the graph of \(y = f(x)\) vertically by a factor of \(m\).
For example, to obtain \( y = \frac{1}{2} \times \log_2(x) \) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and intecepts x-axis at (1,0), and passes through (4.2). Green curve is y=\frac{1}{2}\times\log_2{(x)}. x-intercept is also (1,0) but curve plateaus more quickly to pass through (4,1).

The blue curve represents \(y = \log_{2}(x)\), and the green represents \( y = \frac{1}{2} \times \log_2(x) \).

The original graph of \(y = \log_{2}(x) \) is now compressing vertically by a factor of \(2\) (the \(y\)-values are halved).

Stretch the graph of \(y = f(x)\) horizontally by a factor of \(m\).\[ y = f\left(\frac{x}{m}\right) = \log_a\left(\frac{x}{m}\right) \]
For example, to obtain \(
y = \log_2\left(\frac{x}{3}\right)
\) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and intecepts x-axis at (1,0). Green curve is y=\log_2{(\frac{x}{3})}. x-intercept is now (3,0)

The blue curve represents \(y = \log_{2}(x)\), and the green represents \(
y = \log_2\left(\frac{x}{3}\right)
\).

The original graph of \(y = \log_{2}(x) \) is now stretching horizontally by a factor of 3 (the \(x\)-values are tripled).

Compress the graph of \(y = f(x)\) horizontally by a factor of \(m\).\[y = f(mx) = \log_{a}(mx)\]
For example, to obtain \(y = \log_{2} (2x)\) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and passes through (4,2). Green curve is y=\log_2{(2x)}. Curve passes through (2,2)

The blue curve represents \(y = \log_{2}(x)\), and the green represents \(y =  \log_{2}(2x)\).

The original graph of \(y = \log_{2}(x) \) is now compressing horizontally by a factor of \(2\) (the \(y\)-values are halved).

In the \(x\)-axis In the \(y\)-axis
Reflect the graph of \(y= f(x)\) in the \(x\)-axis. 
\[y=-f(x)=-\log_{a}(x)\]
For example, to obtain \(y = -\log_{2}(x)\) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and passes through (2,1). Green curve is y=-\log_2{(x)}. This is  reflection in x-axis, rising up to approach the y-axis from the right. Curve passes through (2,-1).
The blue curve represents \(y = \log_{2}(x)\), and the green represents \(y = -\log_{2}(x)\).

The original graph of \(y = \log_{2}(x)\) is now reflected in the \(x\)-axis (flipped upside down).

Reflect the graph of \(y = f(x)\) in the \(y\)-axis.
\[y=f(-x)=\log_{a}(-x)\]
For example, to obtain \(y = \log_{2}(-x)\) from \(y = \log_{2}(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and intersects x-axis at (1,0). Green curve is y=\log_2{(-x)}. This is reflection in y-axis, curving downward through (-1,0) to approach y-axis from the left
The blue curve represents \(y = \log_{2}(x)\), and the green one represents \(y = \log_{2}(-x)\).

The original graph of \(y = \log_{2}(x)\) is now reflected in the \(y\)-axis.

Horizontal shifts Vertical shifts
Shift the graph of \(y = f(x)\) to the right by \(h\) units.

\[ y = f(x - h) = \log_a(x - h) \]

For example, to obtain \(y = \log_2(x - 2) \) from \(y = \log_2(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and passes through (4,2). Green curve is y=\log_2{(x-2)}. This is the same graph shifted to the right to pass through (6,2).

The blue curve represents \(y = \log_2(x) \), and the green represents \(y = \log_2(x-2) \).

The original graph of \(y = \log_2(x) \) is now shifted to the right by \(2\) units.
Shift the graph of \(y = f(x)\) up by \(h\) units.

\[ y = f(x) + k = \log_a(x) + k \]

For example, to obtain \(y = \log_2(x) + 2 \) from \(y = \log_2(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and passes through (2,1). Green curve is y=\log_2{(x)+2}. This is the same graph shifted up to pass through (2,3)

The blue curve represents \(y = \log_2(x) \), and the green one represents \(y = \log_2(x) + 2 \).

The original graph of \(y = \log_2(x) \) is now shifted up by \(2\) units.
Shift the graph of \(y = f(x)\) to the left by \(h\) units.

\[ y = f(x + h) = \log_a(x + h) \]

For example, to obtain \(y = \log_2(x + 2) \) from \(y = \log_2(x)\).

Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and intercepts x-axis at (1,0). Green curve is y=\log_2{(x+2)}. This is the same graph shifted to the left to intercept at (-1, 0).

The blue curve represents \(y = \log_2(x) \), and the green represents \(y = \log_2(x+2) \).

The original graph of \(y = \log_2(x) \) is now shifted to the left by \(2\) units.
Shift the graph of \(y= f(x)\) down by \(k\) units.

\[ y = f(x) - k = \log_a(x) - k \]

For example, to obtain \(y = \log_2(x) - 2 \) from \(y = \log_2(x)\).

=”Blue curve is y=\log_2{(x)}. This approaches the y-axis from the right, and intercepts x-axis through (1,0). Green curve is y=\log_2{(x)-2}. This is the same graph shifted down to pass through (1,-2).

The blue curve represents \(y = \log_2(x) \), and the green represents \(y = \log_2(x) - 2 \).

The original graph of \(y = \log_2(x) \) is now shifted down by \(2\) units.

Inverse relationship between exponential and logarithmic functions

The exponential function and the logarithmic function are inverses of each other, meaning they ‘undo’ each other’s operations.

If the exponential function is given by \(f(x) = a^x\) where \( a \in \mathbb{R}^+ \setminus \{1\} \), then its inverse is the logarithmic function \(g(x) = \log_{a}(x)\) where  \( a \in \mathbb{R}^+ \setminus \{ 1 \}\). This relationship implies that applying the logarithmic function to the result of an exponential function returns the original input, and vice versa.

For example, if \(y = a^x\), then taking \(\log_{a}(y)\) yields \(x\), because \(\log_{a}(a^x) = x\). Similarly, if \(y = \log_{a}(x)\), then \( a^y = a^{\log_{a}(x)} = x \).

This inverse relationship is a fundamental property that links these two functions and forms the basis for solving equations involving exponential growth or decay and their corresponding logarithmic expressions.

Properties of inverses

Explanation using graph Summary of properties

Graphs of y=x (red), f(x)=2^x (blue) and g(x)=og_2(x) (green),

  • The blue curve represents an exponential function which is given by the rule of  \(f\left(x\right) = 2^x\)
  • The green curve represents a logarithmic function which is given by the rule of \(g\left(x\right) = \log_2{(x)}\)
  • The red straight line represents a linear function which is given by the rule of \(y = x\)
  1. \(x\) values and \(y\) values are swapped if two functions have inverse relationship. For example, the point \((1,2)\) lying on \(f(x)\) is now swapped to \((2,1)\) on \(g(x)\).
  2. The domain of the original function is the range of the inverse. For example, the domain of exponential functions is \(\mathbb{R}\), and the range of logarithmic functions is \(\mathbb{R}\).
  3. The range of the original function is the domain of the inverse. For example, the range of \(f\left(x\right) = 2^x\) is \(\left(0,\infty\right)\), and the domain of \(g\left(x\right) = \log_2{(x)}\) is also \(\left(0,\infty\right)\).
  4. The graph of an inverse function is a reflection of the original function in the line \(y = x\).