**What we learn here:**

Table of Contents

### Definition, Domain, and Range of Logarithms

In the previous section, we learned that for $b>0$, $b^{x}$ is always a positive number. Except for $b=1$, the function $y=b^{x}$ is either increasing or decreasing, and thus is one-to-one. Therefore, for any given $y>0$, there is one and only one value of $x$ that satisfies $b^{x}=y$ (Figure 1). This value of $x$ is called the “**logarithm of y to (or in or with) the base b**” or simply “

**log, base**” and we write

*b*, of*y*\[

x=\log_{b}y.\tag{a}

\] Thus, by definition

\[ \bbox[#F2F2F2,5px,border:2px solid black]{\large x=\log_{b}y\Longleftrightarrow y=b^{x}\qquad(b>0,b\neq1).}\tag{b}\]

For example,

\begin{align*}

\log_{2}16 & =4\Longleftrightarrow2^{4}=16\\

\log_{10}0.001 & =-3\Longleftrightarrow10^{-3}=0.001.

\end{align*}

(a) $y=b^{x}\ (b>1)$ | (b) $y=b^{x}\ (0<b<1)$ |

**Figure 1:** Exponential functions are one-to-one; there exists *exactly one* value of $x$ satisfying $b^{x}=y$ for a given $y>0$.

Equation (a) defines $x$ as a function of $y$:

\[

x=f(y)=\log_{b}y\tag{c}

\]
where *b* is a fixed positive number different from 1. Because we must have $y>0$, the domain of this function is $(0,\infty)$, and because $x$ can be any real number, the range of this function is $(-\infty,\infty)$.

In Equation (c), $x$ and $y$ are two variables simply denoting the input and output of the function. So we can simply show the input by $x$ (instead of $y$) and the output by $y$ (instead of $x$) as we usually do, and write the **logarithmic function** as

\[

y=\log_{b}x,\qquad x>0.

\]

Equation (b) implies that the logarithmic function and exponential function are the inverse of each other. If we substitute $b^{x}$ for $y$ in $x=\log_{b}y$, we obtain

\[

x=\log_{b}b^{x}.

\]
This equation holds for all $x$. If we substitute $\log_{b}y$ for $x$ in $y=b^{x}$, then we obtain

\[

y=b^{\log_{b}y}.

\]
This equation holds for all $y>0$. The cancelation property of inverse functions (Theorem 1 of Section 2.16) read

\begin{align*}

\log_{b}b^{x} & =x\qquad\text{for all }x\\

\\

b^{\log_{b}x} & =x\qquad\text{for }x>0

\end{align*}

As the logarithmic function $\log_{b}x$ and the exponential function $b^{x}$ are inverse functions, the domain of each of them is the range of the other and vice versa.

Let $f(x)=\log_{b}x$ and $g(x)=b^{x}$ then

\begin{align*}

Dom(f) & =Rng(g)=(0,\infty)\\

\\

Rng(f) & =Dom(g)=(-\infty,\infty)

\end{align*}

The best way to remember the above relations is through remembering the graphs of these functions. We learned how the exponential function looks like. Therefore, by its reflection in the line $y=x$, we can easily sketch the graph of the logarithmic functions (Figure 2).

(a) $b>1$ | (b) $0<b<1$ |

**Figure 2:** Graphs of $y=b^{x}$ and $y=\log_{b}x$ are reflections of one another in the line $y=x$. The graph of an exponential function passes through $(0,1)$ and that of a logarithmic function passes through $(1,0).$

- Because $b^{0}=1$, we have $\log_{b}1=0$. Therefore, the graph of $y=\log_{b}x$ passes through $(1,0)$ as we can see in Figure 2.

### Important Properties of Logarithms

Logarithmic functions have very important properties that make them very useful:

**Theorem 1 (**

**Algebraic Properties of Logarithms):**Let $b>1,b\neq1,x>0,y>0$ and $r$ be any real number

(1) the log of a product is the sum of the logs of the factors

\[

\log_{b}(xy)=\log_{b}x+\log_{b}y.\tag{d}

\] (2) the log brings the exponent down to the front of the log

\[

\log_{b}x^{r}=r\log_{b}x.\tag{e}

\] (3) the log of a quotient is the log of the numerator minus the log of the denominator

\[

\log_{b}\left(\frac{y}{x}\right)=\log_{b}y-\log_{b}x.\tag{f}

\]

### Common and Natural Logarithms

Theoretically, any *positive* number, except 1, may be used as the base of a system of logarithms. Practically there are only two numbers so used: the base-10 logarithm and the base-$e$ logarithm where $e=2.718281828\cdots$ is Euler’s number. The base-10 logarithm is more “common” in algebraic settings, trigonometry, and in special kinds of graphs where one or two axes are plotted on logarithmic scales, but as we will see the base-$e$ logarithm is more important in calculus.

The 10-base logarithm is called the **common logarithm** and the base-$e$ logarithm is called the **natural logarithm**.

The common and natural logarithms are so common that they have their own shortened notations:

$\log_{e}x$ is written as $\ln x$

In many computing packages such as MATLAB, Mathematica, and in many computer languages such as Python, C++, and Fortran, “log” simply means the natural logarithm or “ln.” But in calculus “log” often denotes the base-10 logarithm.

- Because in computer science, we work with binary numbers, the base-2

logarithms are very common.

### Change of Base Formula

Many calculators have special keys for the natural and common logarithms (Figure 3), and now the question is: how to calculate the logarithms with base other than 10 or $e$. For example, let it be required to find $\log_{7}373$. If

\[

\log_{7}373=\alpha

\]
then, by definition it means

\[

7^{\alpha}=373.

\]
By Property 2, we have

\[

\alpha\ln7=\ln373,

\]
or

\[

\alpha=\frac{\ln373}{\ln7}=\frac{5.921578}{1.945910}=3.043089.

\]

In general

**Theorem 2 (**

**Change of base formula):**For any positive number $b$ ($b\neq1)$, we have

\[

\log_{b}x=\frac{\ln x}{\ln b}.

\]

Figure 3: The logarithm keys (LOG for base-10 and LN for base-e) on a typical scientific calculator |