4.4: Graphs of Logarithmic Functions
Finding the Domain of a Logarithmic Function
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 \(y=b^x\) for any real number \(x\) and constant \(b>0\), \(b≠1\), where
- The domain of \(y\) is \((−\infty,\infty)\).
- The range of \(y\) is \((0,\infty)\).
In the last section we learned that the logarithmic function \(y={\log}_b(x)\) is the inverse of the exponential function \(y=b^x\). So, as inverse functions:
- The domain of \(y={\log}_b(x)\) is the range of \(y=b^x\): \((0,\infty)\).
- The range of \(y={\log}_b(x)\) is the domain of \(y=b^x\): \((−\infty,\infty)\).
Transformations of the parent function \(y={\log}_b(x)\) behave similarly to those of other functions. Just as with other parent functions, we can apply the four types of transformations—shifts, stretches, compressions, and reflections—to the parent function without loss of shape.
In Graphs of Exponential Functions we saw that certain transformations can change the range of \(y=b^x\). Similarly, applying transformations to the parent function \(y={\log}_b(x)\) can change the domain . When finding the domain of a logarithmic function, therefore, it is important to remember that the domain consists only of positive real numbers . That is, the argument of the logarithmic function must be greater than zero.
For example, consider \(f(x)={\log}_4(2x−3)\). This function is defined for any values of \(x\) such that the argument, in this case \(2x−3\),is greater than zero. To find the domain, we set up an inequality and solve for \(x\):
\[\begin{align*} 2x-3&> 0 \qquad \text {Show the argument greater than zero}\\ 2x&> 3 \qquad \text{Add 3} \\ x&> 1.5 \qquad \text{Divide by 2} \\ \end{align*}\]
In interval notation, the domain of \(f(x)={\log}_4(2x−3)\) is \((1.5,\infty)\).
- Set up an inequality showing the argument greater than zero.
- Solve for \(x\).
- Write the domain in interval notation.
Graphing 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={\log}_b(x)\) along with all its transformations: shifts, stretches, compressions, and reflections.
We begin with the parent function \(y={\log}_b(x)\). Because every logarithmic function of this form is the inverse of an exponential function with the form \(y=b^x\), their graphs will be reflections of each other across the line \(y=x\). To illustrate this, we can observe the relationship between the input and output values of \(y=2^x\) and its equivalent \(x={\log}_2(y)\) in Table \(\PageIndex{1}\).
| \(x\) | \(−3\) | \(−2\) | \(−1\) | \(0\) | \(1\) | \(2\) | \(3\) |
|---|---|---|---|---|---|---|---|
| \(2^x=y\) | \(\dfrac{1}{8}\) | \(\dfrac{1}{4}\) | \(\dfrac{1}{2}\) | \(1\) | \(2\) | \(4\) | \(8\) |
| \({\log}_2(y)=x\) | \(−3\) | \(−2\) | \(−1\) | \(0\) | \(1\) | \(2\) | \(3\) |
Using the inputs and outputs from Table \(\PageIndex{1}\), we can build another table to observe the relationship between points on the graphs of the inverse functions \(f(x)=2^x\) and \(g(x)={\log}_2(x)\). See Table \(\PageIndex{2}\).
| \(f(x)=2^x\) | \(\left(−3,\dfrac{1}{8}\right)\) | \(\left(−2,\dfrac{1}{4}\right)\) | \(\left(−1,\dfrac{1}{2}\right)\) | \((0,1)\) | \((1,2)\) | \((2,4)\) | \((3,8)\) |
|---|---|---|---|---|---|---|---|
| \(g(x)={\log}_2(x)\) | \(\left(\dfrac{1}{8},−3\right)\) | \(\left(\dfrac{1}{4},−2\right)\) | \(\left(\dfrac{1}{2},−1\right)\) | \((1,0)\) | \((2,1)\) | \((4,2)\) | \((8,3)\) |
As we’d expect, the \(x\)- and \(y\)-coordinates are reversed for the inverse functions. Figure \(\PageIndex{2}\) shows the graph of \(f\) and \(g\).
Observe the following from the graph:
- \(f(x)=2^x\) has a \(y\)-intercept at \((0,1)\) and \(g(x)={\log}_2(x)\) has an \(x\)- intercept at \((1,0)\).
- The domain of \(f(x)=2^x\), \((−\infty,\infty)\), is the same as the range of \(g(x)={\log}_2(x)\).
- The range of \(f(x)=2^x\), \((0,\infty)\), is the same as the domain of \(g(x)={\log}_2(x)\).
For any real number \(x\) and constant \(b>0\), \(b≠1\), we can see the following characteristics in the graph of \(f(x)={\log}_b(x)\):
- one-to-one function
- vertical asymptote: \(x=0\)
- domain: \((0,\infty)\)
- range: \((−\infty,\infty)\)
- \(x\) - intercept: \((1,0)\) and key point \((b,1)\)
- \(y\)-intercept: none
- increasing if \(b>1\)
- decreasing if \(0<b<1\)
See Figure \(\PageIndex{3}\).
Figure \(\PageIndex{4}\) shows how changing the base \(b\) in \(f(x)={\log}_b(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)\) has base \(e≈2.718\).)
- Draw and label the vertical asymptote, \(x=0\).
- Plot the x- intercept, \((1,0)\).
- Plot the key point \((b,1)\).
- Draw a smooth curve through the points.
- State the domain, \((0,\infty)\),the range, \((−\infty,\infty)\), and the vertical asymptote, \(x=0\).
Graphing Transformations of Logarithmic Functions
As we mentioned in the beginning of the section, transformations of logarithmic graphs behave similarly to those of other parent functions. We can shift, stretch, compress, and reflect the parent function \(y={\log}_b(x)\) without loss of shape.
Graphing a Horizontal Shift of \(f(x) = log_b(x)\)
When a constant \(c\) is added to the input of the parent function \(f(x)={\log}_b(x)\), the result is a horizontal shift \(c\) units in the opposite direction of the sign on \(c\). To visualize horizontal shifts, we can observe the general graph of the parent function \(f(x)={\log}_b(x)\) and for \(c>0\) alongside the shift left, \(g(x)={\log}_b(x+c)\), and the shift right, \(h(x)={\log}_b(x−c)\). See Figure \(\PageIndex{7}\).
For any constant \(c\),the function \(f(x)={\log}_b(x+c)\)
- shifts the parent function \(y={\log}_b(x)\) left \(c\) units if \(c>0\).
- shifts the parent function \(y={\log}_b(x)\) right \(c\) units if \(c<0\).
- has the vertical asymptote \(x=−c\).
- has domain \((−c,\infty)\).
- has range \((−\infty,\infty)\).
-
Identify the horizontal shift:
- If \(c>0\),shift the graph of \(f(x)={\log}_b(x)\) left \(c\) units.
- If \(c<0\),shift the graph of \(f(x)={\log}_b(x)\) right \(c\) units.
- Draw the vertical asymptote \(x=−c\).
- Identify three key points from the parent function. Find new coordinates for the shifted functions by subtracting \(c\) from the \(x\) coordinate.
- Label the three points.
- The Domain is \((−c,\infty)\),the range is \((−\infty,\infty)\), and the vertical asymptote is \(x=−c\).
Graphing Reflections of \(f(x) = log_b(x)\)
When the parent function \(f(x)={\log}_b(x)\) is multiplied by \(−1\),the result is a reflection about the \(x\)-axis. When the input is multiplied by \(−1\),the result is a reflection about the \(y\)-axis. To visualize reflections, we restrict \(b>1\), and observe the general graph of the parent function \(f(x)={\log}_b(x)\) alongside the reflection about the \(x\)-axis, \(g(x)=−{\log}_b(x)\) and the reflection about the \(y\)-axis, \(h(x)={\log}_b(−x)\).
The function \(f(x)=−{\log}_b(x)\)
- reflects the parent function \(y={\log}_b(x)\) about the \(x\)-axis.
- has domain, \((0,\infty)\), range, \((−\infty,\infty)\), and vertical asymptote, \(x=0\), which are unchanged from the parent function.
The function \(f(x)={\log}_b(−x)\)
- reflects the parent function \(y={\log}_b(x)\) about the \(y\)-axis.
- has domain \((−\infty,0)\).
- has range, \((−\infty,\infty)\), and vertical asymptote, \(x=0\), which are unchanged from the parent function.
| If \(f(x)=−{\log}_b(x)\) | If \(f(x)={\log}_b(−x)\) |
|---|---|
|
|
|
|
|
|
|
|
|
|