# There is only one logarithm

When you learned that we use dec­i­mal no­ta­tion to record num­bers, you may have won­dered: If we used a differ­ent num­ber sys­tem, such as a num­ber sys­tem with 12 sym­bols in­stead of 10, how would that change the cost of writ­ing num­bers down? Are some num­ber sys­tems more effi­cient than oth­ers? On this page, we’ll an­swer that ques­tion, among oth­ers.

In Prop­er­ties of the log­a­r­ithm, we saw that any $$f$$ with do­main $$\mathbb R^+$$ that satis­fies the equa­tion $$f(x \cdot y) = f(x) + f(y)$$ for all $$x$$ and $$y$$ in its do­main is ei­ther triv­ial (i.e., it sends all in­puts to 0), or it is iso­mor­phic to $$\log_b$$ for some base $$b$$. Thus, if we want a func­tion’s out­put to change by a con­stant that de­pends on $$y$$ ev­ery time its in­put changes by a fac­tor of $$y$$, we only have one mean­ingful de­gree of free­dom, and that’s the choice of $$b \neq 1$$ such that $$f(b) = 1$$. Once we choose which value of $$b$$ $$f$$ sends to 1, the en­tire be­hav­ior of the func­tion is fully defined.

How much free­dom does this choice give us? Al­most none! To see this, let’s con­sider the differ­ence be­tween choos­ing base $$b$$ as op­posed to an al­ter­na­tive base $$c.$$ Say we have an in­put $$x \in \mathbb R^+$$ — what’s the differ­ence be­tween $$\log_b(x)$$ and $$\log_c(x)?$$

Well, $$x = c^y$$ for some $$y$$, be­cause $$x$$ is pos­i­tive. Thus, $$\log_c(x)$$ $$=$$ $$\log_c(c^y)$$ $$=$$ $$y.$$ By con­trast, $$\log_b(x)$$ $$=$$ $$\log_b(c^y)$$ $$=$$ $$y \log_b(c).$$ (Refresher.) Thus, $$\log_c$$ and $$\log_b$$ dis­agree on $$x$$ only by a con­stant fac­tor — namely, $$\log_b(c).$$ And this is true for any $$x$$ — you can get $$\log_c(x)$$ by calcu­lat­ing $$\log_b(x)$$ and di­vid­ing by $$\log_b(c):$$ $$\log_c(x) = \frac{\log_b(x)}{\log_b(c)}.$$\$

This is a re­mark­able equa­tion, in the sense that it’s worth re­mark­ing on. No mat­ter what base $$b$$ we choose for $$f$$, and no mat­ter what in­put $$x$$ we put into $$f$$, if we want to figure out what we would have got­ten if we chose base $$c$$ in­stead, all we need to do is calcu­late $$f(c)$$ and di­vide $$f(x)$$ by $$f(c).$$ In other words, the differ­ent log­a­r­ithm func­tions ac­tu­ally aren’t very differ­ent at all — each one has all the same in­for­ma­tion as all the oth­ers, and you can re­cover the be­hav­ior of $$\log_c$$ us­ing $$\log_b$$ and a sim­ple calcu­la­tion!

(By a sym­met­ric ar­gu­ment, you can show that $$\log_b(x) = \frac{\log_c(x)}{\log_c(b)},$$ which im­plies that $$\log_b(c) = \frac{1}{\log_c(b)}$$, a fact we already knew from from study­ing frac­tional digits.)

When you learned that we use dec­i­mal no­ta­tion to record num­bers, you may have won­dered: If we used a differ­ent num­ber sys­tem, such as a num­ber sys­tem with 12 sym­bols in­stead of 10, how would that change the cost of writ­ing num­bers down? Are some num­ber sys­tems more effi­cient than oth­ers?

From the fact that the length of a writ­ten num­ber grows log­a­r­ith­mi­cally with the mag­ni­tude of the num­ber and the above equa­tion, we can see that, no mat­ter how large a num­ber is, its base 10 rep­re­sen­ta­tion differs in length from its base 12 rep­re­sen­ta­tion only by a fac­tor of $$\log_{10}(12) \approx 1.08$$. Similarly, the bi­nary rep­re­sen­ta­tion of a num­ber is always about $$\log_2(10) \approx 3.32$$ times longer than its dec­i­mal rep­re­sen­ta­tion. Be­cause there is only one log­a­r­ithm func­tion (up to a mul­ti­plica­tive con­stant), which num­ber base you use to rep­re­sent num­bers only af­fects the size of the rep­re­sen­ta­tion by a mul­ti­plica­tive con­stant.

Similarly, if you ever want to con­vert be­tween log­a­r­ith­mic mea­sure­ments in differ­ent bases, you only need to perform a sin­gle mul­ti­pli­ca­tion (or di­vi­sion). For ex­am­ple, if some­one calcu­lated how many hours it took for the bac­te­ria colony to triple, and you want to know how long it took to dou­ble, all you need to do is mul­ti­ply by $$\log_3(2) \approx 0.63.$$ There is es­sen­tially only one log­a­r­ithm func­tion; the base merely defines the unit of mea­sure. Given mea­sure­ments taken in one base, you can eas­ily con­vert to an­other.

Which base of the log­a­r­ithm is best to use? Well, by the ar­gu­ments above, it doesn’t re­ally mat­ter which base you pick — it’s easy enough to con­vert be­tween bases if you need to. How­ever, in com­puter sci­ence, in­for­ma­tion the­ory, and many parts of physics, it’s com­mon to choose base 2. Why? Two rea­sons. First, be­cause if you’re de­sign­ing a phys­i­cal sys­tem to store data, a sys­tem that only has two sta­ble states is the sim­plest available. Se­cond, be­cause if you need to pick an ar­bi­trary amount that a thing has grown to call “one growth,” then dou­bling (i.e., “it’s now once again as large as it was when it started”) is a pretty nat­u­ral choice. (For ex­am­ple, many peo­ple find the ‘half life’ of a ra­dioac­tive el­e­ment to be a more in­tu­itive no­tion than its ‘fifth life,’ even though both are equally valid mea­sures of ra­dioac­tivity.)

In other parts of physics and en­g­ineer­ing, the log base 10 is more com­mon, be­cause it has a nat­u­ral re­la­tion­ship to the way we rep­re­sent num­bers (us­ing a base 10 rep­re­sen­ta­tion). That is, $$\log_{10}$$ is one of the eas­iest log­a­r­ithms to calcu­late in your head (be­cause you can just count the num­ber of digits in a num­ber’s rep­re­sen­ta­tion), so it’s of­ten used by en­g­ineers.

Among math­e­mat­i­ci­ans, the most com­mon base of the log­a­r­ithm is $$e$$ $$\approx 2.718,$$ a tran­cen­den­tal num­ber that can­not be fully writ­ten down. Why this strange base? That’s an ad­vanced topic not cov­ered in this tu­to­rial. In brief, though, if you look at the deriva­tive of the log­a­r­ithm (i.e., the way the func­tion changes if you per­turb the in­put), if the in­put was $$x$$ and you per­turb it a tiny amount, the out­put changes by about a fac­tor of $$\frac{1}{x}$$ times a con­stant $$y$$ that de­pends on the base of the log­a­r­ithm, and $$e$$ is the base that causes that con­stant to be $$1.$$ For this rea­son and a hand­ful of oth­ers, there is a com­pel­ling sense in which $$\log_e$$ is the “true form” of the log­a­r­ithm. (So much so that it has its own sym­bol, $$\ln,$$ which is called the “nat­u­ral log­a­r­ithm.”)

Re­gard­less of which base you choose, con­vert­ing be­tween bases is easy — and as equa­tion (1) shows, you only need to have one log­a­r­ithm func­tion in your toolkit in or­der to un­der­stand any other log­a­r­ithm. Be­cause if you have $$\log_b$$ and you want to know $$\log_c(x)$$, you can just calcu­late $$\log_b(x)$$ and di­vide it by $$\log_b(c)$$, and then you’re done. In other words, there is re­ally only one log­a­r­ithm func­tion, and it doesn’t mat­ter which one you pick.

A vi­su­al­iza­tion of the graph of the log­a­r­ithm where you can change the base, but it changes only the la­bels on the axes while the curve it­self re­mains com­pletely static.

Parents:

• I would con­sider lead­ing with this ques­tion, to mo­ti­vate the post.

• num­ber systems