Logarithmic Function
A logarithmic function is the inverse of an exponential function, written as f(x) = log_b(x), and tells you what exponent is needed to produce x from base b.
Formula
f(x) = \log_b(x)
Definition
A logarithmic function is the inverse of an exponential function: $\log_b(x)$ asks "to what power must $b$ be raised to get $x$?" It is defined for $x > 0$ with base $b > 0$, $b \neq 1$; domain $(0, \infty)$, range all reals, and its graph passes through $(1, 0)$ and $(b, 1)$. Formally, the natural logarithm $\ln: (0, \infty) \to \mathbb{R}$ is defined as $\ln(x) = \int_1^x (1/t)\,dt$, the inverse of $e^x$, with $\log_b(x) = \ln(x)/\ln(b)$ for arbitrary base; analytically extended to $\mathbb{C}$ as $\ln(z) = \ln|z| + i\arg(z)$, it becomes multivalued.
Example
$\log_2(8) = 3$ because $2^3 = 8$, and $\log_{10}(1000) = 3$ because $10^3 = 1000$: the log "undoes" the exponent. For $f(x) = \log_2(x)$: $f(1) = 0$, $f(2) = 1$, $f(4) = 2$, $f(8) = 3$, $f(1/2) = -1$, increasing slowly with a vertical asymptote at $x = 0$. In the complex plane, $\ln(-1) = i\pi$ (principal value) since $e^{i\pi} = -1$, though this multivaluedness has consequences in complex analysis, requiring branch cuts.
Key Insight
Logarithms turn multiplication into addition and huge numbers into manageable ones; the Richter scale and decibels are both logarithmic scales, and logarithmic and exponential functions are mirror images across $y = x$: if $(a, b)$ is on the exponential graph, $(b, a)$ is on the logarithmic graph. The logarithm's integral definition explains why $\log(xy) = \log(x) + \log(y)$ geometrically, as areas under $1/t$: the integral from $1$ to $xy$ splits as the integral to $x$ plus the integral to $y$.