Logarithms — Definition, Rules, Examples

#Algebra
TL;DR
A logarithm log⁡b(x)\log_b(x) is the exponent to which the base bb must be raised to produce xx. This article covers the definition as the inverse of exponentiation, the seven log rules (product, quotient, power, change-of-base, identity, zero, base-of-base), three worked examples, and the historical breakthrough Napier made in 1614.
BT
Bhanzu TeamLast updated on June 1, 20267 min read

The Question "What Power Gives This Number?"

Multiplication makes numbers bigger fast. Exponentiation makes them bigger faster. Logarithms are the inverse — they tell you what power produced a number, taking a huge value and returning the small exponent that built it.

Before pocket calculators, logarithms let astronomers replace huge multiplications with additions of small numbers (a 24-hour calculation turned into a 30-minute one). Today they show up in earthquake magnitudes, pH levels, signal-to-noise ratios, and the algorithms behind data compression. The inverse-of-exponential framing is what makes them everywhere.

What a Logarithm Is

The logarithm of xx to base bb is the exponent that turns bb into xx:

log⁡b(x)=y;  ⟺  ;by=x.\log_b(x) = y ;\iff; b^y = x.

Three conditions must hold: b>0b > 0, b≠1b \neq 1, and x>0x > 0.

The most common bases are:

  • Common logarithm — log⁡(x)\log(x) usually means log⁡10(x)\log_{10}(x).

  • Natural logarithm — ln⁡(x)\ln(x) means log⁡e(x)\log_e(x), where e≈2.71828e \approx 2.71828.

  • Binary logarithm — log⁡2(x)\log_2(x), used in computer science.

Quick facts.

  • Definition: log⁡b(x)=y  ⟺  by=x\log_b(x) = y \iff b^y = x.

  • Domain: x>0x > 0 (the input to log must be positive).

  • Range: all real numbers.

  • Special values: log⁡b(1)=0\log_b(1) = 0, log⁡b(b)=1\log_b(b) = 1.

  • Cannot take log of: zero or negative numbers (over the real numbers).

  • Grade introduced: CBSE Class 9–11 (logarithms appear in different chapters); CCSS-M HSF-LE.A.4 (for exponential models, express as a logarithm); NCERT Class 9 Chapter 1 — Number Systems (introductory log appears in advanced exercises).

The Seven Log Rules of Logarithms

1. Product rule

log⁡b(MN)=log⁡b(M)+log⁡b(N)\log_b(MN) = \log_b(M) + \log_b(N).

The log of a product is the sum of the logs.

2. Quotient rule

log⁡b(M/N)=log⁡b(M)−log⁡b(N)\log_b(M/N) = \log_b(M) - \log_b(N).

The log of a quotient is the difference of the logs.

3. Power rule

log⁡b(Mp)=p⋅log⁡b(M)\log_b(M^p) = p \cdot \log_b(M).

The log of a power is the exponent times the log.

4. Change-of-base rule

log⁡b(x)=log⁡c(x)log⁡c(b)\log_b(x) = \dfrac{\log_c(x)}{\log_c(b)} for any base cc.

Useful when your calculator only does log⁡10\log_{10} or ln⁡\ln.

5. Identity rule

log⁡b(b)=1\log_b(b) = 1 and log⁡b(1)=0\log_b(1) = 0.

The log of the base is 1; the log of 1 is 0.

6. Inverse rules

blog⁡b(x)=xb^{\log_b(x)} = x and log⁡b(bx)=x\log_b(b^x) = x.

Exponentiation and logarithm to the same base cancel.

7. Equal-arguments rule

If log⁡b(M)=log⁡b(N)\log_b(M) = \log_b(N), then M=NM = N.

This is how log equations are solved.

Three Worked Examples of Logarithms

Quick. Evaluate log⁡2(8)\log_2(8).

Ask: what power of 2 gives 8? 23=82^3 = 8, so log⁡2(8)=3\log_2(8) = 3.

Final answer: log⁡2(8)=3\log_2(8) = 3.

Standard (Wrong Path First — Where Solutions Go Off the Rails). Solve log⁡3(x)+log⁡3(x−2)=1\log_3(x) + \log_3(x - 2) = 1.

The wrong path. The rusher treats the left side term-by-term: log⁡3(x)=a\log_3(x) = a and log⁡3(x−2)=b\log_3(x - 2) = b with a+b=1a + b = 1, and tries to solve two unknowns at once.

The rescue. Use the product rule.

log⁡3(x)+log⁡3(x−2)=log⁡3(x(x−2))=1.\log_3(x) + \log_3(x - 2) = \log_3(x(x - 2)) = 1.

Convert to exponential form: x(x−2)=31=3x(x - 2) = 3^1 = 3.

Expand: x2−2x−3=0x^2 - 2x - 3 = 0. Factor: (x−3)(x+1)=0(x - 3)(x + 1) = 0. So x=3x = 3 or x=−1x = -1.

Check the domain: log⁡3(x)\log_3(x) requires x>0x > 0, and log⁡3(x−2)\log_3(x - 2) requires x>2x > 2. The value x=−1x = -1 violates both. Reject.

Final answer: x=3x = 3.

Stretch. Solve 5x+1=2⋅3x5^{x+1} = 2 \cdot 3^x.

Take ln⁡\ln of both sides:

ln⁡(5x+1)=ln⁡(2⋅3x).\ln(5^{x+1}) = \ln(2 \cdot 3^x).

Apply log rules:

(x+1)ln⁡5=ln⁡2+xln⁡3.(x + 1) \ln 5 = \ln 2 + x \ln 3.

xln⁡5+ln⁡5=ln⁡2+xln⁡3.x \ln 5 + \ln 5 = \ln 2 + x \ln 3.

x(ln⁡5−ln⁡3)=ln⁡2−ln⁡5.x(\ln 5 - \ln 3) = \ln 2 - \ln 5.

x=ln⁡2−ln⁡5ln⁡5−ln⁡3=ln⁡(2/5)ln⁡(5/3).x = \frac{\ln 2 - \ln 5}{\ln 5 - \ln 3} = \frac{\ln(2/5)}{\ln(5/3)}.

Numerically: x≈−0.9160.511≈−1.793x \approx \dfrac{-0.916}{0.511} \approx -1.793.

Final answer: x=ln⁡(2/5)/ln⁡(5/3)≈−1.79x = \ln(2/5) / \ln(5/3) \approx -1.79.

Where Logarithms Show Up — From Earthquakes to Algorithms

Logarithms compress huge ranges into small ones. That single capability is why they appear in every quantitative field.

  • Richter scale. Earthquake magnitude is log⁡10\log_{10} of the seismic amplitude. A magnitude-7 earthquake releases 10× the energy-density of a magnitude-6.

  • Decibels. Sound intensity in decibels is 10log⁡10(I/I0)10 \log_{10}(I/I_0). The human ear's huge dynamic range collapses to 0–120 dB.

  • pH scale. pH=−log⁡10[H+]\text{pH} = -\log_{10}[\text{H}^+]. Hydrogen ion concentrations spanning 14 orders of magnitude become a 0–14 scale.

  • Computer science. Binary search runs in O(log⁡2n)O(\log_2 n) time. The base-2 log is the number of yes/no questions to find one item among nn.

  • Information theory. Shannon entropy uses log⁡2\log_2. The information content of a message is the log of its inverse probability.

  • Compound interest. "How long to double money at 5%?" is log⁡(2)/log⁡(1.05)≈14.2\log(2)/\log(1.05) \approx 14.2 years.

The destination, in every direction: any time a quantity spans many orders of magnitude, logarithms compress it back into a useful range.

The Mistakes Students Make Most Often

1. Forgetting the domain

Where it slips in: Solving log⁡3(x)+log⁡3(x−2)=1\log_3(x) + \log_3(x - 2) = 1 and accepting x=−1x = -1.

Don't do this: Skip the domain check.

The correct way: log⁡b(x)\log_b(x) requires x>0x > 0. Check every candidate solution against the original equation's domain restrictions.

2. Trying to take the log of a sum

Where it slips in: Writing log⁡(a+b)=log⁡(a)+log⁡(b)\log(a + b) = \log(a) + \log(b).

Don't do this: Distribute the log over addition.

The correct way: log⁡(a+b)\log(a + b) does not simplify in general. The product rule applies to products, not sums. log⁡(ab)=log⁡(a)+log⁡(b)\log(ab) = \log(a) + \log(b).

3. Misapplying the power rule

Where it slips in: log⁡(x2)=(log⁡x)2\log(x^2) = (\log x)^2.

Don't do this: Move the exponent inside as a power on the log.

The correct way: log⁡(x2)=2log⁡(x)\log(x^2) = 2 \log(x). The exponent comes out as a coefficient, not as an exponent on the log.

4. Trying to take the log of zero or a negative

Where it slips in: Computing log⁡(0)\log(0) or log⁡(−5)\log(-5).

Don't do this: Treat these as defined.

The correct way: log⁡(0)\log(0) is undefined (the limit is −∞-\infty). log⁡\log of a negative number is undefined over the reals (defined in complex analysis but outside typical school context).

The real-world version. In 1935, Charles F. Richter at Caltech faced a measurement problem: earthquakes ranged across so many orders of magnitude that a linear scale was useless — a magnitude-2 quake was a hundredth of the magnitude-4. Richter took the logarithm of the seismic-wave amplitude and got the modern Richter scale, where 1–9 cover what would otherwise span ten million units.

The 1960 Valdivia earthquake (the largest ever recorded, magnitude 9.5) released about 101810^{18} joules. The 2011 Tōhoku earthquake (magnitude 9.1) released about a third as much. Logarithms made these numbers comparable.

The Mathematicians Who Invented Logarithms

John Napier (1550–1617, Scotland) published Mirifici Logarithmorum Canonis Descriptio (1614), inventing logarithms. His goal was practical — reduce the labour of multiplying huge astronomical numbers. The breakthrough turned a 24-hour calculation into a 30-minute one.

Henry Briggs (1561–1630, England) worked with Napier to develop the base-10 (common) logarithms in 1617, leading to the publication of Arithmetica Logarithmica (1624) — the log tables that defined applied mathematics for the next 350 years.

Leonhard Euler (1707–1783, Switzerland) introduced the natural logarithm and the constant e≈2.71828e \approx 2.71828 in Introductio in analysin infinitorum (1748), unifying logarithms with the exponential function and calculus.

The story worth remembering. Napier worked on logarithms for 20 years before publishing — partly because he was afraid the calculation might contain an error. Pierre-Simon Laplace later said Napier's invention "by shortening the labours doubled the life of the astronomer." Each Class 11 student uses Napier's invention every time a log button is pressed on a calculator.

Conclusion

  • A logarithm log⁡b(x)=y\log_b(x) = y is the exponent that satisfies by=xb^y = x.

  • The seven log rules — product, quotient, power, change-of-base, identity, inverse, equal-arguments — are the algebra of logs.

  • The domain is x>0x > 0; logs of zero or negative numbers are undefined over the reals.

  • The single most common mistake is forgetting to check that candidate solutions to log equations satisfy the original domain.

  • Logarithms compress huge ranges (earthquake magnitudes, decibels, pH) into useful scales.

Five Minutes of Practice

  1. Evaluate log⁡5(125)\log_5(125).

  2. Solve log⁡2(x)+log⁡2(x−3)=2\log_2(x) + \log_2(x - 3) = 2.

  3. Solve 3x=103^x = 10 to two decimal places.

Want a live Bhanzu trainer to walk through more logarithm problems? Book a free demo class — online globally.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is a logarithm?
The exponent to which a fixed base must be raised to produce a given number. log⁡b(x)=y\log_b(x) = y means by=xb^y = x.
What is the difference between log⁡\log and ln⁡\ln?
log⁡(x)\log(x) usually means log⁡10(x)\log_{10}(x) (common logarithm, base 10). ln⁡(x)\ln(x) means log⁡e(x)\log_e(x) (natural logarithm, base e≈2.71828e \approx 2.71828). The natural log is preferred in calculus because its derivative is the simplest.
Can you take the log of a negative number?
Not over the real numbers. log⁡(negative)\log(\text{negative}) is undefined in standard real-valued analysis. Complex analysis defines it, but only in specialised contexts.
Why is log⁡b(1)=0\log_b(1) = 0?
Because b0=1b^0 = 1 for any base b≠0b \neq 0. The log of 1 is always 0, regardless of base.
How do I change a logarithm's base?
Use log⁡b(x)=log⁡c(x)/log⁡c(b)\log_b(x) = \log_c(x) / \log_c(b). The most useful case is converting any base to natural log: log⁡b(x)=ln⁡(x)/ln⁡(b)\log_b(x) = \ln(x) / \ln(b).
What is the inverse of a logarithm?
The exponential function with the same base. log⁡b\log_b and bxb^x undo each other.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →