algebra

Logarithms from Zero to Mastery

A complete guide to logarithms: the definition, the four core rules, change of base, natural log, and how to solve log equations with worked examples.
AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-02

Logarithms intimidate students because the notation logab\log_a b doesn't intuitively reveal what's happening. The truth is, logarithms are just exponents in disguise. Once you crack that idea, every log rule follows from familiar exponent rules. This guide builds logs from the ground up.

The definition (memorise this one)

logab=c    ac=b\log_a b = c \iff a^c = b

In words: "logab\log_a b is the exponent you raise aa to in order to get bb." That's it. Everything else is bookkeeping.

Examples:

  • log28=3\log_2 8 = 3 because 23=82^3 = 8.
  • log101000=3\log_{10} 1000 = 3 because 103=100010^3 = 1000.
  • log51=0\log_5 1 = 0 because 50=15^0 = 1.

Common bases

  • log\log (no subscript): usually log10\log_{10} in pre-calculus, but loge=ln\log_e = \ln in higher math (calculus, physics, ML). Check your textbook's convention.
  • ln\ln (natural log): loge\log_e, where e2.71828e \approx 2.71828. The "natural" base because ddxlnx=1x\frac{d}{dx}\ln x = \frac{1}{x} — clean derivative.
  • log2\log_2: computer science (binary), information theory.

The four core rules

All four come from exponent rules (aman=am+na^m \cdot a^n = a^{m+n}, etc.) reversed.

1. Product rule

loga(xy)=logax+logay\log_a (xy) = \log_a x + \log_a y

Multiplication inside the log → addition outside. (Mirror of aman=am+na^m a^n = a^{m+n}.)

2. Quotient rule

logaxy=logaxlogay\log_a \frac{x}{y} = \log_a x - \log_a y

Division → subtraction.

3. Power rule

loga(xn)=nlogax\log_a (x^n) = n \log_a x

Exponent comes outside as a multiplier. Most useful for solving log equations.

4. Change of base

logab=logcblogca\log_a b = \frac{\log_c b}{\log_c a}

For any reference base cc. Lets you compute log750\log_7 50 on a calculator that only has log10\log_{10} or ln\ln.

Solving log equations

The standard playbook:

If the equation has multiple log terms, condense them into a single log using rules 1–3, then convert to exponential form.

Example: log2(x)+log2(x2)=3\log_2(x) + \log_2(x - 2) = 3.

  • Condense: log2(x(x2))=3\log_2 (x(x-2)) = 3.
  • Exponential form: x(x2)=23=8x(x - 2) = 2^3 = 8.
  • Quadratic: x22x8=0x^2 - 2x - 8 = 0, factor: (x4)(x+2)=0(x - 4)(x + 2) = 0, so x=4x = 4 or x=2x = -2.
  • Check domain: log2(2)\log_2(-2) undefined (logs need positive arg), so reject x=2x = -2.
  • Answer: x=4x = 4.

Always check the domain — squaring or condensing logs can introduce extraneous solutions that violate the positive-argument requirement.

Useful identities

  • loga1=0\log_a 1 = 0 (anything to the zero is 1).
  • logaa=1\log_a a = 1 (anything to the first is itself).
  • logaan=n\log_a a^n = n (the inverse identity).
  • alogax=xa^{\log_a x} = x (the inverse identity, the other way).

Why logs matter

  • Compress huge ranges: pH, decibels, Richter scale, magnitudes — all logarithmic because the underlying quantities span many orders of magnitude.
  • Linearise exponential data: log-axis plots reveal exponential trends as straight lines. Standard in finance, biology, machine learning.
  • Calculus: ddxlnx=1x\frac{d}{dx}\ln x = \frac{1}{x} — the cleanest derivative on the planet, worth memorising forever.
  • Information theory: log base 2 measures bits; log base ee measures nats.

Common mistakes

  • log(x+y)logx+logy\log(x + y) \neq \log x + \log y. The product rule is for log(xy)\log(xy), not log(x+y)\log(x+y). There's no "log of a sum" rule.
  • Negative arguments: loga(3)\log_a(-3) is undefined in the reals.
  • Forgetting to check domain when solving equations.

Try it yourself

Drop any log expression into our Equation Solver — it picks the right rule chain and walks you through.

Related:

AI-Math Editorial Team

By AI-Math Editorial Team

Published 2026-05-02

A small team of engineers, mathematicians, and educators behind AI-Math, focused on making step-by-step math help accessible to every student.