Skip to content
Glacius
FoundationsConcept reference

Logarithms

A base-b logarithm of a positive number is the exponent to which a positive base other than one must be raised to obtain that number.

On this page 7 sections
  1. Overview
  2. Since 2^3=8, the exponent that turns base 2 into 8 is 3
  3. The answer can be zero or negative
  4. Check your understanding
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01Since 2^3=8, the exponent that turns base 2 into 8 is 3#

Since 23=82^3=8, the exponent that turns base 2 into 8 is 3. We write log2(8)=3\log_2(8)=3, read “log base 2 of 8.”

The logarithm graph has y=0 at x=1, y=1 at x=2, y=2 at x=4 and y=3 at x=8. Reading x=8 returns exponent 3, because 2 cubed is 8.The logarithm graph has y=0 at x=1, y=1 at x=2, y=2 at x=4 and y=3 at x=8. Reading x=8 returns exponent 3, because 2 cubed is 8.
Figure 1The logarithm graph has y=0 at x=1, y=1 at x=2, y=2 at x=4 and y=3 at x=8. Reading x=8 returns exponent 3, because 2 cubed is 8.
Link to this figure ↗Download SVGDownload PNG

A logarithm asks the exponent question.

logb(x)=y\log_b(x)=y

This means by=xb^y=x. Here, bb is the base, xx the argument, and yy the answer. For real logarithms, use x>0x>0, b>0b>0, and b1b\ne1.

Check your reasoning

What is log3(27)\log_3(27)?

Show answer and explanation
3

Because 33=273^3=27, the required exponent is 3.

02The answer can be zero or negative#

The answer can be zero or negative. Since 20=12^0=1, log2(1)=0\log_2(1)=0. Since 21=1/22^{-1}=1/2, log2(1/2)=1\log_2(1/2)=-1. The arguments stay positive in both cases.

Check your reasoning

What is log2(1/4)\log_2(1/4)?

Show answer and explanation
-2

The exponent is −2 because 22=1/42^{-2}=1/4.

03Check your understanding#

Check your reasoning

A quantity is multiplied by 3 each round. After how many rounds is it 81 times its starting value?

Show answer and explanation
4

The total multiplier after n rounds is 3n3^n. Since 34=813^4=81, it takes 4 rounds; this is log3(81)\log_3(81).

Key takeaway

Ask which exponent makes the given base produce the argument.

  • Evaluate a logarithm as an inverse exponent

Sources & further reading

  1. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Logarithms.” Math behind ML. /learn/f-log