# Graphing Logarithmic Functions The graph of a logarithmic function has a vertical asymptote and is defined on only one side of the asymptote.
The graph of a logarithmic function is a curve with a vertical asymptote. An asymptote is a line that a graph approaches as one of the variables approaches infinity or negative infinity. The $y$-axis is the asymptote for a graph of a logarithmic function in the form:
$f(x)=\log_b{x}$
It also has an $x$-intercept of $(1, 0)$. If $b>1$, the graph will also contain the point $(b, 1)$. The domain is $x>0$, and the range is all real numbers. Using interval notation, the domain is $(0, \infty)$ and the range is $(-\infty, \infty)$. The graph of a logarithmic function is a curve with a vertical asymptote. Graphs of the logarithmic functions for logarithms with bases 2 and 10, as well as the natural logarithm function, each have a vertical asymptote at x=0x=0x=0. Each graph also contains the point (1,0)(1, 0)(1,0).

### Evaluating Logarithmic Functions Logarithmic functions can be evaluated to plot points on a graph.
As with all functions, each input of a logarithmic function is associated with a single output. When evaluating a logarithmic function to generate a set of ordered pairs, it can be helpful to choose values of $x$ that will result in integer values of $f(x)$. Then plot the ordered pairs and connect them with a smooth curve to graph the function.
Step-By-Step Example
Graphing a Logarithmic Function
Graph the logarithmic function:
$f(x)=\log_5{x}$
Step 1

Analyze the equation of the function.

$f(x)=\log_5{x}$

The base of the logarithm is 5. So, the values of $x$ represent powers of 5. The values of $f(x)$ represent the exponents of those powers.

Step 2

Choose several values of $x$ that are whole-number powers of 5.

Since $5^0=1$, start with 1. Then keep multiplying by 5 to generate other powers of 5.

$x$
Explanation
$1$
$5^{0}=1$
$5$
$5^{1}=5$
$25$
$5^{2}=25$
$125$
$5^{3}=125$
$625$
$5^{4}=625$
Step 3

Use the relationship between logarithms and exponents to identify the corresponding values of $f(x)$.

$x$
$f(x)=\log_5{x}$
Explanation
$1$
$0$
The logarithmic form of $5^{0}=1$ is $\log_{5}1=0$.
$5$
$1$
The logarithmic form of $5^{1}=5$ is $\log_{5}5=1$.
$25$
$2$
The logarithmic form of $5^{2}=25$ is $\log_{5}25=2$.
$125$
$3$
The logarithmic form of $5^{3}=125$ is $\log_{5}125=3$.
$625$
$4$
The logarithmic form of $5^{4}=625$ is $\log_{5}625=4$.
Solution
Plot the ordered pairs, and connect them with a smooth curve. The function has the form:
$f(x)=\log_b{x}$
So, the graph has a vertical asymptote at $x=0$.
A parent function is a function of a certain type that has the simplest algebraic rule. The parent logarithmic function using a common logarithm, or base 10, is:
$f(x)=\log{x}$
The parent logarithmic function using a natural logarithm, or base $e$, is:
$f(x)=\ln{x}$
Graphing the parent functions using the log and ln functions on a calculator makes them easier to identify. The graphs of both f(x)=log⁡xf(x)=\log{x}f(x)=logx and f(x)=ln⁡xf(x)=\ln{x}f(x)=lnx contain the point (1,0)(1, 0)(1,0) and have the yyy-axis as an asymptote. The curve for f(x)=log⁡xf(x)=\log{x}f(x)=logx contains the point (10,1)(10, 1)(10,1). The curve for f(x)=ln⁡xf(x)=\ln{x}f(x)=lnx contains the point (e,1)(e, 1)(e,1).

### Analyzing the Base of a Logarithmic Function For a logarithmic function of the form $f(x)=\log_b{x}$, the value of $b$ determines whether the function is increasing or decreasing.
If $b > 1$, the graph of a logarithmic function of the form $f(x)=\log_b{x}$ is always increasing as values of $x$ increase. If $0 < b < 1$ , the graph is always decreasing as values of $x$ increase. The graphs of f(x)=log⁡bxf(x)=\log_b{x}f(x)=logb​x and f(x)=log⁡1bxf(x)=\log_{\footnotesize{\frac{1}{b}}}{x}f(x)=logb1​​x are shown, where b>1b>1b>1. The value of f(x)=log⁡bxf(x)=\log_b{x}f(x)=logb​x is increasing for x>0x>0x>0, and the graph of f(x)=log⁡1bxf(x)=\log_{\footnotesize{\frac{1}{b}}}{x}f(x)=logb1​​x is decreasing for x>0x>0x>0.
The reciprocal of a nonzero number $b$ is $\frac{1}{b}$. The bases of these logarithmic functions are $b$ and $\frac{1}{b}$:
$f(x)=\log_b{x}\;\;\;\;\;$
So, the bases are reciprocals. The graphs of logarithmic functions with reciprocal bases are reflections of each other across the $x$-axis.
Step-By-Step Example
Graphing Logarithms with Reciprocal Bases
Use the properties of logarithmic graphs to graph the two functions:
$f(x)=\log_2{x}\;\;\;\;\;f(x)=\log_{\footnotesize{\frac{1}{2}}}{x}$
Step 1

Evaluate the first function to identify several ordered pairs on the graph.

$x$
$f(x)=\log_{2}x$
Explanation
$0.25$
$-2$
The logarithmic form of $2^{-2}=0.25$ is $\log_{2}0.25=-2$.
$0.5$
$-1$
The logarithmic form of $2^{-1}=0.5$ is $\log_{2}0.5=-1$.
$2$
$1$
The logarithmic form of $2^{1}=2$ is $\log_{2}2=1$.
$4$
$2$
The logarithmic form of $2^{2}=4$ is $\log_2{4}=2$.
Step 2
Use the ordered pairs from the first function to generate ordered pairs for the second function:
$f(x)=\log_{\footnotesize{\frac{1}{2}}}{x}$
The functions are reflections of each other across the $x$-axis because their bases are reciprocals. To reflect an ordered pair across the $x$-axis, keep the $x$-coordinate the same, but use the opposite $y$-coordinate.
$x$
$f(x)=\log_{\footnotesize{\frac{1}{2}}}{x}$
$0.25$
$2$
$0.5$
$1$
$2$
$-1$
$4$
$-2$
Solution

Determine the $x$-intercept and the asymptote.

A logarithmic function in the form $f(x)=log_{b}x$ has an $x$-intercept of $(1, 0)$ and the $y$-axis as the vertical asymptote. Therefore, the logarithmic function has an $x$-intercept at $(1, 0)$ with the $y$-axis as the vertical asymptote.

Plot the $x$-intercept and the ordered pairs. Connect them with continuous curves.
The first function, $f(x)=\log_{2}x$ is increasing.

The second function, $f(x)=\log_{\footnotesize{\frac{1}{2}}}x$ is decreasing.

### Transformations of Logarithmic Functions Transformations can be used to graph logarithmic functions.
Transformations of logarithmic graphs are similar to transformations of other parent functions. For example, a logarithmic parent function takes on the form:
$f(x)=\log_b{x}$
It can be translated vertically $k$ units and horizontally $h$ units. It can also be stretched or compressed by a factor of $a$. In addition, it can be reflected across the $x$-axis or $y$-axis.

### Translations of Logarithmic Functions

Vertical Translations Horizontal Translations
For the graph of $f(x)=\log_b{x}$ and $k>0$:
• The graph of $f(x)+k=\log_b{x}+k$ is translated up by $k$ units.
• The graph of $f(x)-k=\log_b{x}-k$ is translated down by $k$ units.
For the graph of $f(x)=\log_b{x}$ and $h>0$:
• The graph of $f(x-h)=\log_b{(x-h)}$ is translated right by $h$ units.
• The graph of $f(x+h)=\log_b{(x+h)}$ is translated left by $h$ units.

### Stretches, Compressions, and Reflections of Logarithmic Functions

Stretches and Compressions Reflections
For the graph of $f(x)=\log_b{x}$ and $a>0$:
• The graph of $af(x)=a\cdot \log_b{x}$ is a vertical stretch of the graph of $f(x)$ by a factor of $a$ if $a>1$.
• The graph of $af(x)=a\cdot \log_b{x}$ is a vertical compression of the graph of $f(x)$ by a factor of $a$ if $0 \lt a \lt 1$.
For the graph of $f(x)=\log_b{x}$:
• The graph of $-f(x)=-\log_b{x}$ is a reflection of the graph of $f(x)$ across the $x$-axis.
• The graph of $f(-x)=\log_b{(-x)}$ is a reflection of the graph of $f(x)$ across the $y$-axis.

As an example, examine the functions:
$f(x)=\log_2{(x+1)}\hspace{20pt}f(x)=-\log_2{x}\hspace{20pt}f(x)=\log_2{x}-3$
All of them have the same parent function:
$f(x)=\log_2{x}$
The way in which the parent function is transformed depends on the function rules. The rule for the first function indicates a horizontal translation of 1 unit to the left:
$f(x)=\log_2{(x{\color{#c42126}{+1}})}$
The rule for the second function indicates a reflection over the $x$-axis:
$f(x)={\color{#c42126}{-}}\log_2{x}$
The rule for the third function indicates a vertical translation of 3 units down:
$f(x)=\log_2{x}{\color{#c42126}{-3}}$

### Transformations of $y=\log_2{x}$

$f(x)=\log_2{(x+1)}$ $f(x)=-\log_2{x}$ $f(x)=\log_2{x}-3$
The graph shifts left 1 unit. The graph reflects across the $x$-axis. The graph shifts down 3 units.

Step-By-Step Example
Graphing Logarithms Using Transformations
Graph the given logarithmic function:
$f(x)=-\!\log_2{(x+1)}-3$
Step 1

Identify the parent function.

The base in the logarithm in the given function is 2. So, the parent function is the simplest logarithmic function with base 2.

The parent function is:
$f(x)=\log_2{x}$
Step 2
Determine whether there is a reflection by rewriting the given function:
$f(x)=-1\cdot\log_2{(x+1)}-3$
The logarithmic expression on the right side has a –1. Therefore, the graph of the parent function is reflected over the $x$-axis. Graph the reflection of the parent function.
Solution

Determine whether there are any translations.

• Since $h=1$, there is a translation 1 unit to the left.
• Since $k=-3$, there is a translation 3 units down.
Graph the translations to produce the graph of the given function:
$f(x)=-\log_2{(x+1)}-3$