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

In Exponential Functions, we accepted the extension of 2x2^x to a curve with no gaps. As xx moves from 33 to 44, the output moves from 88 to 1616, so it must pass through 1010. Thus 2x=102^x=10 has a solution. The curve is also one-to-one: it never repeats an output, so the solution is unique. Existence and uniqueness are different facts. Together they let us reverse the exponential and ask for the exponent belonging to each positive output.

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.

These are two ways to record the same fact. The exponential form bx=yb^x=y starts with an exponent and gives a result. The logarithmic form log⁡b(y)=x\log_b(y)=x starts with that result and reports the exponent. Read log⁡b(y)\log_b(y) as the exponent that turns bb into yy.

For our opening puzzle, 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 approximate as 3.323.32 once we have the tools.

The rules later in this lesson are proved by switching between these two forms, so practice reading the same fact both ways:

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 allowed 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 exponential and its logarithm undo each other. For b>0b>0 with b≠1b\ne1:

blog⁡b(y)=y(y>0),log⁡b(bx)=x(x real).\begin{aligned} b^{\log_b(y)}&=y &&(y>0),\\ \log_b(b^x)&=x &&(x\text{ real}). \end{aligned}

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 gives 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.

These undoing identities say that the logarithm and exponential are inverse functions, as in Inverse Functions Advanced. This lesson goes beyond core Algebra I. You can skip it..

Check your understanding

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

Answer choices

The inputs to a logarithm must be outputs that the exponential can produce. Since bxb^x takes exactly the positive values, the logarithm has domain y>0y>0. No real exponent on a positive base produces zero or a negative number, so their real logarithms are undefined.

For a base b>1b > 1, as the input shrinks toward 00, the exponent needed to reach it runs off toward −∞-\infty. So the graph of such a logarithm, which you will see later, dives down along the vertical axis. You can take the logarithm of a tiny positive number, but not of zero or of a negative number.

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 limiting one-year factor at a 100%100\% rate. 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

The logarithm laws follow from exponent rules. First check three examples with base 22:

Multiplication became addition, division became subtraction, and a power became multiplication. The figure shows the repeated-doubling pattern. Then we prove all three laws for any allowed base.

Doubling values and adding logarithmsFive paired ticks. The top values double at each equal step. The bottom logarithms increase by one.values: multiply by 2base-2 logs: add 110×2+121×2+142×2+183×2+1164
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, take b>0b>0 with b≠1b\ne1, positive numbers M,NM,N, and any real power kk. Name the 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#

First write two numbers as powers of 33:

9⋅27=32⋅33=32+3=35.9\cdot27=3^2\cdot3^3=3^{2+3}=3^5.

Reading back as logarithms gives log⁡3(9⋅27)=5=2+3\log_3(9\cdot27)=5=2+3. The two input logarithms are 22 and 33, so multiplying their inputs added those exponents. The same steps work for any allowed base and positive inputs, using their logarithms as exponents.

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).\begin{aligned} \log_{b}(MN)&=m+n\\ &=\log_{b}(M)+\log_{b}(N). \end{aligned}

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

For numbers first,

279=3332=33−2=31.\frac{27}{9}=\frac{3^3}{3^2}=3^{3-2}=3^1.

Reading back gives log⁡3(27/9)=1=3−2\log_3(27/9)=1=3-2: dividing the inputs subtracted their exponents. The same exponent subtraction works for any allowed base and positive inputs.

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).\begin{aligned} \log_{b}\!\left(\frac{M}{N}\right)&=m-n\\ &=\log_{b}(M)-\log_{b}(N). \end{aligned}

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

Start with 9=329=3^2 and cube both sides:

93=(32)3=32⋅3=36.9^3=(3^2)^3=3^{2\cdot3}=3^6.

Reading back gives log⁡3(93)=6=3⋅2\log_3(9^3)=6=3\cdot2: cubing the input multiplied its logarithm by 33. The same power-of-a-power rule works for any allowed base, positive input, and real power kk.

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).

These laws explain why logarithm tables were useful before calculators. To multiply two positive numbers, people could look up their logarithms, add, then look up the number with that resulting log. The next example uses that same idea with supplied values.

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 use the laws. 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).\begin{aligned} \log_b(12)&=\log_b(2^2\cdot3)\\ &=\log_b(2^2)+\log_b(3)\\ &=2\log_b(2)+\log_b(3). \end{aligned}

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.

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

To solve 2x=102^x=10, take logarithms of both positive sides. The power law turns the unknown exponent into a coefficient, where ordinary division can isolate 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, as the opening section showed it must.

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. The real solution describes the exponential curve between year ends.

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)}.

The denominator is nonzero because b≠1b\ne1 gives log⁡(b)≠0\log(b)\ne0. This 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.

For b > 0 and b ≠ 1, the exponential and its logarithm are mirror images across the dashed diagonal y = x. When the marked pair is visible, the points (1, b) and (b, 1) are joined by a chord that crosses the diagonal at a right angle and is cut in half by it. Changing the base moves both curves. At b = 1, the exponential is constant and has no logarithmic inverse.

Try three base settings:

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)

John Napier published his first logarithm tables in 1614, after years of work on ways to simplify long calculations. Astronomers, navigators, and surveyors needed to multiply and divide difficult numbers by hand. A table that replaced those jobs with adding and subtracting could save substantial work.

Napier formed logarithm from Greek words for ratio and number. The name connects a multiplying pattern with an adding pattern. Our modern base-22 example shows the idea clearly: the numbers 1,2,4,8,161,2,4,8,16 have logarithms 0,1,2,3,40,1,2,3,4. A fixed ratio in the first row matches a fixed difference in the second. For example, 2⋅4=82\cdot4=8 corresponds to 1+2=31+2=3.

Those rows illustrate modern logarithms; they are not literal entries from Napier’s original table, whose normalization differed from today’s common logs.

Source: National Museums Scotland, Napier’s logarithms.

Your progress

See all your progress →