logarithm
If exponents answer the question “what do you get when you multiply a base by itself this many times?”, logarithms answer the reverse: “how many times must I multiply the base to reach this number?” A logarithm is simply an exponent, viewed from the other direction. Asking log base 2 of 8 is asking what power of 2 gives 8 — and the answer is 3.
Formally, log_b(x) = y means exactly the same thing as b^y = x. The base b must be positive and not equal to 1, and x must be positive (you cannot take the log of zero or a negative number, because no power of a positive base lands there). This back-and-forth makes logarithms the inverse operation of raising to a power.
Logarithms turn multiplication into addition and powers into multiplication, which is why they once powered slide rules and tables of calculation, and why they remain essential for solving equations where the unknown sits in an exponent. Three bases appear most often: base 10 (common log), base e (natural log), and base 2 (in computing).
log_2(8) = 3 because 2^3 = 8. Likewise log_10(1000) = 3 because 10^3 = 1000, and log_5(1) = 0 because 5^0 = 1.
Reading “log_b(x) = y” as “b^y = x” turns every log into an exponent.
log_b(x) is only defined for x > 0. The value can itself be negative — for instance log_10(0.01) = -2 — but the input x can never be zero or negative.