# There is only one logarithm

When you learned that we use decimal notation to record numbers, you may have wondered: If we used a different number system, such as a number system with 12 symbols instead of 10, how would that change the cost of writing numbers down? Are some number systems more efficient than others? On this page, we’ll answer that question, among others.

In Properties of the logarithm, we saw that any $$f$$ with domain $$\mathbb R^+$$ that satisfies the equation $$f(x \cdot y) = f(x) + f(y)$$ for all $$x$$ and $$y$$ in its domain is either trivial (i.e., it sends all inputs to 0), or it is isomorphic to $$\log_b$$ for some base $$b$$. Thus, if we want a function’s output to change by a constant that depends on $$y$$ every time its input changes by a factor of $$y$$, we only have one meaningful degree of freedom, 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 entire behavior of the function is fully defined.

How much freedom does this choice give us? Almost none! To see this, let’s consider the difference between choosing base $$b$$ as opposed to an alternative base $$c.$$ Say we have an input $$x \in \mathbb R^+$$ — what’s the difference between $$\log_b(x)$$ and $$\log_c(x)?$$

Well, $$x = c^y$$ for some $$y$$, because $$x$$ is positive. Thus, $$\log_c(x)$$ $$=$$ $$\log_c(c^y)$$ $$=$$ $$y.$$ By contrast, $$\log_b(x)$$ $$=$$ $$\log_b(c^y)$$ $$=$$ $$y \log_b(c).$$ (Refresher.) Thus, $$\log_c$$ and $$\log_b$$ disagree on $$x$$ only by a constant factor — namely, $$\log_b(c).$$ And this is true for any $$x$$ — you can get $$\log_c(x)$$ by calculating $$\log_b(x)$$ and dividing by $$\log_b(c):$$ $$\log_c(x) = \frac{\log_b(x)}{\log_b(c)}.$$\$

This is a remarkable equation, in the sense that it’s worth remarking on. No matter what base $$b$$ we choose for $$f$$, and no matter what input $$x$$ we put into $$f$$, if we want to figure out what we would have gotten if we chose base $$c$$ instead, all we need to do is calculate $$f(c)$$ and divide $$f(x)$$ by $$f(c).$$ In other words, the different logarithm functions actually aren’t very different at all — each one has all the same information as all the others, and you can recover the behavior of $$\log_c$$ using $$\log_b$$ and a simple calculation!

(By a symmetric argument, you can show that $$\log_b(x) = \frac{\log_c(x)}{\log_c(b)},$$ which implies that $$\log_b(c) = \frac{1}{\log_c(b)}$$, a fact we already knew from from studying fractional digits.)

When you learned that we use decimal notation to record numbers, you may have wondered: If we used a different number system, such as a number system with 12 symbols instead of 10, how would that change the cost of writing numbers down? Are some number systems more efficient than others?

From the fact that the length of a written number grows logarithmically with the magnitude of the number and the above equation, we can see that, no matter how large a number is, its base 10 representation differs in length from its base 12 representation only by a factor of $$\log_{10}(12) \approx 1.08$$. Similarly, the binary representation of a number is always about $$\log_2(10) \approx 3.32$$ times longer than its decimal representation. Because there is only one logarithm function (up to a multiplicative constant), which number base you use to represent numbers only affects the size of the representation by a multiplicative constant.

Similarly, if you ever want to convert between logarithmic measurements in different bases, you only need to perform a single multiplication (or division). For example, if someone calculated how many hours it took for the bacteria colony to triple, and you want to know how long it took to double, all you need to do is multiply by $$\log_3(2) \approx 0.63.$$ There is essentially only one logarithm function; the base merely defines the unit of measure. Given measurements taken in one base, you can easily convert to another.

Which base of the logarithm is best to use? Well, by the arguments above, it doesn’t really matter which base you pick — it’s easy enough to convert between bases if you need to. However, in computer science, information theory, and many parts of physics, it’s common to choose base 2. Why? Two reasons. First, because if you’re designing a physical system to store data, a system that only has two stable states is the simplest available. Second, because if you need to pick an arbitrary amount that a thing has grown to call “one growth,” then doubling (i.e., “it’s now once again as large as it was when it started”) is a pretty natural choice. (For example, many people find the ‘half life’ of a radioactive element to be a more intuitive notion than its ‘fifth life,’ even though both are equally valid measures of radioactivity.)

In other parts of physics and engineering, the log base 10 is more common, because it has a natural relationship to the way we represent numbers (using a base 10 representation). That is, $$\log_{10}$$ is one of the easiest logarithms to calculate in your head (because you can just count the number of digits in a number’s representation), so it’s often used by engineers.

Among mathematicians, the most common base of the logarithm is $$e$$ $$\approx 2.718,$$ a trancendental number that cannot be fully written down. Why this strange base? That’s an advanced topic not covered in this tutorial. In brief, though, if you look at the derivative of the logarithm (i.e., the way the function changes if you perturb the input), if the input was $$x$$ and you perturb it a tiny amount, the output changes by about a factor of $$\frac{1}{x}$$ times a constant $$y$$ that depends on the base of the logarithm, and $$e$$ is the base that causes that constant to be $$1.$$ For this reason and a handful of others, there is a compelling sense in which $$\log_e$$ is the “true form” of the logarithm. (So much so that it has its own symbol, $$\ln,$$ which is called the “natural logarithm.”)

Regardless of which base you choose, converting between bases is easy — and as equation (1) shows, you only need to have one logarithm function in your toolkit in order to understand any other logarithm. Because if you have $$\log_b$$ and you want to know $$\log_c(x)$$, you can just calculate $$\log_b(x)$$ and divide it by $$\log_b(c)$$, and then you’re done. In other words, there is really only one logarithm function, and it doesn’t matter which one you pick.

A visualization of the graph of the logarithm where you can change the base, but it changes only the labels on the axes while the curve itself remains completely static.

Parents:

• I would consider leading with this question, to motivate the post.

• How’s this?

• It’s good.

• number systems