We've updated our
Privacy Policy effective December 15. Please read our updated Privacy Policy and tap

Study Guides > Intermediate Algebra

Read: Graphs of Logarithmic Functions

LEARNING OBJECTIVES

  • Identify the domain of a logarithmic function.
  • Graph logarithmic functions.

Before working with graphs, we will take a look at the domain (the set of input values) for which the logarithmic function is defined.

Recall that the exponential function is defined as [latex]y={b}^{x}[/latex] for any real number x and constant [latex]b>0[/latex], [latex]b\ne 1[/latex], where

  • The domain of y is [latex]\left(-\infty ,\infty \right)[/latex].
  • The range of y is [latex]\left(0,\infty \right)[/latex].

In the last section we learned that the logarithmic function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is the inverse of the exponential function [latex]y={b}^{x}[/latex]. So, as inverse functions:

  • The domain of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is the range of [latex]y={b}^{x}[/latex]:[latex]\left(0,\infty \right)[/latex].
  • The range of [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] is the domain of [latex]y={b}^{x}[/latex]: [latex]\left(-\infty ,\infty \right)[/latex].

How To: Given a logarithmic function, identify the domain.

  1. Set up an inequality showing the argument greater than zero.
  2. Solve for x.
  3. Write the domain in interval notation.
In our first example we will show how to identify the domain of a logarithmic function.

Example

What is the domain of [latex]f\left(x\right)={\mathrm{log}}_{2}\left(x+3\right)[/latex]?

Answer:

The logarithmic function is defined only when the input is positive, so this function is defined when [latex]x+3>0[/latex]. Solving this inequality,

[latex]\begin{array}{c}x+3>0\hfill & \text{The input must be positive}.\hfill \\ x>-3\hfill & \text{Subtract 3}.\hfill \end{array}[/latex]

The domain of [latex]f\left(x\right)={\mathrm{log}}_{2}\left(x+3\right)[/latex] is [latex]\left(-3,\infty \right)[/latex].

Here is another example of how to identify the domain of a logarithmic function.

Example

What is the domain of [latex]f\left(x\right)=\mathrm{log}\left(5 - 2x\right)[/latex]?

Answer:

The logarithmic function is defined only when the input is positive, so this function is defined when [latex]5 - 2x>0[/latex]. Solving this inequality,

[latex]\begin{array}{c}5 - 2x>0\hfill & \text{The input must be positive}.\hfill \\ -2x>-5\hfill & \text{Subtract }5.\hfill \\ x<\frac{5}{2}\hfill & \text{Divide by }-2\text{ and switch the inequality}.\hfill \end{array}[/latex]

The domain of [latex]f\left(x\right)=\mathrm{log}\left(5 - 2x\right)[/latex] is [latex]\left(-\infty ,\frac{5}{2}\right)[/latex].

 Graph logarithmic functions

Creating a graphical representation of most functions gives us another layer of insight for predicting future events. How do logarithmic graphs give us insight into situations? Because every logarithmic function is the inverse function of an exponential function, we can think of every output on a logarithmic graph as the input for the corresponding inverse exponential equation. In other words, logarithms give the cause for an effect.

To illustrate, suppose we invest $2500 in an account that offers an annual interest rate of [latex]5\%[/latex], compounded continuously. We already know that the balance in our account for any year t can be found with the equation [latex]A=2500{e}^{0.05t}[/latex].

But what if we wanted to know the year for any balance? We would need to create a corresponding new function by interchanging the input and the output; thus we would need to create a logarithmic model for this situation. By graphing the model, we can see the output (year) for any input (account balance). For instance, what if we wanted to know how many years it would take for our initial investment to double? Figure 1 shows this point on the logarithmic graph.
A graph titled, Figure 1

Now that we have a feel for the set of values for which a logarithmic function is defined, we move on to graphing logarithmic functions. The family of logarithmic functions includes the parent function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex] along with all its transformations: shifts, stretches, compressions, and reflections.

We begin with the parent function [latex]y={\mathrm{log}}_{b}\left(x\right)[/latex]. Because every logarithmic function of this form is the inverse of an exponential function with the form [latex]y={b}^{x}[/latex], their graphs will be reflections of each other across the line [latex]y=x[/latex]. To illustrate this, we can observe the relationship between the input and output values of [latex]y={2}^{x}[/latex] and its equivalent [latex]x={\mathrm{log}}_{2}\left(y\right)[/latex] in the table below.

x [latex]–3[/latex] [latex]–2[/latex] [latex]–1[/latex] [latex]0[/latex] [latex]1[/latex] [latex]2 [latex]3[/latex]
[latex]{2}^{x}=y[/latex] [latex]\frac{1}{8}[/latex] [latex]\frac{1}{4}[/latex] [latex]\frac{1}{2}[/latex] [latex]1[/latex] [latex]2[/latex] [latex]4 [latex]8[/latex]
[latex]{\mathrm{log}}_{2}\left(y\right)=x[/latex] [latex]–3[/latex] [latex]–2[/latex] [latex]–1[/latex] [latex]0[/latex] [latex]1[/latex] [latex]2 [latex]3[/latex]

Using the inputs and outputs from the table above, we can build another table to observe the relationship between points on the graphs of the inverse functions [latex]f\left(x\right)={2}^{x}[/latex] and [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex].

[latex]f\left(x\right)={2}^{x}[/latex] [latex]\left(-3,\frac{1}{8}\right)[/latex] [latex]\left(-2,\frac{1}{4}\right)[/latex] [latex]\left(-1,\frac{1}{2}\right)[/latex] [latex]\left(0,1\right)[/latex] [latex]\left(1,2\right)[/latex] [latex]\left(2,4\right)[/latex] [latex]\left(3,8\right)[/latex]
[latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] [latex]\left(\frac{1}{8},-3\right)[/latex] [latex]\left(\frac{1}{4},-2\right)[/latex] [latex]\left(\frac{1}{2},-1\right)[/latex] [latex]\left(1,0\right)[/latex] [latex]\left(2,1\right)[/latex] [latex]\left(4,2\right)[/latex] [latex]\left(8,3\right)[/latex]

As we’d expect, the x- and y-coordinates are reversed for the inverse functions. The figure below shows the graph of f and g.

Graph of two functions, f(x)=2^x and g(x)=log_2(x), with the line y=x denoting the axis of symmetry.

 Notice that the graphs of [latex]f\left(x\right)={2}^{x}[/latex] and [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] are reflections about the line = x.

Observe the following from the graph:

  • [latex]f\left(x\right)={2}^{x}[/latex] has a y-intercept at [latex]\left(0,1\right)[/latex] and [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex] has an x-intercept at [latex]\left(1,0\right)[/latex].
  • The domain of [latex]f\left(x\right)={2}^{x}[/latex], [latex]\left(-\infty ,\infty \right)[/latex], is the same as the range of [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex].
  • The range of [latex]f\left(x\right)={2}^{x}[/latex], [latex]\left(0,\infty \right)[/latex], is the same as the domain of [latex]g\left(x\right)={\mathrm{log}}_{2}\left(x\right)[/latex].

A General Note: Characteristics of the Graph of the Parent Function, f(x) = logb(x)

For any real number x and constant > 0, [latex]b\ne 1[/latex], we can see the following characteristics in the graph of [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex]:

  • one-to-one function
  • vertical asymptote: =[latex]0[/latex]
  • domain: [latex]\left(0,\infty \right)[/latex]
  • range: [latex]\left(-\infty ,\infty \right)[/latex]
  • x-intercept: [latex]\left(1,0\right)[/latex] and key point [latex]\left(b,1\right)[/latex]
  • y-intercept: none
  • increasing if [latex]b>1[/latex]
  • decreasing if[latex]0[/latex < <em>b </em><[latex]1[/latex]
Two graphs of the function f(x)=log_b(x) with points (1,0) and (b, 1). The first graph shows the line when b>1, and the second graph shows the line when 0<b<1. Figure 3
Figure [latex]3[/latex] shows how changing the base b in [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex] can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function [latex]\mathrm{ln}\left(x\right)[/latex] has base [latex]e\approx \text{2}.\text{718.)}[/latex]
Graph of three equations: y=log_2(x) in blue, y=ln(x) in orange, and y=log(x) in red. The y-axis is the asymptote. Figure 4. The graphs of three logarithmic functions with different bases, all greater than 1.
In our first example we will graph a logarithmic function of the form [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex].

Example

Graph [latex]f\left(x\right)={\mathrm{log}}_{5}\left(x\right)[/latex]. State the domain, range.

Answer:

Before graphing, identify the behavior and key points for the graph.

  • Since =[latex]5[/latex] is greater than one, we know the function is increasing. The left tail of the graph will approach the vertical line =[latex]0[/latex], and the right tail will increase slowly without bound.
  • The x-intercept is [latex]\left(1,0\right)[/latex].
  • The key point [latex]\left(5,1\right)[/latex] is on the graph.
  • We plot and label the points, and draw a smooth curve through the points.
Graph of f(x)=log_5(x) with labeled points at (1, 0) and (5, 1). The y-axis is the asymptote.

Figure 5. The domain is [latex]\left(0,\infty \right)[/latex], the range is [latex]\left(-\infty ,\infty \right)[/latex].

How To: Given a logarithmic function with the form [latex]f\left(x\right)={\mathrm{log}}_{b}\left(x\right)[/latex], graph the function.

  1. Plot the x-intercept, [latex]\left(1,0\right)[/latex].
  2. Plot the key point [latex]\left(b,1\right)[/latex].
  3. Draw a smooth curve through the points.
  4. State the domain, [latex]\left(0,\infty \right)[/latex], the range, [latex]\left(-\infty ,\infty \right)[/latex].

Summary

To define the domain of a logarithmic function algebraically, set the argument greater than zero and solve. To plot a logarithmic function, it is easiest to find and plot the x-intercept, and the key point[latex]\left(b,1\right)[/latex].

Licenses & Attributions

CC licensed content, Shared previously

  • Precalculus. Provided by: OpenStax Authored by: Jay Abramson, et al.. Located at: https://openstax.org/books/precalculus/pages/1-introduction-to-functions. License: CC BY: Attribution. License terms: Download For Free at : http://cnx.org/contents/[email protected]..