In short
The logarithm \log_a y answers the question: "to what power must a be raised to get y?" It is the inverse of the exponential function a^x. The function f(x) = \log_a x has domain (0, \infty), range (-\infty, \infty), passes through (1, 0), and has the y-axis as a vertical asymptote. Logarithms convert multiplication into addition, powers into products, and division into subtraction — properties that follow directly from the laws of exponents.
An earthquake in Bhuj measures 7.7 on the Richter scale. Another in Latur measures 6.2. The difference is 7.7 - 6.2 = 1.5, which looks modest — but the Bhuj earthquake released roughly 10^{1.5} \approx 32 times more energy. The Richter scale is a logarithmic scale: each whole number step means a tenfold increase in measured amplitude. Your ears work this way too — the decibel scale for sound is logarithmic, because a sound ten times more intense doesn't feel ten times louder.
The logarithm is the function that undoes exponential growth. If 2^{10} = 1024, then \log_2 1024 = 10. The exponential asked "2 raised to what gives 1024?" and the logarithm answers it: the exponent is 10.
This inverse relationship is the entire idea. Every property of logarithms is a consequence of this single fact: \log_a x is the exponent you need.
From exponential to logarithm
Start with the exponential function f(x) = a^x where a > 0 and a \neq 1. This function is one-to-one — every output comes from exactly one input. So given any positive number y, there is exactly one real number x such that a^x = y. That number x is what the logarithm gives you.
Logarithm
For a > 0, a \neq 1, and y > 0:
The number a is the base, y is the argument, and x is the logarithm (the exponent). The function f(x) = \log_a x is called the logarithmic function with base a.
Two bases are so common they get their own notation:
- Common logarithm: \log_{10} x is written simply as \log x. This is the base used in the Richter scale and in pH values.
- Natural logarithm: \log_e x is written as \ln x. The base e \approx 2.718 makes calculus cleanest — just as e^x is its own derivative, the derivative of \ln x is 1/x.
A few values you should know immediately:
| Expression | Value | Because... |
|---|---|---|
| \log_2 8 | 3 | 2^3 = 8 |
| \log_{10} 1000 | 3 | 10^3 = 1000 |
| \log_a 1 | 0 | a^0 = 1 for every valid base |
| \log_a a | 1 | a^1 = a |
| \ln e | 1 | e^1 = e |
The first two rows are just reading the definition. The third and fourth are universal: \log_a 1 = 0 and \log_a a = 1 hold for every base.
The graph of f(x) = \log_a x
Since \log_a x is the inverse of a^x, its graph is the reflection of y = a^x across the line y = x.
The exponential y = a^x has domain (-\infty, \infty) and range (0, \infty). Reflecting swaps these: the logarithm has domain (0, \infty) and range (-\infty, \infty).
The exponential passes through (0, 1). Reflecting gives (1, 0) — every logarithmic curve passes through the point (1, 0).
The exponential has a horizontal asymptote at y = 0. Reflecting turns this into a vertical asymptote at x = 0 — the y-axis.
When a > 1, the logarithm is an increasing function — larger inputs produce larger outputs, but the growth is painfully slow. To go from \log_2 x = 10 to \log_2 x = 20, the input x must jump from 1{,}024 to 1{,}048{,}576. The logarithm grows, but it takes exponentially large inputs to make it grow by one more unit.
When 0 < a < 1, the logarithm is decreasing — but this case is rarely used in practice. The base-1/2 logarithm is just \log_{1/2} x = -\log_2 x, so there is nothing new to learn; the graph is simply flipped.
Properties of logarithms
Every logarithm property is an exponent law in disguise. Here are the three central ones, each with a proof.
Product rule
Proof. Let \log_a m = p and \log_a n = q. Then a^p = m and a^q = n. Multiply:
Converting back to logarithmic form: \log_a(mn) = p + q = \log_a m + \log_a n. \square
This is the product law of exponents (a^p \cdot a^q = a^{p+q}) read in reverse. Logarithms turn multiplication into addition — which is exactly why slide rules worked, and why logarithmic scales compress enormous ranges into manageable ones.
Quotient rule
Proof. With a^p = m and a^q = n:
So \log_a(m/n) = p - q = \log_a m - \log_a n. \square
Power rule
Proof. Let \log_a m = p, so a^p = m. Raise both sides to the power k:
So \log_a(m^k) = pk = k \cdot \log_a m. \square
This is the power law of exponents ((a^p)^k = a^{pk}) in logarithmic clothing. It is the reason logarithmic differentiation works — taking \ln of both sides converts a product of functions into a sum, and brings exponents down as coefficients.
The cancellation identities
Since \log_a and a^x are inverse functions, composing them in either order gives you back what you started with:
The first says: raise a to the exponent that gives x, and you get x. The second says: find the exponent that gives a^x, and you get x. These are not "properties" in the usual sense — they are the definition of inverse functions, applied to this specific pair.
Change of base formula
Your calculator has buttons for \log (base 10) and \ln (base e), but not for \log_2 or \log_7. The change of base formula lets you compute any logarithm using any base you have available.
Proof. Let \log_a x = p, so a^p = x. Take \log_b of both sides:
Divide both sides by \log_b a (which is nonzero since a \neq 1):
So \log_a x = \frac{\log_b x}{\log_b a}. \square
The most common application: \log_2 x = \frac{\ln x}{\ln 2} = \frac{\log x}{\log 2}.
Domain, range, and key features
Here is the complete profile of f(x) = \log_a x for a > 1.
- Domain: (0, \infty) — the argument must be strictly positive. You cannot take the logarithm of zero or a negative number (in the reals).
- Range: (-\infty, \infty) — the output can be any real number.
- x-intercept: (1, 0), since \log_a 1 = 0.
- Vertical asymptote: x = 0. As x \to 0^+, \log_a x \to -\infty.
- Monotonicity: strictly increasing when a > 1, strictly decreasing when 0 < a < 1.
- One-to-one: \log_a x = \log_a y implies x = y.
- Slow growth: \log_a x grows without bound, but slower than any positive power of x. For large x, \log_a x \ll \sqrt{x} \ll x.
The domain restriction — x > 0 only — is the most common source of errors when solving logarithmic equations. Any candidate solution that makes the argument zero or negative must be discarded.
Interactive: tracing the logarithmic curve
Drag the red point along the curve y = \log_2 x. Watch how the y-value increases by 1 each time x doubles — from x = 1 to x = 2 the output goes from 0 to 1, from x = 2 to x = 4 it goes from 1 to 2, and from x = 4 to x = 8 it goes from 2 to 3.
Example 1: Simplify $\log_3 54 - \log_3 2$ and verify graphically
Step 1. Apply the quotient rule. \log_3 54 - \log_3 2 = \log_3\!\left(\frac{54}{2}\right) = \log_3 27.
Why: the quotient rule converts the subtraction of two logarithms into the logarithm of a quotient.
Step 2. Evaluate \log_3 27. Since 3^3 = 27, \log_3 27 = 3.
Why: the definition says \log_3 27 is the exponent you put on 3 to get 27. Three copies of 3 multiplied give 27.
Step 3. Verify with the definition. 3^3 = 27. And 54/2 = 27. So \log_3 54 - \log_3 2 = \log_3 27 = 3. Check: 3^{3.631\ldots} \approx 54 and 3^{0.631\ldots} \approx 2, so 3.631 - 0.631 = 3. Confirmed.
Why: verifying both sides independently confirms the quotient rule is not just a trick — it gives the correct answer.
Step 4. Interpret on the graph. On the curve y = \log_3 x, the point at x = 54 has height \approx 3.63, the point at x = 2 has height \approx 0.63, and the vertical difference between them is exactly 3 — the same as the height at x = 27.
Why: the quotient rule says that the vertical gap between two points on the log curve equals the log of the ratio of their x-coordinates.
Result: \log_3 54 - \log_3 2 = 3.
The quotient rule is not just an algebraic shortcut. On the graph, subtracting two log values measures the vertical gap between two points on the curve — and that gap equals the log of the ratio of their x-coordinates.
Example 2: Solve $\log_2(x - 3) + \log_2(x + 1) = 5$
Step 1. Combine using the product rule. \log_2(x - 3) + \log_2(x + 1) = \log_2[(x - 3)(x + 1)]. So the equation becomes \log_2[(x - 3)(x + 1)] = 5.
Why: the product rule collapses the sum of two logarithms into a single logarithm, making the equation easier to solve.
Step 2. Convert to exponential form. \log_2[(x - 3)(x + 1)] = 5 means (x - 3)(x + 1) = 2^5 = 32.
Why: the definition of logarithm says \log_a y = c is equivalent to a^c = y.
Step 3. Expand and solve. (x - 3)(x + 1) = x^2 - 2x - 3 = 32, so x^2 - 2x - 35 = 0. Factoring: (x - 7)(x + 5) = 0, giving x = 7 or x = -5.
Why: expanding the product gives a standard quadratic. The factorisation works because 7 \times (-5) = -35 and 7 + (-5) = 2.
Step 4. Check domain restrictions. The original equation has \log_2(x - 3) and \log_2(x + 1). Both arguments must be positive: x - 3 > 0 gives x > 3, and x + 1 > 0 gives x > -1. Together: x > 3. The candidate x = -5 fails (it would require the logarithm of -8, which does not exist). So x = 7 is the only solution.
Why: logarithmic equations can produce extraneous solutions that violate the domain x > 0 for each log term. Always check.
Result: x = 7.
The extraneous solution x = -5 is a byproduct of the algebra — the quadratic does not know about domain restrictions. The graph makes the truth visible: the curve only exists for x > 3, and it crosses the line y = 5 at exactly one point.
Common confusions
-
"\log(m + n) = \log m + \log n." The product rule says \log(mn) = \log m + \log n, not \log(m + n). There is no clean formula for the logarithm of a sum. This is the single most common algebraic error with logarithms.
-
"\log_a 0 = 0." The logarithm of zero is undefined, not zero. You would need a^x = 0 for some real x, but a^x > 0 for every real x. The value \log_a 1 = 0 is the one that equals zero — because a^0 = 1.
-
"The domain of \log_a x is all real numbers." The domain is (0, \infty) only. Negative inputs and zero are excluded. When you solve a logarithmic equation, check that every candidate solution keeps the argument positive.
-
"\log_a(m^n) and (\log_a m)^n are the same." They are not. \log_a(m^n) = n \log_a m (the exponent comes down as a coefficient). But (\log_a m)^n is the logarithm itself raised to the n-th power — a completely different quantity. For example, \log_2(2^3) = 3, but (\log_2 2)^3 = 1^3 = 1.
-
"Changing the base changes the value." The base changes the scale, not the information. \log_2 8 = 3 and \log_{10} 8 \approx 0.903 look different, but both encode the same fact: 8 sits 3 doublings away from 1 (in base 2) or about 0.903 powers-of-ten away from 1 (in base 10). The change of base formula makes the conversion exact.
If you are comfortable with the definition, the three properties with proofs, the change of base formula, and the graph, you have what you need — stop here if you like. What follows explores the edges.
Why \log is everywhere
The Richter scale, the decibel scale, the pH scale, the musical octave — all logarithmic. The reason is always the same: the underlying quantity (energy, sound intensity, hydrogen-ion concentration, frequency) spans a huge range, and a logarithmic scale compresses that range into manageable numbers. An earthquake releasing 10^{15} joules and one releasing 10^{18} joules differ by a factor of 1000 in energy, but only by 2 on the Richter scale. Without the logarithm, you would need to compare numbers with fifteen and eighteen digits — not practical.
The natural logarithm and e
The function \ln x = \log_e x has a special calculus property: \frac{d}{dx} \ln x = \frac{1}{x}. No other logarithm has a derivative this clean. For \log_a x, the derivative is \frac{1}{x \ln a} — there is always an extra factor of \frac{1}{\ln a} unless a = e. This is why \ln is the "natural" choice for integration and differentiation.
The natural logarithm also connects to the area under the hyperbola y = 1/t: the area from t = 1 to t = x is exactly \ln x. This integral definition — \ln x = \int_1^x \frac{1}{t}\, dt — is the rigorous way to define \ln and then derive e as the unique number satisfying \ln e = 1.
Logarithmic inequalities
Since \log_a x is increasing when a > 1:
But when 0 < a < 1, the function is decreasing, and the inequality flips:
This base-dependent flip is a common source of sign errors in JEE problems. The safest approach: use the change of base formula to convert to \ln (which has base e > 1, so the direction is preserved), solve the inequality, and then check the domain.
Where this leads next
- Exponential Functions — the function that the logarithm inverts. The two are inseparable: understanding one deepens understanding of the other.
- Inverse Functions — the general theory of reversing functions, of which \log_a and a^x are the flagship example.
- Exponents and Powers — the algebraic laws of exponents, which are the raw material from which every logarithm property is proved.
- Domain and Range — the framework for understanding why logarithmic functions only accept positive inputs.
- Graph Transformations — Reflections — the toolkit for shifting, stretching, and reflecting the logarithmic curve, just as you would any other function.