# Logarithms: turning products into sums

A logarithm turns multiplying into adding. When two systems are independent, the probabilities of their states multiply while their entropies add, so entropy has to be a logarithm of probability.

Written for this edition, not translated from Einstein.

## Why does entropy need a logarithm?

Adding is easier than multiplying, and a logarithm turns one into the other. The natural logarithm of 2 is about 0.693, and of 4 about 1.386. Add them and you get 2.079, which is the natural logarithm of 8, the product of 2 and 4.

The natural logarithm ln x answers one question: to what power must e, about 2.718, be raised to give x? Raised to 0.693, e gives 2, and raised to 1.386 it gives 4. Multiplying two powers of e adds the powers, so raised to 2.079 it gives 8. Written for any numbers, the logarithm of a product is the sum of the logarithms, and a power becomes a multiple:

$$
\ln(AB) = \ln A + \ln B, \qquad \ln\left(f^{\,n}\right) = n \ln f
$$

The log of A times B is log A plus log B, and the log of f to the power n is n times log f.

Entropy needs exactly this. In §5 of the light-quanta paper, Einstein takes two independent systems. Their entropies add, S = S₁ + S₂, while the probabilities of their states multiply, W = W₁W₂. If entropy is some function φ of probability, then φ(W₁W₂) = φ(W₁) + φ(W₂), and he concludes that φ is a logarithm:

$$
S - S_0 = \frac{R}{N} \ln W
$$

S minus S nought equals R over N times the natural log of W.

R is the gas constant and N the number of molecules in a mole, so R/N is what is now called Boltzmann's constant. The step from φ(W₁W₂) = φ(W₁) + φ(W₂) to the logarithm needs φ to be a smooth function, which Einstein takes for granted.

Einstein prints lg for the natural logarithm, as German physics did in 1905. Today lg usually means the base-10 logarithm and ln the natural one. So a printed lg 2 means ln 2, about 0.693, not log₁₀ 2, about 0.301.

## Worked example: Ten molecules found in half the volume

In §5 Einstein asks how probable it is that n molecules, each moving independently through a volume v₀, are all found at one moment in a part v of it. Each molecule is in that part with probability v/v₀, and independent probabilities multiply:

$$
W = \left(\frac{v}{v_0}\right)^{n}
$$

W equals v over v nought, to the power n.

1. Take n = 10 molecules and v = v₀/2. Then W = (1/2)¹⁰ = 1/1024, about 0.000977.
2. The logarithm turns the tenth power into ten times: ln W = 10 × ln(1/2) = 10 × (−0.693) = −6.93.
3. So the entropy of the state with every molecule in one half is lower by 6.93 × R/N: 6.93 times Boltzmann's constant.

For a mole of gas, n = N, and the same formula gives S − S₀ = R ln(v/v₀). That is the entropy change thermodynamics gives for an ideal gas compressed from v₀ to v at constant temperature.

## Where this lesson stops

A logarithm turns products into sums, which is why it connects probabilities that multiply to entropies that add. In the 1905 papers, lg means the natural logarithm.

## This lesson builds on

- [Exponential change](/foundations/exponentials/)
