Introduction to Logarithms Advanced. This lesson goes beyond core Algebra I. You can skip it.

Learning goals

  • Read log⁡b(y)=x\log_b(y) = x as the exponent turning bb into yy
  • Treat the logarithm as the exponential's inverse
  • Apply the product, quotient and power laws
  • Distinguish common log⁡\log from natural ln⁡\ln
  • Solve for an exponent by taking logs of both sides
  • Sketch the graph as y=bxy = b^x reflected across y=xy = x

A name for the missing exponent

Look again at 2x=102^x = 10. The value 23=82^3 = 8 falls short and 24=162^4 = 16 overshoots, so the exponent we want lies between 33 and 44. As xx climbs from 33 to 44, 2x2^x climbs steadily too, from 88 up to 1616, without skipping or repeating a value on the way, so it passes through 1010 exactly once. In the exponential functions lesson this steady climb had a name, one-to-one, and it is the reason a definite answer exists even though no whole number gives it. That number has had no symbol until now. We give it one.

Fix a base bb with b>0b > 0 and b≠1b \ne 1, and take a positive number yy. The logarithm of yy to base bb, written log⁡b(y)\log_{b}(y), is the exponent you put on bb to produce yy. Said as an equation,

log⁡b(y)=x  ⟺  bx=y.\log_{b}(y) = x \quad\iff\quad b^{x} = y.

The two equations carry the exact same information, read in opposite directions. The right-hand form bx=yb^{x} = y is the exponential form; the left-hand form log⁡b(y)=x\log_{b}(y) = x is the logarithmic form. One starts from the exponent xx and reports the result yy; the other starts from the result yy and reports the exponent xx. This is the sentence to carry through the whole lesson: a logarithm is an exponent. Whenever you read log⁡b(y)\log_{b}(y), say to yourself “the exponent that turns bb into yy,” and the symbol stops being mysterious.

So the answer to our opening puzzle finally has a name. The unique solution of 2x=102^x = 10 is x=log⁡2(10)x = \log_{2}(10), a number between 33 and 44 that we will pin down to 3.323.32 once we have the tools.

Reading the same fact both ways is a skill worth drilling, because every rule that follows is just one of these two forms in disguise:

Exponential formLogarithmic form
23=82^{3} = 8log⁡2(8)=3\log_{2}(8) = 3
102=10010^{2} = 100log⁡10(100)=2\log_{10}(100) = 2
50=15^{0} = 1log⁡5(1)=0\log_{5}(1) = 0
2−4=1162^{-4} = \tfrac{1}{16}log⁡2 ⁣(116)=−4\log_{2}\!\left(\tfrac{1}{16}\right) = -4

Reading a logarithm straight from the definition

To evaluate a logarithm by hand, do not reach for a formula. Translate it into the question the definition asks: the base to what power gives the input? For friendly numbers you can answer that question on sight.

Worked example 1 Read five logarithms off the definition

Each one asks for an exponent. Find the power the base needs.

log⁡2(32)\log_{2}(32) asks “two to what power is 3232?” Since 25=322^5 = 32,

log⁡2(32)=5.\log_{2}(32) = 5.

log⁡10(1000)\log_{10}(1000) asks “ten to what power is 10001000?” Since 103=100010^3 = 1000,

log⁡10(1000)=3.\log_{10}(1000) = 3.

log⁡7(1)\log_{7}(1) asks “seven to what power is 11?” Any allowed base to the zero power is 11, so

log⁡7(1)=0.\log_{7}(1) = 0.

log⁡3(3)\log_{3}(3) asks “three to what power is 33?” A base to the first power is itself, so

log⁡3(3)=1.\log_{3}(3) = 1.

log⁡2 ⁣(116)\log_{2}\!\left(\tfrac{1}{16}\right) asks “two to what power is 116\tfrac{1}{16}?” A reciprocal needs a negative exponent, and 2−4=124=1162^{-4} = \tfrac{1}{2^4} = \tfrac{1}{16}, so

log⁡2 ⁣(116)=−4.\log_{2}\!\left(\tfrac{1}{16}\right) = -4.

Two patterns are worth keeping from this: log⁡b(1)=0\log_{b}(1) = 0 for every base (since b0=1b^0 = 1), and log⁡b(b)=1\log_{b}(b) = 1 (since b1=bb^1 = b). And when the base is bigger than 11, the log of a number smaller than 11 comes out negative, since landing below 11 then takes a negative exponent.

Check your understanding

What is log⁡2(18)\log_{2}\left(\tfrac{1}{8}\right)?

Answer choices

The logarithm undoes the exponential

The definition was built to make log⁡b\log_{b} reverse bxb^x. Apply one after the other, in either order, and you land back where you started: the exponential and the logarithm are a matched pair of undo buttons, the same pattern the inverse functions lesson already named. Written out, that pattern reads

blog⁡b(y)=y(for y>0),log⁡b(bx)=x(for every x).b^{\log_{b}(y)} = y \quad (\text{for } y > 0), \qquad \log_{b}(b^{x}) = x \quad (\text{for every } x).

Read each one in words. In blog⁡b(y)b^{\log_{b}(y)}, the exponent log⁡b(y)\log_{b}(y) is by definition “the exponent that turns bb into yy.” So raising bb to that exponent turns bb into yy, and you land on yy. In log⁡b(bx)\log_{b}(b^{x}), the input bxb^{x} is a power of bb whose exponent is xx, and the logarithm reports that exponent, which is xx.

Check your understanding

What is log⁡7(75)\log_{7}(7^{5})?

Answer choices

This inverse relationship also settles a question the definition left hanging: which numbers may you take the logarithm of? A logarithm only ever returns an exponent that the exponential could have used, so its input must be a number the exponential can actually produce. From the exponential functions lesson, bxb^{x} is always positive: its range is y>0y > 0. There is no real power of a positive base that equals 00 or a negative number. So log⁡b(0)\log_{b}(0) and the logarithm of any negative number are undefined, and the domain of log⁡b\log_{b} is the positive numbers alone,

y>0.y > 0.

For a base b>1b > 1, as the input shrinks toward 00, the exponent needed to reach it runs off toward −∞-\infty. That runaway is why the graph of such a logarithm later dives down along the vertical axis. You can take the logarithm of a tiny positive number, but never of zero, and never of a negative.

Check your understanding

Which of these is undefined?

Answer choices

Common logs and natural logs

Two bases come up so often that they get their own shorthand.

The common logarithm has base 1010. Because we write numbers in base ten, powers of ten are everywhere, and this log is written with no base at all: log⁡(y)\log(y) means log⁡10(y)\log_{10}(y). So log⁡(1000)=3\log(1000) = 3 and log⁡(100)=2\log(100) = 2. On a calculator it is the button marked log⁡\log.

The natural logarithm has base ee, the number e≈2.718e \approx 2.718 that surfaced in the compound interest lesson as the ceiling of continuous growth. It is written ln⁡(y)\ln(y), so ln⁡\ln means log⁡e\log_{e}. Thus ln⁡(e)=1\ln(e) = 1 and ln⁡(1)=0\ln(1) = 0. On a calculator it is the button marked ln⁡\ln. The base ee is called “natural” because it is the base that arises on its own in problems of continuous growth and decay. In those problems it makes the formulas simplest.

Everything proved in this lesson holds for every allowed base, including these two. When a statement is written with log⁡\log or ln⁡\ln, it is just the general rule with b=10b = 10 or b=eb = e.

Check your understanding

Which statement correctly tells log⁡\log and ln⁡\ln apart?

Answer choices

The laws of logarithms

Because a logarithm is an exponent, the rules for combining logarithms are really the rules for combining exponents, wearing a disguise. Each of the three laws below turns a harder operation on the inputs into an easier operation on the logarithms. Look at the pattern on numbers you can verify first, then see why it always holds.

With base 22, watch what happens when the values multiply. 8⋅4=328 \cdot 4 = 32, and their logarithms are log⁡2(8)=3\log_{2}(8) = 3 and log⁡2(4)=2\log_{2}(4) = 2, which add up to the logarithm of the product: log⁡2(8⋅4)=log⁡2(32)=5=3+2\log_{2}(8 \cdot 4) = \log_{2}(32) = 5 = 3 + 2. The same thing happens with powers. Squaring 88 gives 82=64=268^2 = 64 = 2^6, and log⁡2(82)=6=2⋅3=2log⁡2(8)\log_{2}(8^{2}) = 6 = 2 \cdot 3 = 2\log_{2}(8). Multiplying the values added their logarithms; raising a value to a power multiplied its logarithm. The figure below shows the doubling pattern in miniature, and the three laws below explain why it always works, not just for 88 and 44.

Logarithms convert multiplication into additionThe geometric sequence 1, 2, 4, 8, 16 on top and its base-2 logarithms 0, 1, 2, 3, 4 below, showing that multiplying the values corresponds to adding the logarithms.×2×2×2×2value124816log₂01234+1+1+1+1
Why logarithms turn multiplying into adding. On the top line the values multiply by 2 at each step (1, 2, 4, 8, 16); on the bottom line their base-2 logarithms add 1 at each step (0, 1, 2, 3, 4). Because 2 times 4 equals 8 while 1 plus 2 equals 3, a product on top matches a sum below. Sliding and adding these lengths instead of multiplying the values is exactly how a slide rule works.

Throughout, fix a base bb and two positive numbers MM and NN, and name their logarithms

m=log⁡b(M),n=log⁡b(N),m = \log_{b}(M), \qquad n = \log_{b}(N),

which in exponential form say bm=Mb^{m} = M and bn=Nb^{n} = N. Every proof starts from those two equations and applies a single exponent rule you already know.

Why log⁡b(MN)=log⁡bM+log⁡bN\log_{b}(MN) = \log_{b} M + \log_{b} N#

Multiply MM and NN by multiplying their exponential forms, and use the product rule for exponents, bm⋅bn=bm+nb^{m} \cdot b^{n} = b^{m+n}, from the exponential functions lesson:

MN=bm⋅bn=bm+n.MN = b^{m} \cdot b^{n} = b^{m+n}.

Now read the outer equation MN=bm+nMN = b^{m+n} back through the definition of a logarithm. It says the exponent that turns bb into MNMN is m+nm + n, and that exponent is exactly what log⁡b(MN)\log_{b}(MN) means. Therefore

log⁡b(MN)=m+n=log⁡b(M)+log⁡b(N).\log_{b}(MN) = m + n = \log_{b}(M) + \log_{b}(N).

Multiplying the two inputs added their logarithms, because underneath, the exponents added.

Why log⁡b(M/N)=log⁡bM−log⁡bN\log_{b}(M/N) = \log_{b} M - \log_{b} N#

Divide instead of multiply, and use the quotient rule for exponents, bmbn=bm−n\dfrac{b^{m}}{b^{n}} = b^{m-n}:

MN=bmbn=bm−n.\frac{M}{N} = \frac{b^{m}}{b^{n}} = b^{m-n}.

Read MN=bm−n\dfrac{M}{N} = b^{m-n} back through the definition: the exponent that turns bb into MN\dfrac{M}{N} is m−nm - n, which is what log⁡b ⁣(MN)\log_{b}\!\left(\dfrac{M}{N}\right) means. So

log⁡b ⁣(MN)=m−n=log⁡b(M)−log⁡b(N).\log_{b}\!\left(\frac{M}{N}\right) = m - n = \log_{b}(M) - \log_{b}(N).

Dividing the inputs subtracted their logarithms.

Why log⁡b(Mk)=k log⁡bM\log_{b}(M^{k}) = k\,\log_{b} M#

Raise MM to a power kk using its exponential form M=bmM = b^{m}, and apply the power-of-a-power rule, (bm)k=bmk\left(b^{m}\right)^{k} = b^{mk}:

Mk=(bm)k=bmk.M^{k} = \left(b^{m}\right)^{k} = b^{mk}.

Read Mk=bmkM^{k} = b^{mk} back through the definition: the exponent that turns bb into MkM^{k} is mkmk, so

log⁡b(Mk)=mk=k⋅log⁡b(M).\log_{b}(M^{k}) = mk = k \cdot \log_{b}(M).

Raising an input to a power multiplied its logarithm by that power. A power on the input becomes a plain coefficient out front.

Step back and notice the pattern across all three laws just proved: multiplication became addition, division became subtraction, and a power became a product. That trade, hard operation for easy one, is not a curiosity; it is the reason logarithms were invented centuries before anyone cared that they were inverse functions. Multiplying two twelve-digit numbers by hand is brutal, but adding their logarithms and looking up the reverse is quick.

Worked example 2 Combine known logarithms with the laws

Suppose a calculator once showed you the rounded values log⁡b(2)≈0.30\log_{b}(2) \approx 0.30 and log⁡b(3)≈0.48\log_{b}(3) \approx 0.48, for some base bb you no longer remember. Find log⁡b(12)\log_{b}(12) without ever learning what bb is.

The trick is to write 1212 using only 22s and 33s, because those are the logarithms you were handed. Factor it:

12=4⋅3=22⋅3.12 = 4 \cdot 3 = 2^{2} \cdot 3.

Now take log⁡b\log_{b} of both sides and let the laws do the work. The product law splits the factors into a sum, and the power law pulls the exponent 22 down in front:

log⁡b(12)=log⁡b(22⋅3)=log⁡b(22)+log⁡b(3)=2log⁡b(2)+log⁡b(3).\log_{b}(12) = \log_{b}(2^{2} \cdot 3) = \log_{b}(2^{2}) + \log_{b}(3) = 2\log_{b}(2) + \log_{b}(3).

Substitute the rounded values:

log⁡b(12)≈2(0.30)+0.48=0.60+0.48=1.08.\log_{b}(12) \approx 2(0.30) + 0.48 = 0.60 + 0.48 = 1.08.

Two small, rounded logarithms and a bit of factoring produced a third, with no base ever named. That is the laws turning multiplication and powers into addition.

Check your understanding

Use a logarithm law to evaluate log⁡3(9)+log⁡3(3)\log_{3}(9) + \log_{3}(3).

Answer choices

Check your understanding

Use a logarithm law to evaluate log⁡5(50)−log⁡5(2)\log_{5}(50) - \log_{5}(2).

Answer choices

Solving for an exponent at last

Now the payoff the whole chapter was building toward. To solve an equation with the unknown stuck in the exponent, such as 2x=102^x = 10, take the logarithm of both sides. Then let the power law bring that exponent down to the ground, where you can solve for it.

Worked example 3 Solve the opening puzzle, then a doubling time

First, 2x=102^x = 10. Take the common logarithm of both sides. The two sides are equal, so their logs are equal:

log⁡(2x)=log⁡(10).\log(2^{x}) = \log(10).

The power law turns the left side into xlog⁡(2)x\log(2), and log⁡(10)=1\log(10) = 1 because 101=1010^1 = 10. So

xlog⁡(2)=1  ⇒  x=1log⁡(2)≈10.3010≈3.32.x\log(2) = 1 \;\Rightarrow\; x = \frac{1}{\log(2)} \approx \frac{1}{0.3010} \approx 3.32.

That is log⁡2(10)\log_{2}(10), and it lands between 33 and 44 exactly as the opening argument promised.

Now the deferred question from compound interest: how long to double? Money at 5%5\% compounded annually grows by the factor 1.051.05 each year, so after tt years the balance is P(1.05)tP(1.05)^{t}. Doubling means the balance reaches 2P2P, that is,

(1.05)t=2.(1.05)^{t} = 2.

The unknown tt sits in the exponent, so take the log of both sides and use the power law:

log⁡ ⁣((1.05)t)=log⁡(2)  ⇒  tlog⁡(1.05)=log⁡(2).\log\!\left((1.05)^{t}\right) = \log(2) \;\Rightarrow\; t\log(1.05) = \log(2).

Divide to free tt:

t=log⁡(2)log⁡(1.05)≈0.30100.0212≈14.2.t = \frac{\log(2)}{\log(1.05)} \approx \frac{0.3010}{0.0212} \approx 14.2.

Solving the equation gives a real number, t≈14.2t \approx 14.2, even though interest is only credited once a year. So the balance has not yet doubled after year 1414; the first completed year at or above double is year 1515. Either way, the logarithm found the exponent the compound interest lesson could set up but not finish.

You may take the logarithm in any base you like, as long as it is the same base on both sides. Using base 22 on 2x=102^x = 10 gives x=log⁡2(10)x = \log_{2}(10) in one step. Most calculators, however, carry only the log⁡\log (base 1010) and ln⁡\ln (base ee) buttons, so it is handy to use one of those. That same observation gives a way to compute a logarithm in any base from the buttons you have. Solving bx=yb^{x} = y by taking the common log of both sides gives xlog⁡(b)=log⁡(y)x\log(b) = \log(y), so x=log⁡(y)log⁡(b)x = \dfrac{\log(y)}{\log(b)}. Since x=log⁡b(y)x = \log_{b}(y), this is the change-of-base relationship,

log⁡b(y)=log⁡(y)log⁡(b),\log_{b}(y) = \frac{\log(y)}{\log(b)},

which lets you find, say, log⁡2(10)=log⁡(10)log⁡(2)≈10.3010≈3.32\log_{2}(10) = \dfrac{\log(10)}{\log(2)} \approx \dfrac{1}{0.3010} \approx 3.32 on any calculator.

Check your understanding

Which expression gives the exact solution of 3x=203^{x} = 20?

Answer choices

The graph of a logarithm

Since y=log⁡b(x)y = \log_{b}(x) is the inverse of y=bxy = b^{x}, its graph is not something new to plot point by point. By the graphs of inverse functions lesson, the graph of an inverse is the mirror image of the original across the line y=xy = x. Reflect the exponential curve across that diagonal and you have the logarithm.

The reflection swaps the coordinates of every point, so it turns each feature of the exponential into its mirror feature. Line them up:

Reflect the exponential, and read the logarithm off it

y = 2ˣ. y = log₂ x. Base 2 is greater than 1, so both curves rise. Reflecting across y = x sends (1, 2) on the exponential to (2, 1) on the logarithm. The exponential never reaches y = 0 and the logarithm never reaches x = 0, which is that same asymptote reflected. A coordinate plane carrying an exponential curve, its logarithm, and the dashed diagonal line y = x that reflects each onto the other. Use the control below the figure to change the base. y = 2ˣ y = log₂ x -2 2 4 6 8 -2 2 4 6 8
Base

y = 2ˣ. y = log₂ x. Base 2 is greater than 1, so both curves rise. Reflecting across y = x sends (1, 2) on the exponential to (2, 1) on the logarithm. The exponential never reaches y = 0 and the logarithm never reaches x = 0, which is that same asymptote reflected.

The exponential and its logarithm on one plane, either one the mirror image of the other across the dashed diagonal y = x. The two marked points are (1, b) and (b, 1), joined by a chord that crosses the diagonal at a right angle and is cut in half by it. Only the base can be changed, and changing it moves both curves at once.

Three settings of that base are worth visiting deliberately. Base 33 draws the curve the next worked example describes, so you can check your answer against the picture. Base 12\tfrac{1}{2} is the case the bullets above do not cover. A base below 11 makes the exponential fall, and reflecting a falling curve gives a falling curve, so the logarithm decreases instead of increasing. Everything else survives unchanged, because the reflection does not care which way the original ran. Even with a base below 11, the logarithm still passes through (1,0)(1, 0), still has the vertical asymptote x=0x = 0, and still accepts only positive inputs.

Base 11 is the setting where the logarithm vanishes from the figure entirely, and that is the definition being enforced rather than a fault in the drawing. Every power of 11 is 11, so y=1xy = 1^x is the flat line y=1y = 1. Reflect that line across y=xy = x and you get the vertical line x=1x = 1, but a vertical line fails the vertical-line test: it assigns more than one output to the same input, so it is not the graph of a function at all. Since y=1xy = 1^x sends every input to the same output, no rule can undo it, and its mirror image cannot be a logarithm. That is precisely what the condition b≠1b \ne 1 in the definition was written to exclude.

Worked example 4 Describe the graph of y=log⁡3xy = \log_{3} x

State the domain, range, and asymptote, then plot points on the curve, including one you find by working backward from a target height.

Because the base is 3>13 > 1, this is an increasing logarithm with the standard features. Its domain is x>0x > 0 (you cannot take the log of zero or a negative), its range is all real numbers, and it has the vertical asymptote x=0x = 0.

For points, pick inputs that are powers of 33, since their logs are whole numbers. Reading each off the definition,

log⁡3(1)=0,log⁡3(3)=1,log⁡3 ⁣(13)=−1.\log_{3}(1) = 0, \qquad \log_{3}(3) = 1, \qquad \log_{3}\!\left(\tfrac{1}{3}\right) = -1.

So the curve passes through (1,0)(1, 0), (3,1)(3, 1), and (13,−1)\left(\tfrac{1}{3}, -1\right). To find where the curve reaches height 22, ask which input has log⁡3(x)=2\log_{3}(x) = 2, that is, x=32=9x = 3^2 = 9, giving the point (9,2)(9, 2). Plot these and draw a curve that hugs the vertical axis on the left, crosses the horizontal axis at (1,0)(1, 0), and rises slowly to the right. It is the exact mirror of y=3xy = 3^x across y=xy = x.

Check your understanding

The graph of y=5xy = 5^{x} passes through (1,5)(1, 5). Which point must be on the reflected graph y=log⁡5(x)y = \log_{5}(x)?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

A good name tells you what a thing does. Logarithm appears to tell you nothing.

John Napier built the word out of two Greek pieces when he published his table in 1614. Arithmos means number. Logos, in the sense he wanted, means ratio. So a logarithm is a ratio number, which sounds like a description of a fraction and not of an exponent at all.

The name is exact, though, once you see what the table is. It pairs two runs of numbers. In the first run every entry is the one before it multiplied by a fixed factor, so the ratio between neighbors never changes. In the second run every entry is the one before it plus a fixed amount, so the difference between neighbors never changes. Each number in the first run has a permanent partner in the second. A fixed ratio above, matched against a fixed difference below: that pairing is the whole invention, and the name records it.

Everything else follows. Multiply two entries in the top run and you land on a third entry. Add their two partners underneath and you land directly below it. So a product on top has become a sum beneath, which is the product law you proved in this lesson. It is also the figure with 1,2,4,8,161, 2, 4, 8, 16 sitting over 0,1,2,3,40, 1, 2, 3, 4.