# Logarithm tutorial overview

The fol­low­ing top­ics are cov­ered in Ar­bital’s in­tro­duc­tory guide to log­a­r­ithms:

## 1. Defi­ni­tion of the logarithm

What is a log­a­r­ithm func­tion, any­way? You may have been told that it’s a func­tion with a graph that looks like this:

which is true, but not the whole story. This tu­to­rial be­gins by ask­ing: What is a log­a­r­ithm?.

## 2. Log as length

Log­a­r­ithms mea­sure how long a num­ber is, for a spe­cific no­tion of “length” where frac­tional lengths are al­lowed. I don’t know what $$\log_{10}(\text{2,310,426})$$ is, but I can im­me­di­ately tell you that it’s be­tween 6 and 7, be­cause it takes 7 digits to write 2,310,426:

$$\underbrace{\text{2,310,426}}_\text{7 digits}$$

Why is it $$\log_{10}$$ that mea­sures length? What does it mean for a mea­sure of “length” to be frac­tional? Why do log­a­r­ithms say that it is 316 (rather than 500) that is 2.5 digits long? Th­ese ques­tions and oth­ers are an­swered in Log as gen­er­al­ized length.

## 3. Logs mea­sure data

Log­a­r­ithms mea­sure how hard it is to rep­re­sent mes­sages us­ing phys­i­cal ob­jects in the world. Let’s say that we’re ma­gi­ci­ans, and I want to tell you what card I’m think­ing of by us­ing sleight-of-hand to ar­range some dice. How many 6-sided dice do I need to set (with­out the au­di­ence notic­ing) to send you a mes­sage that tells you which card I’m think­ing of, as­sum­ing there are 52 pos­si­bil­ities? The lower bound is $$\log_6(52).$$ Why? The an­swer re­veals a link be­tween log­a­r­ithms and the “data ca­pac­ity” of phys­i­cal ob­jects.

This idea is ex­plored across three pages: Ex­change rates be­tween digits, Frac­tional digits, and Log as the change in the cost of com­mu­ni­cat­ing.

## 4. The char­ac­ter­is­tic of the logarithm

Any time you see a func­tion $$f$$ such that $$f(x \cdot y) = f(x) + f(y)$$ for all $$x, y \in$$ $$\mathbb R^+$$, $$f$$ is a log­a­r­ithm — more or less. The char­ac­ter­is­tic of the log­a­r­ithm de­scribes the main idea, and the op­tional Prop­er­ties of the log­a­r­ithm page takes you through the proofs and dis­cusses some tech­ni­cal­ities.

## 5. There is only one logarithm

While there are many log­a­r­ithm func­tions (one for each pos­i­tive num­ber ex­cept 1), there is a sense in which they’re all do­ing ex­actly the same thing: Tap­ping into an in­tri­cate “log­a­r­ithm lat­tice”.

## 6. Life in log-space

Em­piri­cally, log­a­r­ithms have proved quite a use­ful tool for peo­ple and ma­chines who have to do lots and lots of mul­ti­pli­ca­tions. Scien­tists and en­g­ineers used to use gi­ant pre-com­puted ta­bles of the logs of com­mon num­bers, and use those to make their calcu­la­tions. To­day, many mod­ern learn­ing al­gorithms (such as AlphaGo) ma­nipu­late the logs of prob­a­bil­ities in­stead of ma­nipu­lat­ing prob­a­bil­ities di­rectly. Why? This tu­to­rial con­cludes by ex­plor­ing when and why it is eas­ier to deal with the log­a­r­ithms of things than it is to deal with the things them­selves, on the page Life in logspace.

Th­ese six con­cepts are nowhere near all there is to say on the topic of log­a­r­ithms. Log­a­r­ithms have ap­pli­ca­tions to many do­mains, in­clud­ing physics, com­puter sci­ence, calcu­lus, num­ber the­ory, and psy­chol­ogy. Log­a­r­ithms have many in­ter­est­ing prop­er­ties, such as nice deriva­tives, nice in­te­grals, and in­ter­est­ing ap­prox­i­ma­tion al­gorithms. One of the bases of the log­a­r­ithm, $$\log_e,$$ is “spe­cial.” The log­a­r­ithm gets quite a bit more in­ter­est­ing when ex­tended to the com­plex plane. Those are all more ad­vanced top­ics, which aren’t cov­ered in this tu­to­rial. If you want to learn more about those sorts of top­ics, see Ar­bital’s ad­vanced log­a­r­ithm tu­to­rial.

This guide fo­cuses on build­ing a solid in­tu­ition for what the log­a­r­ithm does, and why it has its most im­por­tant prop­er­ties.

Parents: