Logarithmic Functions

Chapter 14, Functions and Their Graphs

Learning objectives

  • Define the logarithm as the inverse of the exponential
  • Evaluate logarithms of perfect powers
  • Apply the three laws of logarithms
  • Solve equations involving logarithms

A logarithm answers the question "what exponent?" Multiplication is repeated addition; exponentiation is repeated multiplication; and the logarithm undoes that repeated multiplication by counting how many times you had to multiply. Once you internalise that, the three laws of logarithms read like obvious arithmetic facts about exponents in disguise.

Definition by inversion

For b>0b > 0, bβ‰ 1b \neq 1, the logarithm base bb of xx is the unique number yy satisfying by=xb^y = x. We write y=log⁑bxy = \log_b x. Equivalently:

y=log⁑bxβ€…β€ŠβŸΊβ€…β€Šby=x.y = \log_b x \iff b^y = x.

Examples: log⁑28=3\log_2 8 = 3 because 23=82^3 = 8; log⁑101000=3\log_{10} 1000 = 3 because 103=100010^3 = 1000; log⁑51=0\log_5 1 = 0 because 50=15^0 = 1.

The three laws

For positive xx and yy:

  • Product rule: log⁑b(xy)=log⁑bx+log⁑by\log_b(xy) = \log_b x + \log_b y.
  • Quotient rule: log⁑b(x/y)=log⁑bxβˆ’log⁑by\log_b(x/y) = \log_b x - \log_b y.
  • Power rule: log⁑b(xn)=nlog⁑bx\log_b(x^n) = n \log_b x.

Why do these hold? Write x=bαx = b^{\alpha} and y=bβy = b^{\beta}; then xy=bα+βxy = b^{\alpha + \beta}, so its logarithm is α+β=log⁑bx+log⁑by\alpha + \beta = \log_b x + \log_b y. Each rule is just a restatement of an exponent rule, viewed through the logarithm lens.

Two special bases

The natural logarithm uses base ee: ln⁑x=log⁑ex\ln x = \log_e x. The common logarithm uses base 1010: in many engineering contexts log⁑x\log x means log⁑10x\log_{10} x by convention. (Pure-math texts often use log⁑x\log x for ln⁑x\ln x instead. Check the convention of the book you are reading.)

Change of base

To convert from base bb to base cc:

log⁑bx=log⁑cxlog⁑cb.\log_b x = \dfrac{\log_c x}{\log_c b}.

This is how a calculator that only knows ln⁑\ln and log⁑10\log_{10} can compute log⁑213\log_2 13: as ln⁑13ln⁑2\dfrac{\ln 13}{\ln 2}.

Where this shows up
  • Information Theory: The Shannon entropy H=βˆ’βˆ‘pilog⁑2piH = -\sum p_i \log_2 p_i measures information content in bits; the logarithm here is the same one you are learning, and it shows up in every compression algorithm (gzip, zstd, mp3).
  • Chemistry: The pH scale is βˆ’log⁑10[H+]-\log_{10}[H^+]; pH 4 is ten times more acidic than pH 5 because of the logarithm. Same trick on the Richter scale (earthquakes), decibel scale (sound), and apparent magnitude (stars).
  • Algorithms: Binary search is O(log⁑n)O(\log n) because doubling the input adds one step; the same logarithm explains why a sorted array of one trillion items can be searched in under 40 comparisons.

Exp Log ExplorerInteractive figure, enable JavaScript to interact.

(Switch the widget to Product rule mode and slide aa and cc. The widget draws log⁑b(a)\log_b(a) and log⁑b(c)\log_b(c) as separate heights on the logarithm curve, then shows that their sum equals log⁑b(ac)\log_b(ac). The product rule is the law made geometric.)

Solving logarithmic equations

To solve log⁑5x=3\log_5 x = 3, convert to exponential form: x=53=125x = 5^3 = 125. To solve log⁑2(x+1)=5\log_2(x + 1) = 5, the same trick gives x+1=25=32x + 1 = 2^5 = 32, so x=31x = 31. The general technique: exponential-and-logarithm undo each other, so to remove a logarithm, exponentiate; to remove an exponential, take a logarithm.

Try it

  • Predict first: by the product rule, log⁑10(6)\log_{10}(6) equals log⁑10(2)+log⁑10(?)\log_{10}(2) + \log_{10}(?)? Switch to Product rule mode, set a=2,c=3,b=10a = 2, c = 3, b = 10, and confirm by hand that log⁑10(6)=log⁑10(2)+log⁑10(3)\log_{10}(6) = \log_{10}(2) + \log_{10}(3).
  • Switch the base to b=eb = e (slide bb to about 2.722.72). Pick a value xx on the log curve and verify eln⁑x=xe^{\ln x} = x.
  • Compute log⁑927\log_9 27 by hand using the change-of-base formula in two different ways (base 3, then natural log), you should get 3/23/2.

Pause: why is log⁑b1=0\log_b 1 = 0 for every base? Why is log⁑bb=1\log_b b = 1? Tie both to the exponential definition.

Try it in code

PYTHON Β· OPTIONALRun β–·1deffactorial(n):2ifn <= 1:3return14returnn * factorial(n - 1)Write a working solution, click Run, see the test results inline.

A trap to watch for

The single most common error in pre-calculus: writing log⁑(a+b)=log⁑a+log⁑b\log(a + b) = \log a + \log b. This is wrong. The product rule says log⁑(aβ‹…b)=log⁑a+log⁑b\log(a \cdot b) = \log a + \log b, the inside is a product, not a sum. Test: log⁑10(1+1)=log⁑10(2)β‰ˆ0.301\log_{10}(1 + 1) = \log_{10}(2) \approx 0.301, while log⁑10(1)+log⁑10(1)=0+0=0\log_{10}(1) + \log_{10}(1) = 0 + 0 = 0. These are not equal. There is no nice identity for the logarithm of a sum; if a problem hands you log⁑(a+b)\log(a + b), leave it. The trap exists because log⁑\log looks like a linear operator (it is written before an argument, like a function), but its action on multiplication, not addition, is what produces the nice identity.

What you now know

You can convert between logarithmic and exponential form, apply the three laws to simplify expressions, change base when needed, and solve simple logarithmic equations by exponentiating. The next chapter generalises functions to mappings between abstract sets, the same definition you learnt in 13.1, but stripped of any reliance on numbers, ready for the rest of mathematics.

Quick check

Mark section complete β†’

References

  • Lang, S. (1971). Basic Mathematics. Springer. Chapter 13 Section 5, logarithms defined as inverses of exponentials.
  • Stewart, J. (2015). Calculus: Early Transcendentals, 8th ed. Cengage. Section 6.3: the three laws and change of base.
  • Apostol, T. M. (1967). Calculus, Volume I, 2nd ed. Wiley. Chapter 6: rigorous construction of ln⁑x\ln x as an integral and the resulting identities.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.