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=logb(x) along with all its transformations: shifts, stretches, compressions, and reflections.

We begin with the parent function y=logb(x)y=logb(x). Because every logarithmic function of this form is the inverse of an exponential function with the form y=bxy=bx, 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=2x and its equivalent x=log2(y)x=log2(y) in the table below.

x –3 –2 –1 0 1 2 3
2x=y2x=y 1818 1414 1212 1 2 4 8
log2(y)=xlog2(y)=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(x)=2x and g(x)=log2(x)g(x)=log2(x).

f(x)=2xf(x)=2x (3,18)(3,18) (2,14)(2,14) (1,12)(1,12) (0,1)(0,1) (1,2)(1,2) (2,4)(2,4) (3,8)(3,8)
g(x)=log2(x)g(x)=log2(x) (18,3)(18,3) (14,2)(14,2) (12,1)(12,1) (1,0)(1,0) (2,1)(2,1) (4,2)(4,2) (8,3)(8,3)

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(x)=2x and g(x)=log2(x)g(x)=log2(x) are reflections about the line = x.

Observe the following from the graph:

  • f(x)=2xf(x)=2x has a y-intercept at (0,1)(0,1) and g(x)=log2(x)g(x)=log2(x) has an x-intercept at (1,0)(1,0).
  • The domain of f(x)=2xf(x)=2x, (,)(,), is the same as the range of g(x)=log2(x)g(x)=log2(x).
  • The range of f(x)=2xf(x)=2x, (0,)(0,), is the same as the domain of g(x)=log2(x)g(x)=log2(x).

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

For any real number x and constant > 0, b1b1, we can see the following characteristics in the graph of f(x)=logb(x)f(x)=logb(x):

  • one-to-one function
  • vertical asymptote: = 0
  • domain: (0,)(0,)
  • range: (,)(,)
  • x-intercept: (1,0)(1,0) and key point (b,1)(b,1)
  • 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(x)=logb(x) can affect the graphs. Observe that the graphs compress vertically as the value of the base increases. (Note: recall that the function ln(x)ln(x) has base e2.718.)e2.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(x)=logb(x), graph the function.

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

Example 3: Graphing a Logarithmic Function with the Form f(x)=logb(x)f(x)=logb(x).

Graph f(x)=log5(x)f(x)=log5(x). 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)(1,0).
  • The key point (5,1)(5,1) 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,)(0,), the range is (,)(,), and the vertical asymptote is x = 0.

Try It 3

Graph f(x)=log15(x)f(x)=log15(x). State the domain, range, and asymptote.

Solution