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

Study Guides > MATH 1314: College Algebra

Graph logarithmic functions

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 y=logb(x)y={\mathrm{log}}_{b}\left(x\right)\\ along with all its transformations: shifts, stretches, compressions, and reflections.

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

x –3 –2 –1 0 1 2 3
2x=y{2}^{x}=y\\ 18\frac{1}{8}\\ 14\frac{1}{4}\\ 12\frac{1}{2}\\ 1 2 4 8
log2(y)=x{\mathrm{log}}_{2}\left(y\right)=x\\ –3 –2 –1 0 1 2 3

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 f(x)=2xf\left(x\right)={2}^{x}\\ and g(x)=log2(x)g\left(x\right)={\mathrm{log}}_{2}\left(x\right)\\.

f(x)=2xf\left(x\right)={2}^{x}\\ (3,18)\left(-3,\frac{1}{8}\right)\\ (2,14)\left(-2,\frac{1}{4}\right)\\ (1,12)\left(-1,\frac{1}{2}\right)\\ (0,1)\left(0,1\right)\\ (1,2)\left(1,2\right)\\ (2,4)\left(2,4\right)\\ (3,8)\left(3,8\right)\\
g(x)=log2(x)g\left(x\right)={\mathrm{log}}_{2}\left(x\right)\\ (18,3)\left(\frac{1}{8},-3\right)\\ (14,2)\left(\frac{1}{4},-2\right)\\ (12,1)\left(\frac{1}{2},-1\right)\\ (1,0)\left(1,0\right)\\ (2,1)\left(2,1\right)\\ (4,2)\left(4,2\right)\\ (8,3)\left(8,3\right)\\

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.

Figure 2. Notice that the graphs of f(x)=2xf\left(x\right)={2}^{x}\\ and g(x)=log2(x)g\left(x\right)={\mathrm{log}}_{2}\left(x\right)\\ are reflections about the line = x.

Observe the following from the graph:

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

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

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

  • one-to-one function
  • vertical asymptote: = 0
  • domain: (0,)\left(0,\infty \right)\\
  • range: (,)\left(-\infty ,\infty \right)\\
  • x-intercept: (1,0)\left(1,0\right)\\ and key point (b,1)\left(b,1\right)\\
  • y-intercept: none
  • increasing if b>1b>1\\
  • decreasing if 0 < < 1
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 3 shows how changing the base b in f(x)=logb(x)f\left(x\right)={\mathrm{log}}_{b}\left(x\right)\\ can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function ln(x)\mathrm{ln}\left(x\right)\\ has base e2.718.)e\approx \text{2}.\text{718.)}\\
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.

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

  1. Draw and label the vertical asymptote, x = 0.
  2. Plot the x-intercept, (1,0)\left(1,0\right)\\.
  3. Plot the key point (b,1)\left(b,1\right)\\.
  4. Draw a smooth curve through the points.
  5. State the domain, (0,)\left(0,\infty \right)\\, the range, (,)\left(-\infty ,\infty \right)\\, and the vertical asymptote, x = 0.

Example 3: Graphing a Logarithmic Function with the Form f(x)=logb(x)f\left(x\right)={\mathrm{log}}_{b}\left(x\right)\\.

Graph f(x)=log5(x)f\left(x\right)={\mathrm{log}}_{5}\left(x\right)\\. State the domain, range, and asymptote.

Solution

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

  • Since = 5 is greater than one, we know the function is increasing. The left tail of the graph will approach the vertical asymptote = 0, and the right tail will increase slowly without bound.
  • The x-intercept is (1,0)\left(1,0\right)\\.
  • The key point (5,1)\left(5,1\right)\\ is on the graph.
  • We draw and label the asymptote, 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 (0,)\left(0,\infty \right)\\, the range is (,)\left(-\infty ,\infty \right)\\, and the vertical asymptote is x = 0.

Try It 3

Graph f(x)=log15(x)f\left(x\right)={\mathrm{log}}_{\frac{1}{5}}\left(x\right)\\. State the domain, range, and asymptote.

Solution

Licenses & Attributions