A logarithm is the opposite of an exponent. Read the expression 2³=8 as "multiply the base 2 by itself 3 times to get 8," and that's an exponent. Ask the reverse question, "how many times do I need to multiply 2 by itself to get 8?" and that's a logarithm. The answer is 3, written log₂8=3. In other words, solving the expression aˣ=y for x gives x=logₐy — it's the exact same relationship, just viewed from a different direction.

This relationship becomes much clearer as a graph. If there's a point (p, q) on y=aˣ, then since a logarithmic function swaps x and y, the point (q, p) must lie on y=logₐx. A point with its x- and y-coordinates swapped is always symmetric to the original point across the line y=x. That's why the graphs of an exponential function and a logarithmic function form a perfect symmetry, as if reflected in a mirror labeled y=x.

y=aˣ y=logₐx
Exponential and logarithmic functions are perfectly reflected across the diagonal (y=x)

The exponential function y=aˣ (where a>0, a≠1) has clear, defining features. It always passes through (0, 1), since multiplying a by itself 0 times gives 1. No matter how small x gets, y always stays greater than 0 and never touches the x-axis (an asymptote). If a>1, it increases explosively as you move right; if 0<a<1, it decreases instead, getting closer and closer to 0. The logarithmic function shows all these same features, just with the coordinates flipped — it passes through (1, 0), and the y-axis becomes its asymptote.

Exponential and logarithmic functions also work as a pair in real life. When you need to calculate "how big something has grown" — like population growth or compound interest — you use an exponential function. When you need to work backward and figure out "how big a value had to be to produce this result" — like the magnitude of an earthquake (the Richter scale) or the loudness of a sound (decibels) — you use a logarithm. Every time an earthquake's magnitude increases by 1, its actual energy increases by roughly 32 times — and compressing that enormous range of numbers down to something manageable is exactly the job a logarithm does.

When studying this with kids, it helps to first get comfortable with logarithms as a question, like "how many times do I need to multiply 2 by itself to get 8?" Then, draw the graph of the exponential function, plot a few of its points with x and y swapped, and you can see for yourself that the graph of the logarithmic function appears automatically. On our activity page, you can change the base a with a slider and watch in real time how the two graphs always keep their mirror-image shape across y=x.