A logarithm asks how many powers it takes to reach a number. It reverses an exponential.
Swap the coordinates of points on y = b^x to obtain y = log_b x. This is a reflection in y = x. The real logarithm needs x > 0, b > 0, and b ≠ 1.
Logarithms of zero and negative numbers are not defined in this real-valued graph.
The dashed diagonal is y = x. The logarithm is defined only for x > 0.