If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Intro to Logarithms

Learn what logarithms are and how to evaluate them.

### What you should be familiar with before taking this lesson

You should be familiar with exponents, preferably including negative exponents.

### What you will learn in this lesson

You will learn what logarithms are, and evaluate some basic logarithms. This will prepare you for future work with logarithm expressions and functions.

## What is a logarithm?

Logarithms are another way of thinking about exponents.
For example, we know that $2$ raised to the ${4}^{\text{th}}$ power equals $16$. This is expressed by the exponential equation ${2}^{4}=16$.
Now, suppose someone asked us, "$2$ raised to which power equals $16$?" The answer would be $4$. This is expressed by the logarithmic equation ${\mathrm{log}}_{2}\left(16\right)=4$, read as "log base two of sixteen is four".
${2}^{4}=16\phantom{\rule{1em}{0ex}}\phantom{\rule{0.278em}{0ex}}⟺\phantom{\rule{0.278em}{0ex}}\phantom{\rule{1em}{0ex}}{\mathrm{log}}_{2}\left(16\right)=4$
Both equations describe the same relationship between the numbers $2$, $4$, and $16$, where $2$ is the base and $4$ is the exponent.
The difference is that while the exponential form isolates the power, $16$, the logarithmic form isolates the exponent, $4$.
Here are more examples of equivalent logarithmic and exponential equations.
Logarithmic formExponential form
${\mathrm{log}}_{2}\left(8\right)=3$$\phantom{\rule{0.278em}{0ex}}⟺\phantom{\rule{0.278em}{0ex}}$${2}^{3}=8$
${\mathrm{log}}_{3}\left(81\right)=4$$\phantom{\rule{0.278em}{0ex}}⟺\phantom{\rule{0.278em}{0ex}}$${3}^{4}=81$
${\mathrm{log}}_{5}\left(25\right)=2$$\phantom{\rule{0.278em}{0ex}}⟺\phantom{\rule{0.278em}{0ex}}$${5}^{2}=25$

## Definition of a logarithm

Generalizing the examples above leads us to the formal definition of a logarithm.
${\mathrm{log}}_{b}\left(a\right)=c\phantom{\rule{1em}{0ex}}\phantom{\rule{0.278em}{0ex}}⟺\phantom{\rule{0.278em}{0ex}}\phantom{\rule{1em}{0ex}}{b}^{c}=a$
Both equations describe the same relationship between $a$, $b$, and $c$:
• $b$ is the $\text{base}$,
• $c$ is the $\text{exponent}$, and
• $a$ is called the $\text{argument}$.

When rewriting an exponential equation in log form or a log equation in exponential form, it is helpful to remember that the base of the logarithm is the same as the base of the exponent.

In the following problems, you will convert between exponential and logarithmic forms of equations.
Problem 1
Which of the following is equivalent to ${2}^{5}=32$?

Problem 2
Which of the following is equivalent to ${5}^{3}=125$?

Problem 3
Write ${\mathrm{log}}_{2}\left(64\right)=6$ in exponential form.

Problem 4
4) Write ${\mathrm{log}}_{4}\left(16\right)=2$ in exponential form.

## Evaluating logarithms

Great! Now that we understand the relationship between exponents and logarithms, let's see if we can evaluate logarithms.
For example, let's evaluate ${\mathrm{log}}_{4}\left(64\right)$.
Let's start by setting that expression equal to $x$.
${\mathrm{log}}_{4}\left(64\right)=x$
Writing this as an exponential equation gives us the following:
${4}^{x}=64$
$4$ to what power is $64$? Well, ${4}^{3}=64$ and so ${\mathrm{log}}_{4}\left(64\right)=3$.
As you become more practiced, you may find yourself condensing a few of these steps and evaluating ${\mathrm{log}}_{4}\left(64\right)$ just by asking, "$4$ to what power is $64$?"

Remember, when evaluating ${\mathrm{log}}_{b}\left(a\right)$, you can ask: "$b$ to what power is $a$?"
Problem 5
${\mathrm{log}}_{6}\left(36\right)=$

Problem 6
${\mathrm{log}}_{3}\left(27\right)=$

Problem 7
${\mathrm{log}}_{4}\left(4\right)=$

Problem 8
${\mathrm{log}}_{5}\left(1\right)=$

Challenge problem
${\mathrm{log}}_{3}\left(\frac{1}{9}\right)=$

## Restrictions on the variables

${\mathrm{log}}_{b}\left(a\right)$ is defined when the base $b$ is positive—and not equal to $1$—and the argument $a$ is positive. These restrictions are a result of the connection between logarithms and exponents.
RestrictionReasoning
$b>0$In an exponential function, the base $b$ is always defined to be positive.
$a>0$${\mathrm{log}}_{b}\left(a\right)=c$ means that ${b}^{c}=a$. Because a positive number raised to any power is positive, meaning ${b}^{c}>0$, it follows that $a>0$.
$b\ne 1$Suppose, for a moment, that $b$ could be $1$. Now consider the equation ${\mathrm{log}}_{1}\left(3\right)=x$. The equivalent exponential form would be ${1}^{x}=3$. But this can never be true since $1$ to any power is always $1$. So, it follows that $b\ne 1$.

## Special logarithms

While the base of a logarithm can have many different values, there are two bases that are used more often than others.
Specifically, most calculators have buttons for only these two types of logarithms. Let's check them out.

### The common logarithm

The common logarithm is a logarithm whose base is $10$ ("base-$10$ logarithm").
When writing these logarithms mathematically, we omit the base. It is understood to be $10$.
${\mathrm{log}}_{10}\left(x\right)=\mathrm{log}\left(x\right)$

### The natural logarithm

The natural logarithm is a logarithm whose base is the number $e$ ("base-$e$ logarithm").
Instead of writing the base as $e$, we indicate the logarithm with $\mathrm{ln}$.
${\mathrm{log}}_{e}\left(x\right)=\mathrm{ln}\left(x\right)$
This table summarizes what we need to know about these two special logarithms:
NameBaseRegular notationSpecial notation
Common logarithm$10$${\mathrm{log}}_{10}\left(x\right)$$\mathrm{log}\left(x\right)$
Natural logarithm$e$${\mathrm{log}}_{e}\left(x\right)$$\mathrm{ln}\left(x\right)$
While the notation is different, the idea behind evaluating the logarithm is exactly the same!

## Why are we studying logarithms?

As you just learned, logarithms reverse exponents. For this reason, they are very helpful for solving exponential equations.
For example the result for ${2}^{x}=5$ can be given as a logarithm, $x={\mathrm{log}}_{2}\left(5\right)$. You will learn how to evaluate this logarithmic expression over the following lessons.
Logarithmic expressions and functions also turn out to be very interesting by themselves, and are actually very common in the world around us. For example, many physical phenomena are measured with logarithmic scales.

## What's next?

Learn about the properties of logarithms that help us rewrite logarithmic expressions, and about the change of base rule that allows us to evaluate any logarithm we want using the calculator.

## Want to join the conversation?

• I didn't get much from the explanation of the challenge problem or 3 (1/9) for the logarithm
• One exponent rule is that b^-n=1/b^n. Thus for log3(1/9) you are solving 3^x=1/9. Since 3^2=9, 3^-2=1/9 and there's your answer, -2.
• How about log base-2 of -8=3? Is it therefore "defined"? I thought it that way because it can be written in exponential form as (-2)^3=-8 ..... Can we then say that base (b) and argument (a) can be negative {and must simultaneously be at the same time...right? }............ :) since a negative integer raised to an odd whole number is negative............

P.S. [Sorry if I made a mistake hahahahha was just curious. Anyways, I would really appreciate an explanation. Thanks in advance :) ]
• Hey Ian John P. Alberba,

When we think about the case/situation you have presented, it can pass as defined. The only problem is that if instead of 3 it was a fraction, there would be a negative number under the square root. This is usually avoided because it becomes more complicated because we must use imaginary numbers to find the answer. Because of this there are no negative bases in logarithms.

Also, it is great to be curious. Keep asking these kinds of questions and testing the KA community.

Hope that helps!
- JK
• where are logarithms used in real life
• Logarithms are used most often in scientific fields, especially in chemistry (in my personal experience). They're often used to calculate half-lives of radioactive substances, pH values of acidic and basic substances, and how fast certain chemical reactions take.

Apart from chemistry, they are used to calculate decibel scales, which measure the loudness noise levels of things all around this.
• How in the world do the negative exponents work? I understand the concept with positive numbers but not negative ones.
• Negative exponents are a way of writing powers of fractions or decimals without using a fraction or decimal. They tell us how many times to divide the base number. To simplify an expression with a negative exponent, you just flip the base number and exponent to the bottom of a fraction with a 1 on top. This is because division is the inverse operation of multiplication 1.

For example, 2^-3 is equal to 1/(2^3) which is equal to 1/8.
• what is the need of log ? like we already have exponents , so why log too ?
• I gave this example elsewhere too, but I think it fits here too.

Say you want to go shopping and you don't have a personal vehicle. What would you do? Well, you'd hire a cab/Uber and go to the supermarket to get your stuff. Now, how would you come back? Clearly, you'll need a hire another cab/Uber which will get you back home.

Same logic here. Raising a number to an exponent is all well and good, but we need something to come back to the original number. Hence, logarithms came in the picture.
• How do you evaluate logarithms using a calculator?
• A scientific calculator generally always has an ln (natural logarithm, or log base e) key. From the change of base theorem, log base a of b = (ln b)/(ln a). For example, you can calculate log base 3 of 5 by calculating (ln 5)/(ln 3) which should give approximately 1.465. (Note that if your calculator also has a log key, another way to calculate log base 3 of 5 is to calculate (log 5)/(log 3). You should still get about 1.465.)
Have a blessed, wonderful day!
• why isn't log(-8) with a base of -2 equal to 3?
• Even though technically that is correct as an exponential, as a logarithm it is undefined. You cannot have a negative base in a logarithm, and here is why:
Keep in mind that the log(x), with any base, the output will be a real number no matter what as long as the input is >=0.

Let's have a hypothetical that f(x) = log-2(x) is a function. It's inverse is f(x) = (-2)^x . All integers will work fine, however, as a normal log can take in any real value and output any real value, let's put a fraction in the exponential.

(-2)^(1/2) = sqrt(-2). This is not a real number. Again, another fraction:
(-2)^(1/4) = cubert(-2). Again, not a real number.

If we were to graph this on the real plane (xy plane), the function would not be continuous as there would be outputs in the imaginary plane. So since although negative log bases can have a value for some integers, due to this rule, it makes neg log bases impossible.

hopefully that helps !
• log1(1) have two answers? it can be 1 and also 0.

log1(1)=1 -> 1^1=1

log1(1)=0 -> 1^0=1

so log1(1)=1 and 0

?
• Actually, there would be an infinite amount of answers. 1^2, 1^3, etc. are all equal to 1 too.
We don’t really define a log with base 1 because no matter how many times you multiply 1 by itself, you still get 1. So, if you wanted to evaluate it at any number besides 1, it would be undefined. And, like you pointed out, the answer is ambiguous at 1 too, so we don’t define log base 1.
• I didn't get the part where you said logarithms can't b can't be negative. i mean if we have negative integers with odd power then why cant it be written in logarithmic form ?
And secondly you said b cant be 1 so whats wrong with log with base 1 and power (a) 1?
• Logarithms are undefined for base 1 because there exist no real power that we could raise one to that would give us a number other than 1. In other words:
1ˣ = 1
For all real 𝑥. We can never have 1ˣ = 2 or 1ˣ = 938 or 1ˣ = any number besides 1.
If the base of the logarithm is negative, then the function is not continuous. For instance, sure the logarithm is defined for even and odd powers of negative numbers (though even powers are positive and the odd powers a negative and this is a wild jumping behavior that will continue for all integers). However, what about values between the integers? For instance, what if I asked you what power I needed to raise -2 to in order to get 1/2? The answer is a complex number, and it can only be found with some knowledge of trigonometry and the de'Moivre's theorem. In other words, there are gaps between the integer powers where the function is only defined in the nonreal numbers. The only places where it is defined (in the real numbers) is for integer powers, and plotting just those clearly don't give a continuous curve.