- Laws of logarithms
- pH — the hydrogen ion scale · coming soon
- The natural logarithm · coming soon
A question your calculator cannot answer with one key
Two to the power of what gives 32? Most people find this quickly. , so the answer is 5.
Now a second question. Two to the power of what gives 20?
This one is not quick. is too small, and is too big. So the answer is between 4 and 5. It is not a whole number, and not a fraction you would recognise. But it is one exact number.
The last lecture ended with the same kind of question: which index makes ? Its graph of showed that is a little more than 3. It promised to give that index a name. The name is logarithm.
The definition is one line, and it is not hard. What confuses people is the notation, because it puts the three numbers of a power in an unfamiliar order. So we will spend real time on reading it. Once you can read it, the rest follows.
Three numbers, and three questions
Look at one power: . It contains three numbers. The base is 2. The index is 3. The result is 8.
If you know any two of the three, you can ask for the third. That gives three questions.
- Find the result. What is ? You know the base and the index. This is ordinary powering: the answer is 8.
- Find the base. Which number cubed gives 8? You know the index and the result. This is a root: .
- Find the index. 2 to the power of what gives 8? You know the base and the result. Neither powers nor roots answer this. The unknown is up in the index.
The third question needs its own operation: the logarithm. A logarithm is an index. It answers the question "what power?"
The definition, and how to read it
We write the answer to "2 to the power of what gives 8?" as . We read it as "log base 2 of 8". Because , we have .
For a base that is positive and not equal to 1, and a positive number :
means exactly the same as .
In words: is the power you raise to, to get .
The two statements in the box are one fact, written in two ways. is called index form, and is called log form.
Now the reading skill. Every time you see a logarithm, say the question to yourself in words. is "3 to the power of what gives 81?" The answer is 4, because . is "10 to the power of what gives 100?" The answer is 2. is "5 to the power of what gives 5?" The answer is 1.
In both forms, the small number at the bottom left is the base. In , the 2 is written low, as the base of the logarithm. In , the same 2 is the base of the power. The base stays the base. The answer of the logarithm becomes the index. The number inside the logarithm becomes the result of the power.
| Index form | Log form | The question in words |
|---|---|---|
| 2 to the power of what gives 32? | ||
| 10 to the power of what gives 1000? | ||
| 2 to the power of what gives a quarter? | ||
| 4 to the power of what gives 2? | ||
| to the power of what gives 1? |
The last three rows use the meanings from the last lecture. Indices can be negative or fractions, so logarithms can be too. And because , for every allowed base.
. Does this mean that is a negative number? And is there any number with ?
Show the answer
No, and no. The logarithm is : that is the index. The number inside it, , is positive. A negative index makes a power small, never negative, as the last lecture showed. This is also why no index works for . Every power of 2 is positive, whatever the index. So has no solution, and has no value. A negative logarithm is fine. A logarithm of a negative number is not.
Why the base and the argument have conditions
The box has three conditions, and each one has a reason.
The number inside must be positive. Every power of a positive base is positive, so it can never produce 0 or a negative number. The domain and range lecture promised that the logarithm would have its own forbidden inputs. These are they.
The base must be positive. The last lecture found that with negative bases, one fractional index can give two different answers. A logarithm must be one exact number.
The base must not be 1. Every power of 1 is 1. So "1 to the power of what gives 5?" has no answer, and "1 to the power of what gives 1?" has every number as an answer.
Finding a logarithm that is not a whole number
Return to the hook. is the number with , and it lies between 4 and 5. To get closer, try values in between. is too small, and is too big. Hunt for some logarithms yourself below. A logarithm is the index that hits the target.
Choose a question. Then move the index c until the power hits the target. Use the buttons for small steps. The dashed line is the target. The dot is the power you have now.
A hunt for : the index with . Each row tries one value of .
| Verdict | ||
|---|---|---|
| 3 | 8 | too small |
| 4 | 16 | too big, so is between 3 and 4 |
| 3.3 | ≈ 9.849 | too small |
| 3.4 | ≈ 10.556 | too big, so is between 3.3 and 3.4 |
| 3.32 | ≈ 9.987 | a little too small |
| 3.33 | ≈ 10.056 | a little too big |
So , to 3 significant figures (3 s.f.). The same hunt gives and . It gives exactly , and .
What should you have seen? For , and , the dot lands exactly on the line, because those targets are exact powers of the base. For the others, you can get very close but never exactly on. Those logarithms are not fractions, yet each is one definite number, because the curve crosses the target line only once. And : "a little more than 3", as the last lecture's graph suggested.
The logarithm undoes the power
The inverse functions lecture promised a link: if , the logarithm is the function that gives back . Here is that link in full.
Think of as a machine. It takes an index and gives a result: . The logarithm runs the machine backwards. It takes the result and gives back the index: . So is the inverse function of . In the notation of that lecture, if , then .
Check both orders. Power first, then log: . Log first, then power: . Each undoes the other, as an inverse must.
The graph of an inverse function is the reflection of the original graph in the line . Every point on becomes the point on . The figure shows four pairs.
Now the domain and range lecture's promise can be kept in full. That lecture showed that the domain of an inverse function is the range of the original function. The range of is every positive number: the curve gets close to the -axis but never touches it. So the domain of is . The inverse shows you exactly why zero and negative numbers are forbidden. The range of is every real number, because the domain of is every real number.
Two bases with their own names
Two bases are used so often that they have their own calculator keys.
The first is base 10, called the common logarithm. On a calculator, the key marked log means . Many books also write with no base and mean . In this course we will keep writing the base, , so that it is always clear. Base 10 suits our number system: , and .
The second is base , where . It is called the natural logarithm, and it is written . The key is marked ln. Why this base is "natural" is a Pre-University story. For now, works exactly like every other logarithm: means .
Many calculators also have a key for any base, often marked . With it, directly. Check: . A later lecture in this topic shows how to find any logarithm using only the log key.
Working with logarithms
The examples use one technique again and again: when a logarithm is hard to think about, write it in index form.
(a) Write and in log form. (b) Write and in index form.
(a) The base stays the base, and the index becomes the answer: and .
(b) The answer of the logarithm becomes the index: and .
Check (b) with the meanings from the last lecture: ✓, and ✓.
Find (a) (b) (c) .
(a) 2 to the power of what gives 32? , so .
(b) 10 to the power of what gives 0.001? Write . So .
(c) , so .
Notice the pattern in (b) and (c). With a base bigger than 1, a number between 0 and 1 always has a negative logarithm. The reason: a base bigger than 1 needs a negative index to make a fraction.
Find without a calculator.
Call the answer . Then . Neither number is a power of the other, but both are powers of 2: and .
So . Multiply the indices: . Two powers of 2 are equal only when their indices are equal, so and .
Check: . ✓ Also, 4 is less than 8, so the answer must be less than 1. It is.
Solve (a) (b) (c) .
(a) In index form: . So .
(b) In index form: . The unknown is now the base, so take a cube root: .
(c) In index form: , so and .
Check each in the original: ✓, ✓, ✓. In every part, the unknown was hidden inside the logarithm. Index form brought it out.
The most common mistake with logarithms is to swap the base and the result when changing form. The working below contains that mistake on one line. Find it.
A student finds log₂₇ 9 without a calculator. One line is wrong. Tap the line you think contains the error, then read the explanation.
A student's working for . The error is in line 2.
- Line 1. Let c = log₂₇ 9.
- Line 2. Then 9ᶜ = 27. This is the error. The base is 27, so index form is 27ᶜ = 9. The student swapped the base and the result.
- Line 3. Write both as powers of 3: (3²)ᶜ = 3³.
- Line 4. So 3²ᶜ = 3³.
- Line 5. So 2c = 3, and c = 3/2.
- Line 6. Check: 9 to the power 3/2 is (√9)³ = 27. The check passes, but only because it repeats the same swap.
The correct working: 27ᶜ = 9 gives (3³)ᶜ = 3², so 3c = 2 and c = 2/3. Check: 27 to the power 2/3 is (∛27)² = 3² = 9.
What should you have learned? The check passed, and the answer was still wrong, because a check that copies your mistake cannot find it. The size check can: 9 is smaller than 27, so must be between 0 and 1.
Three classic mistakes
means , so . It does not mean , which gives 64. The base of the logarithm is always the base of the power. Say the question in words, "3 to the power 4 gives ", and the swap cannot happen.
is not , and it is not . It is 3, because . A logarithm is never an arithmetic operation between the two numbers you can see. It is a question about an index.
is not . It has no value, because no power of 2 is negative. In the same way, has no value, because no power of 10 is 0. Try it on a calculator: it gives an error. Do not confuse this with a negative answer, such as , which is perfectly correct.
Work each one on paper first. Open a hint only when you are stuck.
-
(a) Write and in log form. (b) Write and in index form.
Hint 1
The base stays the base in both forms.
Hint 2
In log form, the index of the power is the answer of the logarithm: becomes
Full answer
(a) and . (b) and . Check (b): . ✓
-
Without a calculator, find (a) (b) (c) (d) .
Hint 1
Say each one as a question: "4 to the power of what gives 64?"
Hint 2
(b) . (c) . (d) Write 16 and 8 as powers of 2, and call the answer .
Full answer
(a) , so 3. (b) , so . (c) , so . (d) gives , so and . Check (d): . ✓ Also, 8 is less than 16, so the answer had to be less than 1.
-
Solve (a) (b) , where is a base (c) .
Hint 1
Write each equation in index form first.
Hint 2
(b) gives . Remember that a base must be positive. (c) gives .
Full answer
(a) , so . (b) . Both 3 and give 81 when raised to the power 4, but a base must be positive, so . (c) , so and . Check (c): , and . ✓
-
A scientist starts a culture with 1000 bacteria (an invented example). The number doubles every hour, so after hours there are bacteria. (a) Show that the culture reaches 20 000 bacteria when , and write as a logarithm. (b) Without a calculator, between which two whole numbers of hours does this happen? (c) Use the value to give the time in hours and minutes. (d) How long does it take to reach 40 000? Explain why the answer is so close to the answer to (c).
Hint 1
(a) Divide by 1000. Then use the definition: means .
Hint 2
(b) and . (d) 40 000 is double 20 000. How long does one doubling take?
Full answer
(a) gives . So . (b) , so is between 4 and 5 hours. (c) hours. The 0.32 of an hour is minutes, so about 4 hours 19 minutes. Check: , close to 20 000. ✓ (d) Reaching 40 000 needs , so . But 40 000 is one doubling after 20 000, and one doubling takes exactly 1 hour. So hours, about 5 hours 19 minutes. In logarithm language: . Doubling the number adds exactly 1 to its base-2 logarithm. The next lecture shows why patterns like this always hold.
John Napier, a Scottish landowner, published the first table of logarithms in 1614. He said the calculations had taken him about twenty years, and he made up the word from the Greek for "ratio" and "number". His logarithms were not quite the ones in this lecture. In 1615 Henry Briggs, a professor in London, travelled to Edinburgh to meet him. A story told years later by William Lilly says the two men looked at each other in silence for almost a quarter of an hour. We have that story from one account only. What is certain is that they agreed on base 10, with . Briggs published base-10 tables in 1617 and 1624, and for more than three hundred years astronomers, navigators and engineers did their hardest calculations with them.
Logarithms are still everywhere, because they turn enormous ranges into small, readable numbers. Earthquake magnitude is a base-10 logarithm of the shaking recorded by a seismograph: one step up means waves 10 times bigger and about 32 times the energy (USGS). The chemistry lecture on pH uses a logarithm in the same way. Whenever a quantity can be 1 or a billion, a logarithm asks the useful question: how many times did it multiply?
- A logarithm is an index: is the power you raise to, to get , so means exactly the same as .
- When changing between log form and index form, the base stays the base, the answer of the logarithm becomes the index, and the number inside becomes the result.
- The base must be positive and not 1, and the number inside must be positive, because no power of a positive base is zero or negative.
- A logarithm can be negative or a fraction, because indices can be negative or fractions, and for every allowed base because .
- is the inverse function of , so its graph is the reflection of in the line , with domain .
- The common logarithm and the natural logarithm , with base , have their own calculator keys and work exactly like every other logarithm.