The Logarithm

A logarithm is the inverse operation of exponentiation. It answers the question "to what power must I raise the base to obtain this number?" Logarithms appear throughout mathematics, science, and engineering: the pH scale, decibel levels, the Richter scale, and compound interest formulas all rely on them. This section introduces the definition and the five core logarithm rules (also called log rules or properties of logarithms).

Quick Reference: Logarithm Rules Chart

The table below summarizes the logarithm rules covered in this section. Here $b>0$, $b\neq1$, and $u,v>0$.

Rule name Formula
Product Rule $\log_{b}(uv)=\log_{b}u+\log_{b}v$
Quotient Rule $\log_{b}(u/v)=\log_{b}u-\log_{b}v$
Power Rule $\log_{b}(u^{n})=n\log_{b}u$
Zero Rule $\log_{b}1=0$
Identity Rule $\log_{b}b=1$
Reciprocal Rule $\log_{b}(1/u)=-\log_{b}u$
Change of Base $\log_{b}u=\dfrac{\log_{c}u}{\log_{c}b}$

Definition: What Is a Logarithm?

If we raise a number $b>0$ ($b\neq1$) to a power $r$ and obtain $u$, then $r$ is called the logarithm of $u$ to the base $b$, written $r=\log_{b}u$. In other words, the two equations

$ u=b^{r} \tag{a} $$ r=\log_{b}u \tag{b} $

are simply two different ways of expressing the same relationship between $b$, $r$, and $u$:

$ u = b^r \quad\Longleftrightarrow\quad r = \log_b u $

Equation (a) is the exponential form; equation (b) is the logarithmic form. Converting fluently between them is the key skill for working with logarithms.

Examples

Because $2^{3}=8$ and $10^{-4}=0.0001$, we have

$ \log_{2}8=3 \qquad\text{and}\qquad \log_{10}0.0001=-4. $

More examples of converting between exponential and logarithmic form:

Exponential form Logarithmic form
$5^{2}=25$ $\log_{5}25=2$
$3^{0}=1$ $\log_{3}1=0$
$b^{1}=b$ $\log_{b}b=1$
$4^{-1}=\tfrac{1}{4}$ $\log_{4}\tfrac{1}{4}=-1$

Why $u$, the Input of a Logarithm, Must Be Positive

Because $b>0$, we have $u=b^{r}>0$ for every real number $r$. Therefore $\log_{b}u$ is only defined when $u>0$; the logarithm of a non-positive number does not exist (as a real number). The condition $b\neq1$ is also required: if $b=1$ then $b^r=1$ for all $r$, making it impossible to recover $r$ from $u$.

Logarithms and Exponents: Two Sides of the Same Coin

A logarithm is the inverse of an exponent. Just as subtraction undoes addition and division undoes multiplication, $\log_b$ undoes $b^{(\cdot)}$:

$ b^{\log_b u} = u \qquad\text{and}\qquad \log_b(b^r) = r. $

This inverse relationship is why every logarithm rule corresponds exactly to one of the laws of exponents from the previous section. The table below makes the correspondence explicit.

Logarithm rule Corresponding exponent law
$\log_b(uv)=\log_b u+\log_b v$ Product Rule: $b^{r+s}=b^r\cdot b^s$
$\log_b(u/v)=\log_b u-\log_b v$ Quotient Rule: $b^{r-s}=b^r/b^s$
$\log_b(u^n)=n\log_b u$ Power Rule: $(b^r)^s=b^{rs}$
$\log_b 1=0$ Zero Exponent Rule: $b^0=1$
$\log_b b=1$ $b^1=b$

Common Logarithm and Natural Logarithm

Two bases appear so frequently that they have their own notation:

  • Common logarithm (base 10): $\log_{10}u$ is written simply as $\log u$ (no base written). It is the logarithm used in pH chemistry, the Richter scale, and decibel measurements. On a calculator it is the $\log$ button.
  • Natural logarithm (base $e$): $\log_{e}u$ is written as $\ln u$. Here $e\approx2.71828\ldots$ is Euler's number. The natural logarithm appears throughout calculus, physics, and probability. On a calculator it is the $\ln$ button.

All logarithm rules in this section apply to both $\log$ and $\ln$, since they are simply $\log_b$ with $b=10$ and $b=e$ respectively.

Properties of Logarithms

The following five properties follow immediately from the definition. In each case the proof translates the logarithm statement into exponential form, applies one of the laws of exponents, then converts back.

  1. Product Rule: $\log_{b}(uv)=\log_{b}u+\log_{b}v$
  2. Quotient Rule: $\log_{b}(u/v)=\log_{b}u-\log_{b}v$
  3. Power Rule: $\log_{b}(u^{n})=n\log_{b}u$
  4. Zero Rule: $\log_{b}1=0$
  5. Reciprocal Rule: $\log_{b}(1/u)=-\log_{b}u$

We assume $b>0$, $b\neq1$, and $u,v>0$ throughout.

Product Rule: $\log_{b}(uv)=\log_{b}u+\log_{b}v$

The logarithm of a product equals the sum of the logarithms.

Proof Let $p=\log_{b}u$ and $q=\log_{b}v$, so $u=b^{p}$ and $v=b^{q}$. By the Product Rule for exponents: $ uv=b^{p}\cdot b^{q}=b^{p+q}. $ Converting back to logarithmic form: $\log_{b}(uv)=p+q=\log_{b}u+\log_{b}v$. $\square$

Quotient Rule: $\log_{b}(u/v)=\log_{b}u-\log_{b}v$

The logarithm of a quotient equals the difference of the logarithms.

Proof With $p=\log_{b}u$ and $q=\log_{b}v$, so $u=b^{p}$ and $v=b^{q}$. By the Quotient Rule for exponents: $ \frac{u}{v}=\frac{b^{p}}{b^{q}}=b^{p-q}. $ Converting back: $\log_{b}(u/v)=p-q=\log_{b}u-\log_{b}v$. $\square$

Power Rule: $\log_{b}(u^{n})=n\log_{b}u$

An exponent inside a logarithm can be moved out as a multiplier.

Proof Let $p=\log_{b}u$, so $u=b^{p}$. By the Power Rule for exponents: $ u^{n}=(b^{p})^{n}=b^{pn}. $ Converting back: $\log_{b}(u^{n})=pn=n\log_{b}u$. $\square$

Zero Rule: $\log_{b}1=0$

The logarithm of $1$ is always $0$, regardless of the base.

Proof We need the exponent $r$ such that $b^{r}=1$. By the Zero Exponent Rule, $b^{0}=1$, so $r=0$. Therefore $\log_{b}1=0$. $\square$

Reciprocal Rule: $\log_{b}(1/u)=-\log_{b}u$

The logarithm of a reciprocal is the negative of the logarithm.

Proof This follows immediately from the Quotient Rule with $v=u$, using $\log_b 1=0$: $ \log_{b}(1/u)=\log_{b}1-\log_{b}u=0-\log_{b}u=-\log_{b}u. \quad\square $ Alternatively, it follows from the Power Rule with $n=-1$: $\log_{b}(u^{-1})=-1\cdot\log_{b}u=-\log_{b}u$.

Frequently Asked Questions

Why must the base $b$ satisfy $b\neq1$? If $b=1$, then $b^{r}=1^{r}=1$ for every real number $r$. This means the equation $1^{r}=u$ has no solution when $u\neq1$, and infinitely many solutions when $u=1$. Either way, a unique logarithm cannot be defined.
What is the difference between $\log$ and $\ln$? $\log$ (written without a base) denotes the common logarithm, base $10$: $\log u = \log_{10} u$. $\ln$ denotes the natural logarithm, base $e\approx2.71828$: $\ln u=\log_{e}u$. Both satisfy all the logarithm rules above. The natural logarithm is preferred in calculus because its derivative takes a particularly simple form.
How do you convert a logarithm from one base to another? (Change of Base Formula) $ \log_{b}u=\frac{\log_{c}u}{\log_{c}b} $ for any valid base $c>0$, $c\neq1$. In practice, $c=10$ or $c=e$ is used, since most calculators provide only $\log$ and $\ln$ buttons. For example, $\log_{2}5=\dfrac{\log 5}{\log 2}\approx\dfrac{0.699}{0.301}\approx2.322$.
Proof of the Change of Base Formula Let $r=\log_{b}u$, so $u=b^{r}$. Taking $\log_{c}$ of both sides and applying the Power Rule: $ \log_{c}u=\log_{c}(b^{r})=r\log_{c}b. $ Solving for $r$: $ r=\frac{\log_{c}u}{\log_{c}b}, $ which is the Change of Base Formula. $\square$
Why can't you take the logarithm of a negative number? Since $b>0$, the exponential $b^{r}$ is always positive for every real $r$. There is no real exponent $r$ that makes $b^{r}$ negative, so $\log_{b}u$ has no real value when $u\leq0$. (In complex analysis, logarithms of negative numbers can be defined, but they are not real-valued.)
Is $\log_{b}(u+v)$ equal to $\log_{b}u+\log_{b}v$? No. The Product Rule says $\log_{b}(uv)=\log_{b}u+\log_{b}v$ — it applies to a product inside the log, not a sum. There is no simple formula for $\log_{b}(u+v)$.

We will study logarithms in more detail including graphs, equations, and applications in Section: Logarithmic Functions.