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:

\log_a y = x \quad \iff \quad a^x = y

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:

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.

Graph of 2 to the x and log base 2 of x as reflectionsTwo curves reflected across the dashed line y equals x. The curve y equals 2 to the x passes through (0,1) and rises steeply. Its reflection y equals log base 2 of x passes through (1,0) and rises slowly. The mirror line y equals x is shown as a dashed line. x y 1 2 3 4 5 6 7 1 2 3 4 (0, 1) (1, 0) y = 2ˣ y = log₂ x y = x
$y = 2^x$ (dark curve) and its inverse $y = \log_2 x$ (red curve), reflected across the dashed line $y = x$. The exponential passes through $(0, 1)$; the logarithm passes through $(1, 0)$. The exponential has a horizontal asymptote at $y = 0$; the logarithm has a vertical asymptote at $x = 0$.

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.

Logarithmic curves with different basesThree logarithmic curves plotted together: log base 2, log base e (natural log), and log base 10. All pass through (1, 0). The base-2 curve rises fastest, the base-10 curve rises slowest. x y 0 1 2 3 4 5 6 7 1 2 3 −1 −2 (1, 0) log₂ x ln x log₁₀ x
Three logarithmic curves: $\log_2 x$ (muted, fastest-rising), $\ln x$ (red, middle), and $\log_{10} x$ (dark, slowest-rising). All pass through $(1, 0)$. A smaller base produces a taller curve because a smaller base needs a larger exponent to reach the same value.

Properties of logarithms

Every logarithm property is an exponent law in disguise. Here are the three central ones, each with a proof.

Product rule

\log_a(mn) = \log_a m + \log_a n

Proof. Let \log_a m = p and \log_a n = q. Then a^p = m and a^q = n. Multiply:

mn = a^p \cdot a^q = a^{p+q}

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

\log_a\!\left(\frac{m}{n}\right) = \log_a m - \log_a n

Proof. With a^p = m and a^q = n:

\frac{m}{n} = \frac{a^p}{a^q} = a^{p-q}

So \log_a(m/n) = p - q = \log_a m - \log_a n. \square

Power rule

\log_a(m^k) = k \cdot \log_a m

Proof. Let \log_a m = p, so a^p = m. Raise both sides to the power k:

m^k = (a^p)^k = a^{pk}

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.

Three logarithm properties summarisedA visual summary showing three boxes: product rule (multiplication becomes addition), quotient rule (division becomes subtraction), and power rule (exponent becomes coefficient). Product rule log(mn) = log m + log n × → + Quotient rule log(m/n) = log m − log n ÷ → − Power rule log(mᵏ) = k · log m exponent → coefficient
The three properties at a glance. Each converts a hard operation (multiplication, division, exponentiation) into an easier one (addition, subtraction, scalar multiplication). Every proof reduces to one line of exponent algebra.

The cancellation identities

Since \log_a and a^x are inverse functions, composing them in either order gives you back what you started with:

a^{\log_a x} = x \quad \text{for } x > 0
\log_a(a^x) = x \quad \text{for all real } x

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.

\log_a x = \frac{\log_b x}{\log_b a}

Proof. Let \log_a x = p, so a^p = x. Take \log_b of both sides:

\log_b x = \log_b(a^p) = p \cdot \log_b a

Divide both sides by \log_b a (which is nonzero since a \neq 1):

p = \frac{\log_b x}{\log_b a}

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}.

Change of base formula diagramAn arrow diagram showing that log base a of x equals log base b of x divided by log base b of a. Two arrows: one from a to x labelled log_a(x), another path from a to b to x using log_b. a x b log_a(x) = ? log_b(a) log_b(x)
The direct path from $a$ to $x$ is $\log_a x$. The indirect path goes through any base $b$: divide the $b$-logarithm of $x$ by the $b$-logarithm of $a$. Both paths give the same answer.

Domain, range, and key features

Here is the complete profile of f(x) = \log_a x for a > 1.

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.

Interactive graph of log base 2 of xAn interactive graph of y equals log base 2 of x. A draggable red point moves along the curve. A readout displays the current x and y values. Each time x doubles, y increases by 1. drag the red point along the curve
Drag the point along $y = \log_2 x$. The key pattern: doubling $x$ always adds $1$ to the output. This is the product rule in action — $\log_2(2x) = \log_2 2 + \log_2 x = 1 + \log_2 x$.

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.

Graph verifying log base 3 of 54 minus log base 3 of 2 equals 3The curve y equals log base 3 of x with three marked points: at x equals 2 where y is approximately 0.63, at x equals 27 where y is 3, and at x equals 54 where y is approximately 3.63. A vertical arrow shows the difference of 3 between the points at x equals 2 and x equals 54. x y 0 10 20 30 40 50 1 2 3 −1 x = 2 y ≈ 0.63 x = 27, y = 3 x = 54 y ≈ 3.63 gap = 3
On the curve $y = \log_3 x$, the vertical distance between the points at $x = 2$ and $x = 54$ is exactly $3$. The quotient rule predicts this: $\log_3 54 - \log_3 2 = \log_3(54/2) = \log_3 27 = 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.

Graph verifying the solution x equals 7The curve y equals log base 2 of (x minus 3) plus log base 2 of (x plus 1) is plotted. The horizontal line y equals 5 intersects the curve at x equals 7. The curve is only defined for x greater than 3. A vertical dashed asymptote appears at x equals 3. x y 1 2 3 4 5 6 7 8 1 2 3 4 5 x = 3 y = 5 (7, 5)
The combined function $y = \log_2(x-3) + \log_2(x+1)$ is only defined for $x > 3$ (the vertical dashed line is the asymptote). The horizontal line $y = 5$ meets the curve at exactly one point: $x = 7$. The rejected solution $x = -5$ lies outside the domain and never appears on the graph.

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

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:

\log_a x > \log_a y \iff x > y \quad \text{(when } a > 1\text{)}

But when 0 < a < 1, the function is decreasing, and the inequality flips:

\log_a x > \log_a y \iff x < y \quad \text{(when } 0 < a < 1\text{)}

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