Advanced level

The logarithm as an inverse operation

A logarithm answers the question of which power a base has to be raised to in order to give a number. Learn the definition of log_a b, the conditions on the base and the argument, the common and natural logarithms, and the four properties that turn multiplication into addition.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

Where this is used

Real situations where you count exactly the way this lesson teaches:

  • Noise and hearing
    A conversation runs at about 60 dB and a busy street at 90 dB. The 30 dB gap does not mean half again as loud — it means 10³ = 1000 times the sound power, because the decibel is a logarithmic unit rather than an ordinary scale.
  • Saving money
    A deposit pays 5% a year, and the question is after how many years the capital doubles. Solving 1.05ⁿ = 2 gives n = log 2 : log 1.05 ≈ 14.2 years. Without a logarithm all that is left is multiplying year by year and guessing.
  • Chemistry laboratory
    Acidity is reported as pH = −log[H⁺]. Juice at pH 3 has a hydrogen-ion concentration 100 times higher than tap water at pH 5, although only 2 separates them on the scale — every pH unit is a factor of ten.
  • Software development
    A binary search through a sorted set of a million records needs log₂ 1,000,000 ≈ 20 comparisons, while scanning one by one needs 500,000 on average. That difference decides whether a database answers instantly or after a second.

All formulas

  • Definition of a logarithm

    logab=c    ac=b(a>0, a1, b>0)\log_a b = c \iff a^c = b \quad (a > 0,\ a \neq 1,\ b > 0)

    a logarithm is the exponent the base is raised to

  • Two logarithms straight from the definition

    loga1=0logaa=1\log_a 1 = 0 \qquad \log_a a = 1

    because a⁰ = 1 and a¹ = a

  • Logarithm of a product

    loga(xy)=logax+logay\log_a (x \cdot y) = \log_a x + \log_a y

    multiplication turns into addition

  • Logarithm of a quotient

    logaxy=logaxlogay\log_a \frac{x}{y} = \log_a x - \log_a y

    division turns into subtraction

  • Logarithm of a power

    logaxk=klogax\log_a x^k = k \cdot \log_a x

    the exponent comes out in front

  • Inverse operations

    alogax=xlogaak=ka^{\log_a x} = x \qquad \log_a a^k = k

    raising to a power and taking a logarithm cancel each other

  • Common and natural logarithm

    logx=log10xlnx=logex\log x = \log_{10} x \qquad \ln x = \log_{e} x

    two bases used so often that they have their own notation

The statement 23=82^3 = 8 can be read three ways, and each one leaves a different unknown. When the result is unknown, we compute a power. When the base is unknown, we take a root: 83=2\sqrt[3]{8} = 2. That leaves a third possibility — the exponent is unknown:

2x=82^x = 8

The answer is 33, and the operation that produces it is called a logarithm. It is the missing link beside powers and roots: a power asks for the result, a root asks for the base, and a logarithm asks for the exponent.

Definition

logab=c    ac=b(a>0, a1, b>0)\log_a b = c \iff a^c = b \qquad (a > 0,\ a \neq 1,\ b > 0)

Read: the logarithm of bb to base aa is the exponent that aa must be raised to in order to give bb. The number bb is called the argument.

The easiest check is to rewrite the logarithm as a power:

log28=3, because 23=8log101000=3, because 103=1000\log_2 8 = 3, \ \text{because} \ 2^3 = 8 \qquad \log_{10} 1000 = 3, \ \text{because} \ 10^3 = 1000 log525=2log381=4log71=0\log_5 25 = 2 \qquad \log_3 81 = 4 \qquad \log_7 1 = 0

The three conditions in brackets are not decoration — each follows from how powers behave:

  • a>0a > 0 and a1a \neq 1 — one raised to any power gives 11, so the equation 1c=81^c = 8 would have no solution while 1c=11^c = 1 would have infinitely many;
  • b>0b > 0 — a power of a positive number is always positive, so no exponent gives 2c=82^c = -8. The logarithm of a negative number and of zero does not exist.

Two values follow straight from the definition and are worth knowing by heart:

loga1=0logaa=1\log_a 1 = 0 \qquad \log_a a = 1

because a0=1a^0 = 1 and a1=aa^1 = a.

Compute log₂ 64, log₁₀ 0.01 and log₄ 2.

Common and natural logarithms

Two bases turn up so often that they have a shorthand:

logx=log10xlnx=logex\log x = \log_{10} x \qquad \ln x = \log_{e} x

The common logarithm (base 1010) sits behind every scale on which the next step means a factor of ten: decibels, pH, the Richter scale. The natural logarithm has base e2.718e \approx 2.718 — the number that appears wherever something grows or decays continuously.

Properties

Every property of the logarithm is a law of exponents rewritten. Take x=apx = a^p and y=aqy = a^q, that is logax=p\log_a x = p and logay=q\log_a y = q. Then

xy=apaq=ap+q,x \cdot y = a^p \cdot a^q = a^{p+q},

which says exactly that the logarithm of a product is the sum of the logarithms:

loga(xy)=logax+logay\log_a (x \cdot y) = \log_a x + \log_a y

In the same way dividing powers gives subtraction, and raising a power to a power gives multiplication:

logaxy=logaxlogaylogaxk=klogax\log_a \frac{x}{y} = \log_a x - \log_a y \qquad \log_a x^k = k \cdot \log_a x

That is the whole story of the logarithm: it turns multiplication into addition and exponentiation into multiplication. Before calculators existed, this is precisely how many-digit numbers were multiplied — by reading logarithms off a table and adding them.

The drawings show the same thing. The numbers 1,2,4,8,161, 2, 4, 8, 16 run apart faster and faster:

0481216124816
Each number is twice the previous one, so the gaps between them double as well.

Their logarithms to base 22 sit at equal spacings:

012345log₂ 1log₂ 2log₂ 4log₂ 8log₂ 16
Multiplying by 2 on the left corresponds to adding 1 on the right — which is what the product rule says.

The last pair of formulas states outright that taking a logarithm and raising to a power cancel each other:

alogax=xlogaak=ka^{\log_a x} = x \qquad \log_a a^k = k
Compute log₃ 18 + log₃ 4.5 and log₂ 40 − log₂ 5.

What it is for

A logarithm is the answer wherever the unknown sits in the exponent. A deposit paying 5%5\% multiplies the capital by 1.051.05 each year, so the question of how many years it takes to double is the equation

1.05n=2n=log2log1.0514.21.05^n = 2 \quad\Rightarrow\quad n = \frac{\log 2}{\log 1.05} \approx 14.2

The same construction describes radioactive decay, loan repayment and the running time of an algorithm. Logarithms also sit behind every scale on which a step means a factor rather than an increment: 30 decibels of difference is a thousandfold in sound power, and two pH units are a hundredfold in concentration. What that comes to in bels and nepers is what the decibel calculator works out.

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
log₁₀ 100 =

Common mistakes

  • A logarithm of a sumloga(x+y)\log_a (x + y) is not logax+logay\log_a x + \log_a y. The rules cover products and quotients, not addition.
  • Splitting a logarithm into a quotient of logarithmslogaxy\log_a \tfrac{x}{y} is logaxlogay\log_a x - \log_a y, not logaxlogay\tfrac{\log_a x}{\log_a y}.
  • A logarithm of a negative number or of zero — it does not exist; the domain of a logarithm is the positive numbers.
  • Swapping the base with the argumentlog28=3\log_2 8 = 3, but log82=13\log_8 2 = \tfrac{1}{3}. The base is the one written below.
  • Treating a negative result as an errorlog100.01=2\log_{10} 0.01 = -2 is correct: the result may be negative even though the argument may not.

Formula card

Topic: Logarithms

  • Definition of a logarithm

    logab=c    ac=b(a>0, a1, b>0)\log_a b = c \iff a^c = b \quad (a > 0,\ a \neq 1,\ b > 0)

    a logarithm is the exponent the base is raised to

  • Two logarithms straight from the definition

    loga1=0logaa=1\log_a 1 = 0 \qquad \log_a a = 1

    because a⁰ = 1 and a¹ = a

  • Logarithm of a product

    loga(xy)=logax+logay\log_a (x \cdot y) = \log_a x + \log_a y

    multiplication turns into addition

  • Logarithm of a quotient

    logaxy=logaxlogay\log_a \frac{x}{y} = \log_a x - \log_a y

    division turns into subtraction

  • Logarithm of a power

    logaxk=klogax\log_a x^k = k \cdot \log_a x

    the exponent comes out in front

  • Inverse operations

    alogax=xlogaak=ka^{\log_a x} = x \qquad \log_a a^k = k

    raising to a power and taking a logarithm cancel each other

  • Common and natural logarithm

    logx=log10xlnx=logex\log x = \log_{10} x \qquad \ln x = \log_{e} x

    two bases used so often that they have their own notation

0481216124816
The numbers 1, 2, 4, 8, 16 on an ordinary axis — each one twice as far out as the one before.
012345log₂ 1log₂ 2log₂ 4log₂ 8log₂ 16
The logarithms of those same numbers to base 2 sit at equal spacings — multiplying by 2 became adding 1.

Frequently asked questions

Related articles