← mapFunctions & Growth

Logarithms

⚗ Dr. Möbius, from the lab

The logarithm is not a new thing. It's a question. Specifically, one question: "bb to what power gives yy?" That's it. Every single fact about logarithms — every law, every identity, every manipulation — is just that question looked at from a different angle. Once you see that, the entire fog lifts and you'll be furious at how simple it always was. The textbooks that present log laws as rules to memorize are committing a fucking crime against your understanding, and I will not be party to it.

THE BIG IDEA

The logarithm is the inverse of exponentiation: $\log_b(y)$ is the unique exponent you give $b$ to produce $y$, so every log law is just an exponent law read backwards through that mirror.

One question

Define: logb(y)=x\log_b(y) = x means exactly the same thing as bx=yb^x = y.

That is the entire definition. The logarithm is exponentiation run in reverse. You have a base b>0b > 0, b1b \ne 1; you have a target output y>0y > 0; and logb(y)\log_b(y) is the exponent that gets you there.

Examples:

  • log2(8)=3\log_2(8) = 3 because 23=82^3 = 8.
  • log10(1000)=3\log_{10}(1000) = 3 because 103=100010^3 = 1000.
  • log5(1)=0\log_5(1) = 0 because 50=15^0 = 1 (any base to the power 0 is 1).
  • log3(1/9)=2\log_3(1/9) = -2 because 32=1/93^{-2} = 1/9.

Practice this conversion until it's reflexive. Given any bx=yb^x = y, write logb(y)=x\log_b(y) = x. Given logb(y)=x\log_b(y) = x, write bx=yb^x = y.

Domain. logb(y)\log_b(y) is only defined for y>0y > 0. You cannot take a log of zero or a negative number in R\mathbb{R}, and trying to do so is not a grey area — it's simply undefined. Why? Because bx>0b^x > 0 for all xx — the exponential is always positive. Since the log asks "what exponent does bb need," and bxb^x never reaches 00 or negative, those targets have no answer. None. Zero. Write it down.

Deriving the log laws from exponent laws

Every log law is an exponent law in disguise. I will prove each one.

Notation first. Write m=logb(M)m = \log_b(M) and n=logb(N)n = \log_b(N). By definition, bm=Mb^m = M and bn=Nb^n = N.

Product law

logb(MN)=logb(M)+logb(N).\log_b(MN) = \log_b(M) + \log_b(N).

Proof. MN=bmbn=bm+nMN = b^m \cdot b^n = b^{m+n} (exponent law: multiply = add exponents). Translating back: logb(MN)=m+n=logb(M)+logb(N)\log_b(MN) = m + n = \log_b(M) + \log_b(N). The product law for logs IS the exponent addition law, read backwards. \square

Quotient law

logb ⁣(MN)=logb(M)logb(N).\log_b\!\left(\frac{M}{N}\right) = \log_b(M) - \log_b(N).

Proof. M/N=bm/bn=bmnM/N = b^m / b^n = b^{m-n}. So logb(M/N)=mn=logb(M)logb(N)\log_b(M/N) = m - n = \log_b(M) - \log_b(N). Same move. \square

Power law

logb(Mp)=plogb(M).\log_b(M^p) = p \cdot \log_b(M).

Proof. Mp=(bm)p=bmpM^p = (b^m)^p = b^{mp}. So logb(Mp)=mp=plogb(M)\log_b(M^p) = mp = p \cdot \log_b(M). \square

Summary. Log of a product = sum of logs. Log of a quotient = difference of logs. Log of a power = power times log. None of these are rules you received from the sky — they are the exponent laws (add, subtract, multiply exponents) expressed in log language, and every single one of them is derivable from scratch in under thirty seconds. If you find yourself memorizing them instead of deriving them, something has gone wrong in the lab.

Change of base

You want log5(17)\log_5(17) but your calculator only has ln\ln or log10\log_{10}. Here's the formula:

logb(y)=ln(y)ln(b)=log10(y)log10(b).\log_b(y) = \frac{\ln(y)}{\ln(b)} = \frac{\log_{10}(y)}{\log_{10}(b)}.

Proof. Let x=logb(y)x = \log_b(y). By definition, bx=yb^x = y. Take the natural log of both sides: ln(bx)=ln(y)\ln(b^x) = \ln(y). Apply the power law: xln(b)=ln(y)x \cdot \ln(b) = \ln(y). Solve: x=ln(y)/ln(b)x = \ln(y)/\ln(b). \square

The base you convert to is irrelevant; the ratio is the same in any base.

The natural log ln\ln

ln(x)=loge(x)\ln(x) = \log_e(x), where e2.718e \approx 2.718 is the natural base from the Exponential Functions lesson. The reason ln\ln is called "natural" is that the rate-of-change formula for exe^x is exactly exe^x — unique among all exponential functions. The natural log inherits this naturality: ln(ex)=x\ln(e^x) = x and eln(x)=xe^{\ln(x)} = x. These are just the inverse-function identities, which the next lesson will formalize.

Solving exponential equations

Method. To solve bx=cb^x = c: take logb\log_b of both sides (or take ln\ln if change-of-base is convenient).

Example: 3x=173^x = 17.

log3(3x)=log3(17)    x=log3(17)=ln17ln32.8331.0992.58.\log_3(3^x) = \log_3(17) \implies x = \log_3(17) = \frac{\ln 17}{\ln 3} \approx \frac{2.833}{1.099} \approx 2.58.

Solving log equations: domain checks are mandatory. The equation log2(x)+log2(x4)=5\log_2(x) + \log_2(x - 4) = 5 looks straightforward until you remember that logs require positive arguments.

Step 1: combine using the product law: log2(x(x4))=5\log_2(x(x-4)) = 5. Step 2: convert to exponential: x(x4)=25=32x(x-4) = 2^5 = 32. Step 3: solve: x24x32=0(x8)(x+4)=0x^2 - 4x - 32 = 0 \Rightarrow (x-8)(x+4) = 0. Candidates: x=8x = 8 or x=4x = -4. Step 4: domain check. xx must satisfy x>0x > 0 AND x4>0x - 4 > 0, i.e. x>4x > 4. Only x=8x = 8 survives. Answer: x=8x = 8.

The x=4x = -4 is an extraneous solution — a phantom that algebra invented while you weren't watching, a lying bastard produced by squaring (hidden in x(x4)x(x-4)). Always check. Always. This is not optional. The domain check is mandatory every single time you solve a log equation and I will not tell you again.

Logarithms measure orders of magnitude

Richter scale, decibels, pH — all logarithmic. Why? Because logarithms compress enormous ranges into manageable numbers. An earthquake of magnitude 7 releases about 1010 times the energy of magnitude 6, and 100 times that of magnitude 5. The log scale turns the multiplicative structure (each step is ×10\times 10) into an additive structure (each step is +1+1). This is the product law in action: the log of a product is a sum.

Every time you see "the scale spans many orders of magnitude," logarithms are the right measurement tool. Every time. Full stop. Reach for the damn log.

🔬 SPECIMENS (worked examples)

Worked example 1 — converting and evaluating logarithms

Evaluate: (a) log4(64)\log_4(64), (b) log2(1/8)\log_2(1/8), (c) ln(e5)\ln(e^5).

(a) log4(64)\log_4(64): ask "44 to what power gives 6464?" Since 43=644^3 = 64, the answer is 33.

log4(64)=3.\log_4(64) = 3.

(b) log2(1/8)\log_2(1/8): ask "22 to what power gives 1/81/8?" Since 1/8=231/8 = 2^{-3}, the answer is 3-3.

log2(1/8)=3.\log_2(1/8) = -3.

(c) ln(e5)\ln(e^5): ask "ee to what power gives e5e^5?" The exponent is 55.

ln(e5)=5.\ln(e^5) = 5.

This last one is a general identity: ln(ex)=x\ln(e^x) = x for all real xx. The log and exponential cancel each other — they are inverse functions (the full story is the next lesson).

Worked example 2 — using log laws to simplify

Write ln ⁣(x3yz2)\ln\!\left(\dfrac{x^3 \sqrt{y}}{z^2}\right) in expanded form using only simple logs.

Apply the laws step by step. First, quotient law: ln ⁣(x3yz2)=ln(x3y)ln(z2).\ln\!\left(\frac{x^3 \sqrt{y}}{z^2}\right) = \ln(x^3 \sqrt{y}) - \ln(z^2).

Expand the first term using the product law: =ln(x3)+ln(y)ln(z2).= \ln(x^3) + \ln(\sqrt{y}) - \ln(z^2).

Apply the power law to each term. Note y=y1/2\sqrt{y} = y^{1/2}: =3ln(x)+12ln(y)2ln(z).= 3\ln(x) + \frac{1}{2}\ln(y) - 2\ln(z).

Each step is the corresponding exponent law, run backwards. No memorization needed — just exponent rules in log clothing.

Worked example 3 — the extraneous solution, caught red-handed and sentenced

Solve log3(x+6)+log3(x)=3\log_3(x+6) + \log_3(x) = 3.

Step 1: combine. Product law: log3(x(x+6))=3\log_3(x(x+6)) = 3.

Step 2: convert. x(x+6)=33=27x(x+6) = 3^3 = 27.

Step 3: solve. x2+6x27=0x^2 + 6x - 27 = 0. Factor: need two numbers multiplying to 27-27, adding to 66: that's 99 and 3-3. (x+9)(x3)=0.(x + 9)(x - 3) = 0. Candidates: x=9x = -9 or x=3x = 3.

Step 4: domain check. Both xx and x+6x + 6 must be positive.

  • x=9x = -9: x=9<0x = -9 < 0. Logs of negative inputs are undefined. Reject.
  • x=3x = 3: x=3>0x = 3 > 0 and x+6=9>0x + 6 = 9 > 0. Valid.

Answer: x=3x = 3.

Verify: log3(9)+log3(3)=2+1=3\log_3(9) + \log_3(3) = 2 + 1 = 3. Correct.

The x=9x = -9 is the extraneous solution. It emerged from algebraically solving the quadratic without the domain constraint. If you'd handed in x=9x = -9 on an exam, you'd have been wrong. Check your logs.

☠ KNOWN HAZARDS

  • log(M+N)logM+logN\log(M + N) \ne \log M + \log N. The product law says log(MN)=logM+logN\log(MN) = \log M + \log N. Sum under the log is NOT the same as product under the log. This mistake kills an appalling number of exam answers, year after year, generation after generation. You will not be one of those people.

  • Forgetting domain checks when solving log equations. Extraneous solutions arise when algebra produces values that make a logarithm's argument non-positive. Check EVERY solution back in the original equation's domain constraints. I already told you this. Do it anyway.

  • logb(Mp)=plogb(M)\log_b(M^p) = p \cdot \log_b(M) requires M>0M > 0. If MM could be negative, MpM^p might not be defined in R\mathbb{R}. The power law holds for positive MM; outside that range, you're in undefined territory — which is to say, nowhere useful.

  • Mixing up ln\ln and log10\log_{10}. ln\ln is base ee; log\log (with no subscript) is base 1010 in applied contexts, but base ee in pure math — the convention shifts depending on who wrote the book. The change-of-base formula works for either; just be consistent within a single problem. Switching bases mid-solution is how things go to hell.

TL;DR

  • logb(y)=x\log_b(y) = x means bx=yb^x = y. The logarithm is the inverse operation of exponentiation.

  • Log laws come from exponent laws: logb(MN)=logbM+logbN\log_b(MN) = \log_b M + \log_b N (from bmbn=bm+nb^m \cdot b^n = b^{m+n}), and similarly for quotients and powers.

  • Change of base: logb(y)=ln(y)/ln(b)\log_b(y) = \ln(y)/\ln(b).

  • To solve bx=cb^x = c: take logs. To solve log equations: convert to exponential form, solve, then check the domain (arguments of logs must be positive).

  • Logarithmic scales (Richter, decibels, pH) compress multiplicative ranges into additive ones — the product law in practice.

unlocks