Computing for any is straightforward, and the previous lesson did it repeatedly. Going the other way, finding the for which , has no method at all in anything covered so far, and it is the question every growth problem eventually asks: not what the balance will be, but when it doubles.
This lesson defines the function that answers it, derives its three laws from the index laws, and puts it to work on dating, doubling and the measurement scales that span too many orders of magnitude to plot any other way.
The inverse of an exponential
For a fixed base greater than zero and not equal to one, the exponential passes the horizontal line test: it increases steadily when and decreases steadily when , so no output is ever repeated. By the criterion of the fourth lesson it therefore has an inverse, and that inverse is the logarithm to base :
Read it as the question "what power of gives ", and most confusion about logarithms disappears. So because ; ; , since any base to the power zero is one.
Being an inverse fixes its domain and range without further argument. The range of is the positive reals, so that is the domain of the logarithm: there is no logarithm of zero or of a negative number, because no power of a positive base produces one. The domain of is all of , so that is the range: a logarithm can be any real number, positive or negative. And by the reflection rule of the fifth lesson, the graph of is the graph of flipped in the line , rising steeply near zero, crossing the axis at , and thereafter climbing ever more slowly.
Two bases are so common they have their own notation. Base is the common logarithm, written , and base is the natural logarithm, written . Base appears throughout computing, where it counts bits.
Three laws, and where they come from
Each index law from the previous lesson becomes a logarithm law when read backwards. Let and , so that and . Then , and taking the logarithm of both sides gives
The logarithm turns multiplication into addition. The same move on gives , and on gives
That third law is the one that solves equations, because it takes an unknown out of an exponent and puts it in front where algebra can reach it.
A fourth relation lets any base be converted to any other, which matters because calculators carry only two. If then ; take natural logarithms of both sides and use the third law to get , so
The choice of here is arbitrary and base works identically, which is a useful check: computed as , and as .
Two errors are worth naming because they are so common. There is no law for , which does not simplify at all. And is not ; the first is a change of base and the second is a difference.
Solving for an exponent
The routine has three steps: isolate the exponential, take logarithms of both sides, and use the third law to bring the exponent down.
Example. Solve .
Take natural logarithms: , so and . Check: , which is the intended to the precision of the rounded exponent.
Now you. Solve .
Answer
. Check: .
Doubling time is this calculation with the answer fixed in advance. Money at an annual rate multiplies by , so doubling needs , giving . At three per cent that is years; at five per cent, years; at eight per cent, years.
The familiar rule of thumb, that dividing by the percentage rate gives the doubling time, is now visible as an approximation to this formula: it predicts , and against the true , and . It is good to within a few per cent across the range of rates anyone encounters, and it is wrong for very large rates, where the logarithm's curvature bites.
Dating the past
Radiocarbon dating is the same equation solved for time rather than for a rate. Living tissue holds carbon-14 at the atmospheric ratio; from death the isotope decays with a half-life of years and is not replenished, so measuring what fraction remains gives an age. Willard Libby developed the method in 1949 and received the Nobel Prize for chemistry in 1960 for it.
The decay law from the previous lesson is . Take logarithms of both sides and use the third law:
Example. A piece of charcoal retains per cent of the carbon-14 of living wood. How old is it?
Substituting, years. A check on plausibility: two half-lives would leave per cent at years, and per cent is a little less, so the age must be a little more, as it is.
Now you. A bone retains per cent. How old is it?
Answer
years.
The technique has honest limits, and practitioners state them. Beyond about years, roughly nine half-lives, too little carbon-14 remains to measure against background. The atmospheric ratio is not in fact constant, so raw dates are corrected against tree-ring and coral records, a calibration that can move a result by centuries. And nuclear weapons testing in the 1950s nearly doubled atmospheric carbon-14, which makes recent material behave strangely and, incidentally, allows the year of formation of tissue from that era to be dated precisely.
Why the logarithm was a technology
Logarithms were invented as a labour-saving device, not as a piece of theory. John Napier published Mirifici Logarithmorum Canonis Descriptio in 1614 after twenty years of computation, and Henry Briggs recast the idea to base and published tables to fourteen places in 1624. The point was the first law. Before mechanical calculators, multiplying two eight-digit numbers by hand was slow and error-prone, while adding them was easy, so a table that converted every multiplication into an addition roughly halved the labour of astronomical calculation. Laplace said it doubled the life of the astronomer.
The slide rule is that idea in wood. Two rulers marked not in units but in the logarithms of units, slid against each other, add lengths that represent logarithms and therefore multiply the numbers. Every engineer carried one until pocket calculators arrived in the early 1970s, and the Apollo programme was flown with them.
Two habits of that era survive because they remain useful. The characteristic, the whole-number part of a base- logarithm, is the order of magnitude: , so Avogadro's number has digits. And in computing, counts how many times a quantity can be halved, which is why searching a sorted list of a trillion items takes at most , that is , comparisons.
Scales that span too much to plot
When a quantity ranges over many orders of magnitude, plotting it linearly wastes almost the whole axis on the top end. Taking logarithms first compresses it into something a person can read, and several measurement scales have this built in.
Acidity is defined as , with the concentration in moles per litre. Sound level in decibels is against a reference intensity, so an increase of dB is a factor of in intensity: ordinary conversation at dB carries a thousandth of the energy of a food blender at dB. Earthquake magnitude, as defined by Charles Richter in 1935, adds one unit per factor of ten in ground-motion amplitude, which corresponds to a factor of about in energy, since energy scales as the power of amplitude. Stellar magnitudes, formalised by Norman Pogson in 1856 to match an ancient naked-eye scale, put five magnitudes to a factor of in brightness, so one magnitude is a factor of , and the scale runs backwards with brighter objects having smaller numbers.
Example. A solution has a hydrogen ion concentration of mol per litre. What is its pH, and how does it compare with pure water at pH ?
. That is units below neutral, so the concentration is about times that of pure water. This is roughly the acidity of orange juice.
Now you. Seawater has a hydrogen ion concentration near mol per litre. What is its pH?
Answer
, mildly alkaline.
How slowly it grows
The previous lesson showed the exponential outrunning every polynomial. Reflecting that statement in the line gives its counterpart: the logarithm grows more slowly than every positive power of , however small the power. It does grow without limit, since reaches when reaches , but it takes its time.
That slowness is exactly why logarithmic scales work. Multiplying the input by a fixed factor adds a fixed amount to the output, so a plot of the logarithm turns proportional change into equal steps, and data spanning a factor of a billion fits on one axis.
Growth and decay are now fully covered: exponentials go forward, logarithms come back, and each is the other's mirror. What none of this describes is anything that repeats. A tide, a note, a rotating shaft and an alternating current return to the same value again and again, and no polynomial, exponential or logarithm can do that, since each is either injective or eventually monotone. Functions that repeat come from angles, and the next lesson starts with the triangle.