Sub topic 10
Logarithms as the inverse of exponentiation
This chapter assumes you know the laws of indices, zero, negative and fractional exponents, and how to solve simple equations. It introduces the logarithm as the operation that undoes exponentiation. Later chapters build the laws, change of base, equations and inequalities on this definition.
The definition
A logarithm answers one question: to what power must the base be raised to get a given number?
If b^x = N, then x = log_b N. The two statements say the same thing in different forms.
- b is the base.
- N is the argument, the number whose logarithm you take.
- x is the logarithm, which is an exponent.
For example, 2^5 = 32, so log2 32 = 5. Also 10^(-2) = 0.01, so log10 0.01 = -2.
The key point is that a logarithm is an exponent. Every fact about logarithms is a fact about exponents in different notation.
Converting between the two forms
Most CAT logarithm problems start with a conversion. Move the base to the other side and the exponent becomes the logarithm.
| Exponential form | Logarithmic form |
|---|---|
| 3^4 = 81 | log_3 81 = 4 |
| 5^0 = 1 | log_5 1 = 0 |
| 7^(-1) = 1/7 | log_7 (1/7) = -1 |
| 16^(1/2) = 4 | log_16 4 = 1/2 |
| 8^(2/3) = 4 | log_8 4 = 2/3 |
To evaluate log_b N in your head, write N as a power of b. The exponent is the answer.
Worked example: find log4 32. Neither number is a power of the other, so use base 2. Then 4 = 2^2 and 32 = 2^5. Let x = log4 32, so 4^x = 32. Then 2^(2x) = 2^5, so 2x = 5 and x = 5/2.
Restrictions on base and argument
The definition only works for some values. The restrictions follow from what exponentiation can produce.
- The argument must be positive. A positive base raised to any real power gives a positive number. So b^x can never be 0 or negative, and log_b N is undefined for N ≤ 0.
- The base must be positive. Fractional powers of negative numbers are not defined as real numbers in general. For example, (-8)^(1/2) is not real.
- The base cannot be 1. Since 1^x = 1 for every x, the equation 1^x = N has no solution unless N = 1, and then every x works. Neither case gives a single answer.
So the conditions are b > 0, b ≠ 1 and N > 0. The base is allowed to be less than 1, such as 1/2. It just behaves differently, as described below.
Three values worth memorising
For any valid base b:
- log_b 1 = 0, because b^0 = 1.
- log_b b = 1, because b^1 = b.
- log_b (b^k) = k, because the exponent of b is already k.
The third value generalises the first two. It is the statement that log_b undoes b^x.
Inverse relationship
The functions f(x) = b^x and g(x) = log_b x undo each other. This gives two identities:
- log_b (b^x) = x for every real x.
- b^(log_b N) = N for every N > 0.
The second identity is useful for simplifying. For example, 5^(log5 9) = 9. Another example: 2^(3 + log2 5) = 2^3 · 2^(log_2 5) = 8 · 5 = 40.
The first identity applies directly to values like log3 (3^7) = 7. It also handles cases such as log(1/2) 8. Since 8 = 2^3 = (1/2)^(-3), we get log_(1/2) 8 = -3.
Common and natural logarithms
Two bases appear so often that they have their own names.
| Name | Base | Notation |
|---|---|---|
| Common logarithm | 10 | log or log_10 |
| Natural logarithm | e ≈ 2.718 | ln or log_e |
CAT problems almost always use base 10 or a stated base. When the base is not written, assume 10 unless the problem says otherwise. Python's math.log(x) is the natural logarithm, while math.log10(x) is the common one. Be careful when you move between notations.
How the graph behaves
The shape depends on whether the base is above or below 1.
- If b > 1, log_b x increases as x increases. Larger arguments give larger logarithms.
- If 0 < b < 1, log_b x decreases as x increases.
For b > 1 the logarithm is negative when 0 < x < 1, zero at x = 1, and positive when x > 1. For 0 < b < 1 the signs are reversed. This matters later for inequalities, because the direction of an inequality flips when the base is below 1.
The values below show the pattern for base 2 and base 1/2.
| x | log_2 x | log_(1/2) x |
|---|---|---|
| 1/4 | -2 | 2 |
| 1/2 | -1 | 1 |
| 1 | 0 | 0 |
| 2 | 1 | -1 |
| 8 | 3 | -3 |
Notice that log(1/2) x = -log2 x. A base below 1 flips the sign. The chapter on change of base shows why.
Solving basic problems
Three problem types cover most of what appears at this stage. In each, convert to exponential form first.
Find the logarithm. Evaluate log9 27. Let x = log9 27, so 9^x = 27. Write both in base 3: 3^(2x) = 3^3. Then x = 3/2.
Find the argument. If log_5 N = -2, then N = 5^(-2) = 1/25.
Find the base. If logb 64 = 3, then b^3 = 64, so b = 4. Here the base must be positive, so the only valid value is 4. If instead logb 64 = 6, then b^6 = 64 and b = 2, again taking the positive root. The negative root -2 is rejected because a base must be positive.
A nested example: find log2 (log3 81). First log3 81 = 4, because 3^4 = 81. Then log2 4 = 2. Work from the inside outward.
A harder example: if log_x (1/8) = -3/2, find x. Convert: x^(-3/2) = 1/8, so x^(3/2) = 8. Raise both sides to the power 2/3: x = 8^(2/3) = 4. Check the domain: the base 4 is positive and not 1, and the argument 1/8 is positive, so x = 4 is valid.
Verifying with code
The identities above are easy to confirm numerically. This script checks the inverse relationship, the three special values and the sign flip for a base below 1.
import math
# log undoes exponentiation, and exponentiation undoes log
assert math.isclose(math.log(2 ** 7, 2), 7)
assert math.isclose(2 ** math.log(9, 2), 9)
# special values
assert math.log(1, 5) == 0
assert math.isclose(math.log(5, 5), 1)
# log_4(32) = 5/2
assert math.isclose(math.log(32, 4), 2.5)
# a base below 1 flips the sign
assert math.isclose(math.log(8, 0.5), -math.log(8, 2))
# math.log with one argument is natural log, math.log10 is common log
assert math.isclose(math.log(100), math.log(100, math.e))
assert math.isclose(math.log10(100), 2)
print("all inverse-relationship checks passed")Common errors
- Reading the logarithm as a product. The expression log_b N is not log times b times N. It is a single number.
- Placing the base wrongly during conversion. In b^x = N, the base b stays the base. The result is logb N = x, not logN b = x.
- Treating log of a sum as a sum of logs. There is no simple rule for log (a + b). The laws in the next chapter apply to products, quotients and powers only.
- Accepting a negative or zero argument. Always check the domain at the end.
- Forgetting the sign flip for bases below 1. An answer of -3 may be correct where you expected 3.
Quick checks
Before accepting an answer, run these tests.
- Convert back to exponential form and see whether the equation holds.
- If the base is above 1, a number greater than 1 must have a positive logarithm, and a number between 0 and 1 must have a negative one.
- If the argument is an exact power of the base, the answer should be a clean number. A messy answer usually signals a slip.
- If the argument lies between two consecutive powers of the base, the logarithm lies between the two exponents. For example, 20 lies between 2^4 = 16 and 2^5 = 32, so log_2 20 is between 4 and 5.
Exercise
Find the value of log8 (1/4) + log(1/3) 81, and state which restriction on the base would be violated if the base 1 were used instead.
Show answer
First, log8 (1/4): let x be this value, so 8^x = 1/4. Writing both in base 2 gives 2^(3x) = 2^(-2), so x = -2/3. Second, log(1/3) 81: let y be this value, so (1/3)^y = 81. Since 81 = 3^4 = (1/3)^(-4), y = -4. The sum is -2/3 - 4 = -14/3. Base 1 is not allowed because 1^x = 1 for every x, so log_1 N is undefined for N ≠ 1 and not a single value for N = 1.
Exercise
If log_x 125 = 3/2, find x, and state whether any other base could be a solution.
Show answer
Convert to exponential form: x^(3/2) = 125. Raise both sides to the power 2/3: x = 125^(2/3) = (5^3)^(2/3) = 5^2 = 25. Check: 25^(3/2) = (sqrt 25)^3 = 5^3 = 125. A base must be positive, so no negative base is allowed, and 25 is the only solution.
Exercise
Simplify 3^(2 + log3 7) and decide, without a calculator, between which two integers log3 50 lies.
Show answer
Using 3^(a+b) = 3^a · 3^b, we get 3^2 · 3^(log3 7) = 9 · 7 = 63. For the second part, 3^3 = 27 and 3^4 = 81, and 27 < 50 < 81, so log3 50 lies between 3 and 4.