Basis Lab

Answers · The mathematics underneath

What does log base 2 of 8 actually mean?

In shortIt is the exponent you must put on two to get eight, and that exponent is three.

log⁡28\log_2 8 means the exponent that turns the base 22 into 88. That exponent is 33, because 23=2×2×2=82^3 = 2 \times 2 \times 2 = 8.

log⁡28=3⟺23=8\log_2 8 = 3 \qquad\Longleftrightarrow\qquad 2^3 = 8

What the symbol is asking

Read the expression as a question rather than as a piece of notation to manipulate: what power of two gives eight? The base is fixed by the subscript, so the base is two. The argument, eight, is what the power has to produce. The logarithm is the missing exponent. You can find it by naming the powers of two in order: 21=22^1 = 2, 22=42^2 = 4, and 23=82^3 = 8. The third one lands on eight, so the exponent is three. The answer is not three because eight is three twos added together, nor because two appears three times in some written form of eight. It is three because three is the height you have to give the power of two to reach eight.

21=2,22=2×2=4,23=2×2×2=82^1 = 2,\qquad 2^2 = 2\times2 = 4,\qquad 2^3 = 2\times2\times2 = 8

The same reading handles numbers that do not land exactly. log⁡210\log_2 10 is the exponent that turns two into ten. Since 23=82^3 = 8 and 24=162^4 = 16, and ten lies between eight and sixteen, the exponent lies between three and four. That bracket is often enough: it tells you the logarithm is larger than three and smaller than four without any machine. For log⁡28\log_2 8 there is no bracket to widen, because eight is exactly 232^3. The exactness is the whole answer, and the check is a single power.

The natural guess that fails

The natural guess is to multiply the base by the argument, or to read log⁡28\log_2 8 as 2×32 \times 3, which gives six. That guess treats the logarithm as though it were asking for a repeated multiplication of the base by the answer, but the symbol never asks that. The test is always a power: does the base raised to the proposed exponent equal the argument? For six, 26=642^6 = 64, not eight, so six fails immediately. For three, 23=82^3 = 8, so three passes. A second wrong guess is to count how many times two appears in a factorisation of eight. Eight is 2×2×22 \times 2 \times 2, so it has three factors of two, and that happens to agree here, but it agrees for the wrong reason and it stops agreeing as soon as the argument is not a whole power of the base. The logarithm is the exponent, not a count of visible twos.

b e=y⟺log⁡by=eb^{\,e}=y \qquad\Longleftrightarrow\qquad \log_b y=e

Both directions of the same fact

Written generally, the definition is be=yb^e = y exactly when log⁡by=e\log_b y = e. The double arrow matters because it says there is no second definition hidden on the right. Substituting b=2b=2, e=3e=3 and y=8y=8 gives 23=82^3=8 exactly when log⁡28=3\log_2 8=3. The two operations undo each other in the obvious way: 2log⁡28=23=82^{\log_2 8} = 2^3 = 8, and log⁡2(23)=log⁡28=3\log_2(2^3) = \log_2 8 = 3. The first takes the exponent that two needs, then puts two to that exponent. The second is given a power of two and returns the exponent already written there. Neither move requires a rule about logarithms; both are the original question answered in one direction or the other.

If someone writes log⁡28=3\log_2 8 = 3, the verification is not to look up a table. Raise two to the third: two times two is four, and four times two is eight. That recovers the argument. If a proposed answer does not recover eight when used as the exponent on two, it is not the logarithm in this base. The check is short enough to do by hand, and it is more reliable than remembering a phrase about how logs work.

The reading relies on the base being positive and not equal to one, and on the argument being positive. Here the base is two, which is allowed, and the argument is eight, which is positive, so nothing goes wrong. At one the logarithm is nought in every allowed base: log⁡21=0\log_2 1 = 0 because 20=12^0 = 1. Below one it is negative: log⁡214=−2\log_2 \frac{1}{4} = -2 because 2−2=122=142^{-2} = \frac{1}{2^2} = \frac{1}{4}. At nought there is no answer, since every power of two is positive, so no exponent turns two into nought. A base of one would be worse, because 1e=11^e = 1 for every exponent and the question what exponent turns one into eight has no answer at all. These are not exceptions to the definition; they are what the definition says when you ask it at the edges.

Worth keeping

  • A logarithm is the exponent you have to raise the base to in order to get the number.
  • log base 2 of 8 is 3 because 2 cubed is 8.
  • The common error is to multiply the base by the answer rather than raise the base to it.

Where this goes next

This question is one step of Logarithms, Growth and Scale, a course that works through its subject from the beginning. The page that teaches this part of it is The Question a Logarithm Answers, and it reads the whole way through whether or not you have an account.

What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.

Read that pageThe whole course

Other questions people ask about this

  1. Why do we use e as the base of natural logarithms instead of 10?The base e is used because it makes growth calculus clean: the derivative of e to the x is itself, while base ten leaves a factor of about 2.3026 in every derivative.
  2. Why do machine learning models use log loss instead of just multiplying probabilities?Multiplying many probabilities underflows to zero on a computer; adding their logarithms keeps the same score and stays representable.
  3. How do I estimate something to the nearest order of magnitude?Round every factor to one digit times a power of ten, multiply the digits roughly, add the exponents, and report the nearest power of ten.
  4. What is the difference between a half-life and a decay rate?A half-life is the time for an amount to be multiplied by one half, while a decay rate says how fast that multiplication happens, either continuously or as a per-step factor.
  5. What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
  6. How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.

Read alongside