A logarithm answers a single question: what exponent do I need to raise the base to in order to get this number?
logba=x⟺bx=a
with the existence conditions b>0, b=1 and a>0.
First examples
- log28=3, because 23=8.
- log101000=3, because 103=1000.
- log51=0, because 50=1.
- log391=−2, because 3−2=91.
Worked example: log927
- Write both numbers as powers of 3: 9=32 and 27=33.
- Look for x with 9x=27: (32)x=33⇒32x=33.
- 2x=3, so log927=23.
Properties
For valid bases and arguments:
logb(x⋅y)logbyxlogbxnlogba=logbx+logby=logbx−logby=n⋅logbx=logcblogca
They all come from the rules of exponents: multiplying powers with the same base adds exponents, and a logarithm is exactly an exponent.
Worked example: log12 given log2≈0.301 and log3≈0.477
- Factor: 12=22⋅3.
- log12=2log2+log3.
- log12≈0.602+0.477=1.079.
Worked example: log5 with the same data
- 5=210.
- log5=log10−log2≈1−0.301=0.699.
Change of base
Calculators usually have only log (base 10) and ln (base e). For any other base, divide:
Worked example: log23
- log23=log2log3.
- ≈0.3010.477≈1.585.
- Rough check: 21=2<3<4=22, so the value lies between 1 and 2.
Exponential equations
When you cannot match the bases, take the logarithm of both sides and use the power rule.
Worked example: 2x=10
- log2x=log10.
- x⋅log2=1.
- x=log21≈0.3011≈3.32.
Worked example: 3x+1=81
- 81=34, so the bases can be matched: x+1=4.
- x=3.
Common mistakes
- Writing log(a+b)=loga+logb.
- Ignoring the existence conditions and accepting solutions that make the argument negative.
- Confusing logbxn=nlogbx with (logbx)n.
Frequently asked questions
Why can't the base of a logarithm be 1?
Because 1 raised to any power is 1. The equation 1^x = 5 has no solution and 1^x = 1 has infinitely many, so the logarithm would not be well defined.
Is there a logarithm of a negative number?
Not in the real numbers. With a positive base, b^x is always positive, so no real exponent produces a negative number or zero.
What does log mean with no base written?
In most school math, log x means base 10 and ln x means base e ≈ 2.718. In computer science, log often means base 2, so check the convention.
Is log(a + b) equal to log a + log b?
No. The rule is for products: log(a · b) = log a + log b. For example, log(1 + 1) = log 2 ≈ 0.301, but log 1 + log 1 = 0.