# Can someone explain log?

I have done some higher math, being an engineer. They usually focus on getting the correct answer as supposed to actually understanding math. Glorified calculators, basically. I know how to do stuff with $\log x$, even calculate it with different bases, yay me. So my next question might come as a bit of surprise.

Can someone explain log from a real life point of view.

Bonus points for explain $x \log x$.

-
what exactly do you mean by the question -- real life application of log, or some real life manifestation of the function? – InterestedGuest Jan 22 '11 at 17:24
This is an enormous topic, as logarithms appear in every branch of mathematics, pure and applied. See en.wikipedia.org/wiki/Logarithm#Applications for starters. Can you ask a more specific question? What kind of answer are you looking for? What are you dissatisfied with, and conversely, what would be particularly satisfying to hear? – Qiaochu Yuan Jan 22 '11 at 17:30

A basic practical reason to care about logarithms is that there are many numbers in real life which vary greatly in size, and it is both a pain and misleading to compare their sizes directly; one should instead compare the sizes of their logarithms, for various reasons. This is why the Richter scale is logarithmic; see these Wikipedia articles for some examples.

Logarithms also appear in the basic mathematical description of information. Suppose I send you a message consisting of zeroes and ones. If the message has length $n$, we say that it contains $n$ bits of information. There are $2^n$ possible such messages, which leads to a general principle: whenever you are in a situation where there are $k$ possibilities and you know that one of them happens, you have gained $\log_2 k$ bits of information.

Information is a fundamental concept. Consider the following puzzle: you have $1000$ bottles of wine, and you know that one of them is poisoned. You have an indeterminate number of rats to which you can feed various wines; if they are poisoned, they will die in $1$ hour. How many rats do you need to figure out which bottle is poisoned in $1$ hour?

The answer is $10$. This is because you want to figure out which of $1000$ possibilities happens, so you want to gain $\log_2 1000 \approx 10$ bits of information. If you feed $n$ rats some amount of wine, the amount of information you have after $1$ hour is precisely a list of which rats died and which rats didn't - zeroes and ones - so you have gained at most $n$ bits of information. (You might not reach this upper bound if some of the information you gain is redundant.) This requires that $n$ is at least $10$, and in fact this bound can be achieved by the following algorithm:

Label the wines $0, 1, 2, ... 999$ and convert the numbers to binary. Each of these numbers has at most $10$ binary digits. Assign each of the rats wines as follows: rat $i$ will drink all the wines with the property that the $i^{th}$ binary digit is $1$. After $1$ hour, the pattern of which rats die spells out the binary expansion of the poisoned wine.

I really like this problem because the problem statement does not mention logarithms at all, but it is an inevitable consequence of the particular optimization you are trying to accomplish that logarithms appear in the solution.

-

$\log$ is usually used in statistical results. Here are few examples:

1. If I have obtained a data with values in orders of $10$ (like: $10, 100, 50000, 6000000000$), I can use log in my graph to shorten the length of the axis values (see: log-log graph)

2. There are results which increases exponentially like decaying system, half-life, and many systems in control systems engineering. As stated in example 1, it is hard to illustrate values that increases without bound.

3. There are many instances where you cannot find on how many times a number is multiplied by the same number to produce a result. In equation form, you need to find $x$ in this problem: $5^x = 81.859$.

$x\log x$ means the same thing. A shortened value multiplied by an amplitude to somehow increase its value. It usually comes out on finding the initial value problem on differential equations (generally from mechatronics).

-

This question might be of relevance to you. It asks about the purpose of logarithms. This site gives a brief history of logarithms. As Qiaochu explained, logarithms are very useful in information theory. The answer to this question elegantly uses logarithms.

-

As Yuan says above, logarithms are numbers describing numbers, intended to give more information about something but in less space or time.

If you want a very simple everyday analogy you could consider some physical cases like steepness, density, or percentages for price increases. All of these are like cruder, simpler versions of a log: they give information about other numbers in a more general, more compact way.

Is that more what you were looking for?

-