[Home](https://learningfolio.de5.net/) / [Math](https://learningfolio.de5.net/math/) / [Math glossary](https://learningfolio.de5.net/math/glossary/) / Introduction to Logarithms: Meaning, Rules, and Examples

[Math glossary](https://learningfolio.de5.net/math/glossary/)

# Introduction to Logarithms: Meaning, Rules, and Examples

Learn what a logarithm means, convert between exponential and log form, and find the domain, graph, and value with six examples.

Written by **Learningfolio Team**

We’re subject-matter experts in math, science, parent support, and education, with 100 years of combined experience. We believe in learning, experimenting, and growing, and we review one another’s work.

## On this page

* [TL;DR](https://learningfolio.de5.net/math/introduction-to-logarithm/#tldr)
* [Key Points](https://learningfolio.de5.net/math/introduction-to-logarithm/#key-points)
* [What is a logarithm?](https://learningfolio.de5.net/math/introduction-to-logarithm/#what-is-a-logarithm)
* [What are the domain, range, and graph of a logarithm?](https://learningfolio.de5.net/math/introduction-to-logarithm/#what-are-the-domain-range-and-graph-of-a-logarithm)
* [When do you use common and natural logarithms?](https://learningfolio.de5.net/math/introduction-to-logarithm/#when-do-you-use-common-and-natural-logarithms)
* [Which log rules follow from exponent rules?](https://learningfolio.de5.net/math/introduction-to-logarithm/#which-log-rules-follow-from-exponent-rules)
* [Worked Logarithm Examples](https://learningfolio.de5.net/math/introduction-to-logarithm/#worked-logarithm-examples)
* [Mistakes That Change a Logarithm Answer](https://learningfolio.de5.net/math/introduction-to-logarithm/#mistakes-that-change-a-logarithm-answer)
* [Try It Yourself](https://learningfolio.de5.net/math/introduction-to-logarithm/#try-it-yourself)
* [Answers and Reasoning](https://learningfolio.de5.net/math/introduction-to-logarithm/#answers-and-reasoning)
* [Frequently Asked Questions](https://learningfolio.de5.net/math/introduction-to-logarithm/#frequently-asked-questions)
* [Conclusion](https://learningfolio.de5.net/math/introduction-to-logarithm/#conclusion)
* [Read More](https://learningfolio.de5.net/math/introduction-to-logarithm/#read-more)
* [Research Behind This Article](https://learningfolio.de5.net/math/introduction-to-logarithm/#research-behind-this-article)

## TL;DR

**A logarithm tells you which exponent produces a number.** The equation $\log_b x=y$ means $b^y=x$. For real logarithms, the base must be positive and different from 1, and the input must be positive.

## Key Points

* The base is the number raised to a power. The logarithm gives the power.
* A logarithm can be negative or fractional even though its input is positive.
* Common logarithms use base 10, and natural logarithms use base $e$.
* Exponential and logarithmic functions of the same base undo each other.
* For a base greater than 1, the logarithm increases as the input increases.

## What is a logarithm?

An exponent tells you what a base raised to a power equals. A logarithm answers the reverse question. Since $3^4=81$, the base-3 logarithm of 81 equals 4. Read $\log_3 81=4$ as “log base 3 of 81 is 4.”

$$
\log_b x=y \quad\Longleftrightarrow\quad b^y=x.
$$

The three pieces stay the same when you rewrite the equation. The base $b$ remains the base, the input $x$ becomes the exponential result, and the logarithm value $y$ becomes the exponent. To practice the conversion, circle the exponent and underline the exponential result before rewriting the equation. [OpenStax, Logarithmic Functions](https://openstax.org/books/precalculus-2e/pages/4-3-logarithmic-functions)

| Exponential form | Logarithmic form | How to read it |
| --- | --- | --- |
| $4^3=64$ | $\log_4 64=3$ | A power of 3 takes 4 to 64 |
| $10^{-2}=0.01$ | $\log_{10}0.01=-2$ | A power of $-2$ takes 10 to 0.01 |
| $9^{1/2}=3$ | $\log_9 3=1/2$ | A square root takes 9 to 3 |

## What are the domain, range, and graph of a logarithm?

Use a real base $b>0$ with $b\ne1$. Every real power of this base is positive. The input to $\log_b x$ must therefore satisfy $x>0$. The output can be any real number because those outputs are the exponents of $b$.

If the base were 1, every power would equal 1, so there would be no unique exponent to recover. Negative bases do not give a single real exponential function on all real exponents. For example, the exponent $1/2$ would ask for a real square root of a negative value.

The logarithm and the corresponding exponential are [inverse functions](https://learningfolio.de5.net/math/types-of-functions/). Reflect one graph across $y=x$ to get the other. The log graph passes through $(1,0)$ and $(b,1)$ because $b^0=1$ and $b^1=b$. It has a vertical asymptote at $x=0$. It rises when $b>1$ and falls when $0<b<1$. [OpenStax, Evaluate and Graph Logarithmic Functions](https://openstax.org/books/intermediate-algebra/pages/10-3-evaluate-and-graph-logarithmic-functions)

![The graph of log base two reflects the graph of two to the power x across the line y equals x](https://learningfolio.de5.net/assets/versioned/logarithm-inverse-exponential-graph.1d7ac5fd5b23.webp)


Swapping input and output reflects the exponential curve over the diagonal. The point $(2,4)$ becomes $(4,2)$.

## When do you use common and natural logarithms?

A **common logarithm** has base 10. Many calculators label it $\log$. A **natural logarithm**, marked $\ln$, uses Euler’s number $e$, approximately 2.71828. Natural logarithms undo $e^x$ in continuously growing or decaying models. Computer science often uses base 2. Since $\log$ without a base can depend on the field, check the convention in the problem.

For a calculator without a button for the desired base, use the change-of-base rule. The numerator and denominator must use the same base.

$$
\log_b x=\frac{\ln x}{\ln b}=\frac{\log_{10}x}{\log_{10}b}.
$$

The [log table guide](https://learningfolio.de5.net/math/log-table/) explains how to estimate base-10 logs without an electronic calculator. [OpenStax, Exponential and Logarithmic Functions](https://openstax.org/books/calculus-volume-1/pages/1-5-exponential-and-logarithmic-functions)

## Which log rules follow from exponent rules?

Multiplying two powers of the same base adds their exponents. That is why $\log_b(MN)=\log_b M+\log_b N$ for positive $M,N$. Dividing subtracts their exponents, so $\log_b(M/N)=\log_b M-\log_b N$. Raising a positive input $M$ to a power $p$ multiplies the exponent, giving $\log_b(M^p)=p\log_b M$.

For instance, $\log_2(8\cdot4)=3+2=5$. Verify with $2^5=32$. The [log rules guide](https://learningfolio.de5.net/math/log-rules/) shows how to expand longer expressions and check that every original log input is allowed. [OpenStax, Logarithmic Properties](https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-5-logarithmic-properties)

## Worked Logarithm Examples

### Example 1

Rewrite $5^3=125$ as a logarithm.

1. The base is 5 and the exponential result is 125.
2. The exponent 3 becomes the log value.
3. The equation is $\log_5 125=3$.

### Example 2

Evaluate $\log_2(1/16)$.

1. Ask which power of 2 equals $1/16$.
2. Since $16=2^4$, its reciprocal is $2^{-4}$.
3. The logarithm is $-4$.

### Example 3

Find $\log_{25}5$.

1. A power of $1/2$ takes the square root.
2. The positive square root of 25 is 5.
3. Therefore $\log_{25}5=1/2$.

### Example 4

Evaluate $\log_{1/3}27$.

1. Rewrite 27 as $3^3$.
2. Raising $1/3$ to $-3$ takes the reciprocal of its cube and produces 27.
3. The value is $-3$. For this base, inputs greater than 1 have negative logarithms.

### Example 5

Solve $\log_4(x-2)=3$.

1. The domain requires $x-2>0$, so $x>2$.
2. Rewrite as $x-2=4^3=64$.
3. Add 2 to get $x=66$. It meets the domain condition.

### Example 6

Starting with 12 cultures in a model, a population doubles every two hours. How long until the model reaches 96?

1. After $t$ hours the model is $12\cdot2^{t/2}$.
2. Divide by 12 to get $2^{t/2}=8$. Taking a base-2 log gives $t/2=3$.
3. Thus $t=6$ hours. Three doublings take six hours and turn 12 into 96.

## Mistakes That Change a Logarithm Answer

### Mistake 1: Swapping the base and input

$\log_2 8$ asks for a power of 2 and equals 3. $\log_8 2$ asks for a power of 8 and equals $1/3$.

### Mistake 2: Rejecting a negative logarithm value

The input must be positive. The output has no such restriction. For example, $\log_{10}(1/1000)=-3$.

### Mistake 3: Splitting a sum inside a logarithm

The addition rule comes from multiplying powers. For example, $\log_2(2+8)$ is about 3.32, whereas $\log_2 2+\log_2 8$ is 4.

## Try It Yourself

1. Evaluate $\log_3(1/27)$.
2. Rewrite $\ln x=2$ using exponential form.
3. Solve $\log_5(x+4)=2$.

## Answers and Reasoning

1. $-3$ because $3^{-3}=1/27$.
2. $x=e^2$ since $\ln$ uses base $e$.
3. $x+4=25$, so $x=21$. The log input is positive.

## Frequently Asked Questions

### Why is the logarithm of 1 always zero?

Every allowed base raised to zero equals 1. Therefore $\log_b 1=0$.

### Can you take a real logarithm of zero?

No. No real exponent makes an allowed base equal to zero. For $b>1$, the graph drops without bound as positive $x$ approaches zero, but the function is undefined at zero.

### How do you estimate $\log_2 20$ without a calculator?

Since $2^4=16$ and $2^5=32$, the log is between 4 and 5. For a midpoint check, $2^{4.5}=16\sqrt2pprox22.63$, so 20 gives a value below 4.5. Change of base gives approximately 4.32.

## Conclusion

* Rewrite a logarithm as an exponential equation to identify its unknown.
* Check the base and positivity of the input before solving.
* Verify the result by raising the base to the recovered exponent.

## Read More

* [Browse related lessons in the math glossary](https://learningfolio.de5.net/math/glossary/)

## Research Behind This Article

1. OpenStax, *Precalculus 2e: Logarithmic Functions*. [OpenStax](https://openstax.org/books/precalculus-2e/pages/4-3-logarithmic-functions)
2. OpenStax, *Intermediate Algebra: Evaluate and Graph Logarithmic Functions*. [OpenStax](https://openstax.org/books/intermediate-algebra/pages/10-3-evaluate-and-graph-logarithmic-functions)
3. OpenStax, *Calculus Volume 1: Exponential and Logarithmic Functions*. [OpenStax](https://openstax.org/books/calculus-volume-1/pages/1-5-exponential-and-logarithmic-functions)
4. OpenStax, *Algebra and Trigonometry 2e: Logarithmic Properties*. [OpenStax](https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-5-logarithmic-properties)
