---
title: Logarithms
subtitle: The inverse of the exponential, its graphs, and the laws with proofs
author: Mathematics Department
organization: Your School
date: 2026-09-09
description: A complete high-school lesson defining the logarithm as the inverse of the exponential, establishing its domain, range and graphs, and proving every standard logarithm law from the index laws.
keywords: [logarithms, logarithm laws, change of base, inverse functions, exponential functions, proofs]
template: assignment
paper: us-letter
titlePage: false
toc: false
headingNumbers: false
equationNumbers: true
columns: 1
figurePlacement: none
tableCaptionPosition: top
header: Logarithms | Definition, Graphs, Laws
footer: Lesson with complete proofs and practice
pdfProfile: tagged
language: en-US
---

# 1. A logarithm undoes a power

Consider $y=2^{x}$. Think of it as a machine: put a power in, get a value out. Put in $x=3$ and it returns $y=8$, because $2^{3}=8$.

The logarithm is the machine that runs this backwards. Put in $8$ and it returns $3$, because $3$ is the power to which $2$ must be raised to give $8$. We write $\log_{2}8=3$. A logarithm is a *power*: it answers the question "what exponent is needed?"

:::figure{#fig:machines caption="The exponential turns a power into a value; the logarithm turns a value back into the power" alt="A box labelled 2 to the power x sends the input 3 to the output 8, and a box labelled log base 2 of x sends the input 8 back to the output 3" width=88 placement=none}
![Two machines: the exponential sends 3 to 8, and the base-2 logarithm sends 8 back to 3](log-machines.svg)
:::

> [!IMPORTANT]
> **Definition.** Let $a>0$ and $a\ne1$. For $x>0$, $\log_{a}x$ is the unique real number $y$ such that $a^{y}=x$:
> $$y=\log_{a}x \iff a^{y}=x .$$

The restrictions are forced. We need $a>0$ so that $a^{y}$ is defined for every real $y$; we need $a\ne1$ because $1^{y}=1$ can never equal any other value; and we need $x>0$ because $a^{y}>0$ for every real $y$, so no exponent produces a value that is zero or negative.

Reading the definition in each direction gives the two inverse identities

:::equation{#eq:inverse alt="a to the power log base a of x equals x, and log base a of a to the power y equals y"}
\[
a^{\log_{a}x}=x\quad(x>0),\qquad \log_{a}\!\left(a^{y}\right)=y\quad(y\in\mathbb{R}).
\]
:::

Putting $y=0$ and $y=1$ in the second identity gives $\log_{a}1=0$ and $\log_{a}a=1$ for every admissible base.

**Example 1.** $\log_{2}8=3$ since $2^{3}=8$. $\log_{5}125=3$ since $5^{3}=125$. $\log_{3}\tfrac19=-2$ since $3^{-2}=\tfrac19$. $\log_{1/2}8=-3$ since $\left(\tfrac12\right)^{-3}=2^{3}=8$.

# 2. Domain, range, and the two shapes

For $a>0$ with $a\ne1$, the map $y\mapsto a^{y}$ is a bijection from $\mathbb{R}$ onto $(0,\infty)$: it is strictly monotone, so no value is taken twice, and it takes every positive value. The logarithm is its inverse, so

:::equation{#eq:domain alt="log base a has domain the positive reals and range all real numbers"}
\[
\log_{a}\colon(0,\infty)\longrightarrow\mathbb{R},\qquad
\text{domain }x>0,\qquad \text{range all of }\mathbb{R}.
\]
:::

Monotonicity is inherited. If $a>1$ then $a^{y}$ is strictly increasing, so $\log_{a}$ is strictly increasing. If $0<a<1$ then $a^{y}$ is strictly decreasing, so $\log_{a}$ is strictly decreasing. Every logarithm curve passes through $(1,0)$, and the $y$-axis is a vertical asymptote.

:::figure{#fig:bases caption="One base above 1 and one below: log to base 2 increases, log to base 1/2 decreases, and each is the mirror image of the other in the x-axis" alt="Two logarithm curves on one set of axes, both through (1,0) with the y-axis as asymptote; the base-2 curve rises and the base one-half curve falls" width=92 placement=none}
![Graphs of y = log base 2 of x and y = log base one half of x on the same axes](log-base-comparison.svg)
:::

The mirror symmetry in @fig:bases is exact. If $t=\log_{a}x$ then $\left(\tfrac1a\right)^{-t}=a^{t}=x$, so

:::equation{#eq:reciprocal-base alt="log base one over a of x equals minus log base a of x"}
\[
\log_{1/a}x=-\log_{a}x .
\]
:::

:::table{#tbl:sign caption="The sign of a logarithm depends only on which side of 1 the input lies"}
| Input | $a>1$ | $0<a<1$ |
| --- | --- | --- |
| $0<x<1$ | negative | positive |
| $x=1$ | zero | zero |
| $x>1$ | positive | negative |
:::

Because $\log_{a}$ inverts $x\mapsto a^{x}$, the two graphs are reflections of each other in the line $y=x$: every point $(p,q)$ on one corresponds to $(q,p)$ on the other.

:::figure{#fig:reflect caption="The exponential and the logarithm are reflections in the line y = x; the point (3, 8) corresponds to (8, 3)" alt="An exponential curve through (0,1) and (3,8) and a logarithm curve through (1,0) and (8,3), mirror images in the dashed line y equals x" width=46 placement=none}
![The graphs of y = 2 to the power x and y = log base 2 of x reflected in the line y = x](log-inverse-reflection.svg)
:::

> [!NOTE]
> Strict monotonicity is what makes logarithmic equations solvable: $\log_{a}u=\log_{a}v$ forces $u=v$, and $a^{u}=a^{v}$ forces $u=v$. Both are used constantly below.

## Common and natural logarithms

Two bases occur so often that they carry their own notation. Base $10$ gives the **common logarithm**; base $\mathrm{e}$, where $\mathrm{e}=2.71828\ldots$, gives the **natural logarithm**, written $\ln x$. Where a base is omitted in a school text, $\log$ normally means base $10$, while $\ln$ always means base $\mathrm{e}$. Every base in this lesson is written explicitly.

Nothing below is special to these bases: both are positive and neither is $1$, so every law applies to them unchanged. Change of base converts between them and any other base:

:::equation{#eq:common-natural alt="log base a of x equals natural log x over natural log a, which also equals log base ten of x over log base ten of a"}
\[
\log_{a}x=\frac{\ln x}{\ln a}=\frac{\log_{10}x}{\log_{10}a}.
\]
:::

# 3. The laws and their proofs

Throughout this section $a$, $b$, $c$ are admissible bases (positive and $\ne1$), $x,y>0$, and $p,q$ are real with $q\ne0$ wherever it appears in a denominator.

Every proof follows one pattern: name the logarithms, convert to index form, apply an index law, convert back. Write $u=\log_{a}x$ and $v=\log_{a}y$, so that $a^{u}=x$ and $a^{v}=y$.

**Law 1 (product).** $\log_{a}(xy)=\log_{a}x+\log_{a}y$.

*Proof.* $xy=a^{u}a^{v}=a^{u+v}$. By the definition, $\log_{a}(xy)=u+v$. $\blacksquare$

**Law 2 (quotient).** $\log_{a}\!\left(\dfrac{x}{y}\right)=\log_{a}x-\log_{a}y$.

*Proof.* $\dfrac{x}{y}=\dfrac{a^{u}}{a^{v}}=a^{u-v}$, so $\log_{a}(x/y)=u-v$. $\blacksquare$

**Law 3 (power).** $\log_{a}\!\left(x^{p}\right)=p\log_{a}x$ for every real $p$.

*Proof.* $x^{p}=\left(a^{u}\right)^{p}=a^{pu}$, so $\log_{a}(x^{p})=pu$. $\blacksquare$

**Law 4 (power of the base).** $\log_{a^{q}}x=\dfrac{1}{q}\log_{a}x$.

*Proof.* Let $t=\log_{a^{q}}x$. Then $\left(a^{q}\right)^{t}=x$, that is $a^{qt}=x$, so $qt=\log_{a}x$. Divide by $q$. $\blacksquare$

Laws 3 and 4 together give $\log_{a^{q}}\!\left(x^{p}\right)=\dfrac{p}{q}\log_{a}x$; taking $q=-1$ recovers @eq:reciprocal-base.

**Law 5 (change of base).** $\log_{a}x=\dfrac{\log_{c}x}{\log_{c}a}$.

*Proof.* Start from $a^{\log_{a}x}=x$ and take $\log_{c}$ of both sides. By Law 3 the left side is $(\log_{a}x)(\log_{c}a)$, so $(\log_{a}x)(\log_{c}a)=\log_{c}x$. Since $a\ne1$ we have $\log_{c}a\ne0$, and dividing gives the result. $\blacksquare$

**Law 6 (reciprocal).** $\log_{a}b=\dfrac{1}{\log_{b}a}$.

*Proof.* Apply Law 5 with $x=b$ and $c=b$: $\log_{a}b=\dfrac{\log_{b}b}{\log_{b}a}=\dfrac{1}{\log_{b}a}$. $\blacksquare$

**Law 7 (a product of two logarithms).** $(\log_{a}b)(\log_{b}c)=\log_{a}c$.

*Proof.* By Law 5, $\log_{b}c=\dfrac{\log_{a}c}{\log_{a}b}$. Multiplying by $\log_{a}b$, which is nonzero because $b\ne1$, gives $\log_{a}c$. $\blacksquare$

**Law 8 (a chain of logarithms).** For admissible bases $a_{1},a_{2},\dots,a_{n}$,
$$(\log_{a_{1}}a_{2})(\log_{a_{2}}a_{3})\cdots(\log_{a_{n-1}}a_{n})=\log_{a_{1}}a_{n}.$$

*Proof.* Induction on $n$. For $n=3$ this is Law 7. If the product of the first $n-2$ factors equals $\log_{a_{1}}a_{n-1}$, then multiplying by $\log_{a_{n-1}}a_{n}$ and applying Law 7 once more gives $\log_{a_{1}}a_{n}$. $\blacksquare$

Law 6 is the case $c=a$ of Law 7, since the chain closes: $(\log_{a}b)(\log_{b}a)=\log_{a}a=1$.

**Law 9 (changing the base of a power).** $a^{b}=c^{\,b\log_{c}a}$ for $a>0$ and any real $b$.

*Proof.* By @eq:inverse, $a=c^{\log_{c}a}$. Raising both sides to the power $b$ gives $a^{b}=c^{\,b\log_{c}a}$. $\blacksquare$

**Law 10 (exchanging a base and an argument).** $a^{\log_{b}c}=c^{\log_{b}a}$.

*Proof.* Write $a=b^{\log_{b}a}$. Then
$$a^{\log_{b}c}=\left(b^{\log_{b}a}\right)^{\log_{b}c}=b^{(\log_{b}a)(\log_{b}c)} .$$
The exponent is symmetric in $a$ and $c$, so interchanging them leaves the value unchanged. Doing so turns the left side into $c^{\log_{b}a}$. $\blacksquare$

:::table{#tbl:laws caption="The ten laws in one place, with the standing conditions of this section"}
| Law | Statement |
| --- | --- |
| 1 | $\log_{a}(xy)=\log_{a}x+\log_{a}y$ |
| 2 | $\log_{a}(x/y)=\log_{a}x-\log_{a}y$ |
| 3 | $\log_{a}(x^{p})=p\log_{a}x$ |
| 4 | $\log_{a^{q}}x=\frac{1}{q}\log_{a}x$ |
| 5 | $\log_{a}x=\log_{c}x\,/\,\log_{c}a$ |
| 6 | $\log_{a}b=1/\log_{b}a$ |
| 7 | $(\log_{a}b)(\log_{b}c)=\log_{a}c$ |
| 8 | $(\log_{a_{1}}a_{2})\cdots(\log_{a_{n-1}}a_{n})=\log_{a_{1}}a_{n}$ |
| 9 | $a^{b}=c^{\,b\log_{c}a}$ |
| 10 | $a^{\log_{b}c}=c^{\log_{b}a}$ |
:::

**Example 2.** Expand $\log_{a}\dfrac{x^{3}\sqrt{y}}{z^{2}}$. By Laws 1–3 it equals $3\log_{a}x+\tfrac12\log_{a}y-2\log_{a}z$.

**Example 3.** Evaluate $\log_{4}8$. By Law 4, $\log_{4}8=\log_{2^{2}}2^{3}=\tfrac12\log_{2}2^{3}=\tfrac32$. Check: $4^{3/2}=8$.

**Example 4.** Evaluate $(\log_{3}2)(\log_{2}9)$. By Law 7 this is $\log_{3}9=2$.

**Example 5.** Evaluate $2^{\log_{4}9}$. By Law 4, $\log_{4}9=\tfrac12\log_{2}9=\log_{2}3$, so $2^{\log_{4}9}=2^{\log_{2}3}=3$.

## What the laws do not say

Only products, quotients and powers *inside* a single logarithm split. The statements below are false in general, and one counterexample settles each.

:::table{#tbl:notlaws caption="Four expressions that are not laws, each refuted by a single base-2 counterexample"}
| Not a law | Counterexample |
| --- | --- |
| $\log_{a}(x+y)=\log_{a}x+\log_{a}y$ | $\log_{2}(4+4)=3$ but $\log_{2}4+\log_{2}4=4$ |
| $\log_{a}(xy)=(\log_{a}x)(\log_{a}y)$ | $\log_{2}(4\cdot8)=5$ but $(\log_{2}4)(\log_{2}8)=6$ |
| $(\log_{a}x)^{p}=p\log_{a}x$ | $(\log_{2}8)^{2}=9$ but $2\log_{2}8=6$ |
| $\dfrac{\log_{a}x}{\log_{a}y}=\log_{a}\dfrac{x}{y}$ | $\dfrac{\log_{2}8}{\log_{2}4}=\dfrac32$ but $\log_{2}2=1$ |
:::

The last line is worth naming. A quotient of two logarithms to the same base is a *change of base*, not the logarithm of a quotient: by Law 5, $\dfrac{\log_{a}x}{\log_{a}y}=\log_{y}x$. Here that reads $\log_{4}8=\tfrac32$, which agrees with Example 3.

**Example 6.** Solve $\log_{2}x+\log_{x}2=\tfrac52$. Both logarithms are defined only for $x>0$ with $x\ne1$. Put $u=\log_{2}x$; then $\log_{x}2=\dfrac1u$ by Law 6, and $u\ne0$. The equation becomes
$u+\frac1u=\frac52\;\Longrightarrow\;2u^{2}-5u+2=0\;\Longrightarrow\;u=2\ \text{or}\ u=\tfrac12 ,$
so $x=2^{2}=4$ or $x=2^{1/2}=\sqrt2$. Both are admissible, and both check: $\log_{2}4+\log_{4}2=2+\tfrac12$ and $\log_{2}\sqrt2+\log_{\sqrt2}2=\tfrac12+2$.

# 4. Exercises

Give exact values. State any restriction you use on a base or an argument.

> [!TIP]
> Three moves solve almost everything here. Convert every logarithm to one base with Law 5; substitute a single letter for the logarithm you keep, as in Example 6; and check the domain and the admissibility of every base before reporting a solution.

::::regions{tracks="1 1" gutter=18}
:::region
1. Evaluate $\log_{2}32$, $\log_{9}27$ and $\log_{1/3}81$.

2. Solve $\log_{3}(x-1)+\log_{3}(x+1)=1$.

3. Simplify $(\log_{2}3)(\log_{3}4)(\log_{4}5)(\log_{5}8)$.

4. Given $\log_{2}8=3$, use Law 6 to write down $\log_{8}2$.

5. Express $\log_{\sqrt2}8$ in terms of $\log_{2}8$ and evaluate it.

6. Solve $2^{2x}-5\cdot2^{x}+4=0$.

7. Solve $\log_{2}x+\log_{4}x+\log_{8}x=11$.

8. Evaluate $9^{\log_{3}4}$ and $2^{\log_{4}9}$, and say why the two answers differ.
:::
:::region
9. Solve $(\log_{x}2)(\log_{2x}2)=\log_{4x}2$.

10. Given $\log_{12}27=a$, express $\log_{6}16$ in terms of $a$.

11. Prove that $\log_{2}3$ is irrational.

12. Show that $\log_{2}3>\log_{3}5$ without using a calculator.

13. Show that $\log_{a}b+\log_{b}a\ge2$ whenever $a>1$ and $b>1$.

14. With $N=100!$, evaluate $\dfrac{1}{\log_{2}N}+\dfrac{1}{\log_{3}N}+\cdots+\dfrac{1}{\log_{100}N}$.

15. Solve $x^{\log_{10}x}=100x$.
:::
::::

::::keep
:::table{#tbl:record caption="Record the answer and the restriction it depends on for questions 1 to 8"}
| Question | Answer | Restriction used |
| ---: | --- | --- |
| 1 | | |
| 2 | | |
| 3 | | |
| 4 | | |
| 5 | | |
| 6 | | |
| 7 | | |
| 8 | | |
:::
::::

**Working space for questions 9 to 15.**

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

## Sources

- Common Core State Standards, [Functions: Linear, Quadratic, and Exponential Models](https://www.thecorestandards.org/Math/Content/HSF/LE/), HSF-LE.A.4 on solving exponential equations with logarithms.
- Common Core State Standards, [Functions: Building Functions](https://www.thecorestandards.org/Math/Content/HSF/BF/), HSF-BF.B.5 on the inverse relationship between exponents and logarithms.
- OpenStax, [*Algebra and Trigonometry 2e*](https://openstax.org/details/books/algebra-and-trigonometry-2e), for the standard treatment of logarithmic functions and their properties.
