This site is a work in progress. New lessons are added regularly. Contact us

Introduction to Logarithms

Learning goals

  • Read logb(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. In the exponential functions lesson you saw that f(x)=2xf(x) = 2^x is one-to-one: strictly increasing, so it hits each positive output for exactly one input. That single fact guarantees there is one and only one real number xx with 2x=102^x = 10. The number is real, it is unique, and until now it has had no symbol. We give it one.

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

logb(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 logb(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 logb(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=log2(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} = 8log2(8)=3\log_{2}(8) = 3
102=10010^{2} = 100log10(100)=2\log_{10}(100) = 2
50=15^{0} = 1log5(1)=0\log_{5}(1) = 0
24=1162^{-4} = \tfrac{1}{16}log2 ⁣(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.

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

log2(32)=5.\log_{2}(32) = 5.

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

log10(1000)=3.\log_{10}(1000) = 3.

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

log7(1)=0.\log_{7}(1) = 0.

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

log3(3)=1.\log_{3}(3) = 1.

log2 ⁣(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 24=124=1162^{-4} = \tfrac{1}{2^4} = \tfrac{1}{16}, so

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

Two patterns are worth keeping from this: logb(1)=0\log_{b}(1) = 0 for every base (since b0=1b^0 = 1), and logb(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 log2(18)\log_{2}\left(\tfrac{1}{8}\right)?

Answer choices

The logarithm undoes the exponential

The definition was built to make logb\log_{b} reverse bxb^x, so putting the two together in either order returns you to where you started. These are the inverse-composition statements from the inverse functions lesson, written for f(x)=bxf(x) = b^x and f1(x)=logb(x)f^{-1}(x) = \log_{b}(x):

blogb(y)=y(for y>0),logb(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 blogb(y)b^{\log_{b}(y)}, the exponent logb(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 logb(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. The exponential and the logarithm are a matched pair of undo buttons.

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 logb(0)\log_{b}(0) and the logarithm of any negative number are undefined, and the domain of logb\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.

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 log10(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 e2.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 loge\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.

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. Throughout, fix a base bb and two positive numbers MM and NN, and name their logarithms

m=logb(M),n=logb(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 logb(MN)=logbM+logbN\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, bmbn=bm+nb^{m} \cdot b^{n} = b^{m+n}, from the exponential functions lesson:

MN=bmbn=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 logb(MN)\log_{b}(MN) means. Therefore

logb(MN)=m+n=logb(M)+logb(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 logb(M/N)=logbMlogbN\log_{b}(M/N) = \log_{b} M - \log_{b} N#

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

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

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

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

Dividing the inputs subtracted their logarithms.

Why logb(Mk)=klogbM\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

logb(Mk)=mk=klogb(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.

Check each law once on numbers you can verify. With base 22, the product law gives log2(84)=log2(8)+log2(4)=3+2=5\log_{2}(8 \cdot 4) = \log_{2}(8) + \log_{2}(4) = 3 + 2 = 5, and indeed 84=32=258 \cdot 4 = 32 = 2^5. The power law gives log2(82)=2log2(8)=23=6\log_{2}(8^{2}) = 2\log_{2}(8) = 2 \cdot 3 = 6, and indeed 82=64=268^2 = 64 = 2^6.

Step back and notice the pattern across all three. A logarithm converts multiplication into addition, division into subtraction, and a power into 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. The figure below shows the idea in miniature.

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.

Worked example 2 Combine known logarithms with the laws

Suppose you are told that logb(2)=0.30\log_{b}(2) = 0.30 and logb(3)=0.48\log_{b}(3) = 0.48 for some base bb. Find logb(12)\log_{b}(12) without knowing bb.

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

12=43=223.12 = 4 \cdot 3 = 2^{2} \cdot 3.

Now take logb\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:

logb(12)=logb(223)=logb(22)+logb(3)=2logb(2)+logb(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 given values:

logb(12)=2(0.30)+0.48=0.60+0.48=1.08.\log_{b}(12) = 2(0.30) + 0.48 = 0.60 + 0.48 = 1.08.

Two small 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 log5(50)log5(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.30103.32.x\log(2) = 1 \;\Rightarrow\; x = \frac{1}{\log(2)} = \frac{1}{0.3010} \approx 3.32.

That is log2(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.021214.2.t = \frac{\log(2)}{\log(1.05)} = \frac{0.3010}{0.0212} \approx 14.2.

At 5%5\% compounded annually, the money doubles in a little over 1414 years, a question the compound interest lesson could set up but not finish. The logarithm finished it.

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=log2(10)x = \log_{2}(10) in one step. 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=logb(y)x = \log_{b}(y), this is the change-of-base relationship,

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

which lets you find, say, log2(10)=log(10)log(2)=10.30103.32\log_{2}(10) = \dfrac{\log(10)}{\log(2)} = \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=logb(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. It sends every input to a single height, so no rule can undo it, and there is nothing to reflect. That is precisely what the condition b1b \ne 1 in the definition was written to exclude.

Worked example 4 Describe the graph of y=log3xy = \log_{3} x

State the domain, range, and asymptote, and plot three points.

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,

log3(1)=0,log3(3)=1,log3 ⁣(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 log3(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.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

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

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions 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 neighbours never changes. In the second run every entry is the one before it plus a fixed amount, so the difference between neighbours 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.