### A Logarithm is Just the Number of Digits

If you don’t have a good intuition for how logarithms work, (e.g. what does it mean that happiness scales with the log of income? Or why does an algorithm that runs in log(log(x)) steps always run in 5 steps or fewer?) here is how you can explain it to a third grader: It’s the number of digits (roughly). For example it’s the number of zeros in these: $log_{10}(100) = 2$ $log_{10}(1000) =3$ $log_{10}(0.01) = -2$ $log_{10}(0.001) = -3$

For this to work out we have to transition through zero: $log(1)=0$

If it bothers you that I’m off by one, because clearly 100 has 3 digits, not 2, you can get the actual number of digits by rounding away from 0 to the next integer.

Where it gets complicated is when you have a number between two round numbers: $log_{10}(123) = ?$

We can’t just count the number of digits. It’s got to be somewhere between the other two numbers, coming out to roughly $2.09$. But lets not worry about those odd cases for now. Where this really helps is when trying to build an intuition for the logarithm rules:

Read the rest of this entry »