Skip to content

Summary: Logarithms

April 25, 2013

Unlike the two most “friendly” arithmetic operations, addition and multiplication, exponentiation is not commutative. You will get a different result if you swap the value in the base with the one in the exponent (unless, of course, they are the same value):

3^2 \ne 2^3

The most significant impact of this lack of commutativity arises when you need to solve an equation that involves exponentiation: two different inverse functions are needed, one to undo the exponent (a root), and a different one to undo the base (a logarithm).

Just as there are many versions of the addition function (adding 2, adding 5, adding 7.23, etc.), and many versions of the “root” function (square roots, cube roots, etc.),  there are also many versions of the “logarithm” function. Each version has a “base”, which corresponds to the base of its inverse exponential expression.

Inverse Functions: Logarithms & Exponentials

Logarithms are labelled with a number that corresponds to the base of the exponential that they undo. For example, the symbols to the left of the equal sign below are read “log base b of b to the c”:


“Log base b” is the inverse function of “b to the…”, so the two cancel each other out, leaving behind the argument of the inside function… “c” in this case.  This same concept applies in more complex situations as well:


In each case, a function applied to its inverse leaves behind the argument (no matter how simple or complex it may be). It does not matter which inverse function is on the “outside”, if two inverse functions are “next” to each other with no other function or operation “in the way”, they cancel each other out. “Four to the…” is the inverse of “log base 4″, therefore:


Note that if the bases are not the same in both the logarithm and the exponential, then they are not inverse functions… just as adding adding four is not the inverse of subtracting three.

Inverse functions only cancel one another out when they are applied directly to one another, with nothing else “in the way”: when the result of the inner function is not modified in any way before being used as an input to the outer function. Examples of where functions that are inverses of one another do not cancel each other out include:

5^{(7+log_5(x))}\\*log_5(6\cdot 5^x)\\*log_5(2+5^x)

All of the examples above do something to the result of the inner (inverse) function before evaluating the outer function. In the first example, 7 is added to the result of the logarithm. In the second, the power of 5 is multiplied by 6. In the third, the power of 5 has a 2 added to it. Therefore, none of the above examples can be simplified using inverse function principles.

However, the Laws of Exponents or Logarithms will allow us to simplify the first two examples a bit, as you will see below. The last example above cannot be further simplified.

Logarithms Produce Exponents

The result of a logarithm is always an exponent… an exponent of the logarithm’s base. So, logarithms answer questions such as “what exponent of 2 produces a result of 16?”:


Evaluating a logarithm always produces a power of the logarithm’s base.

The two equivalent equations below are often referred to as the definition of a logarithm. The first equation shows that “c” is the result of a logarithm, therefore if used as a power of the logarithm’s base “b“, you will get back to “a“… which was your starting point:

log_b(a)=c~~~ means~that\\*a=b^c

Alternatively, you can take “log base b” of both sides of the second equation, simplify the right side by canceling out inverse functions, and you will end up with the first equation:


Common and Natural Logarithms

Two bases, 10 and e, are used so frequently with logarithms that they have their own notation:


Since our number system uses ten digits, and each digit in a multi-digit number represents a different power of 10, for example:

123 = 1\cdot 10^2+2\cdot 10^1+3\cdot 10^0

it makes sense that we would be interested in powers of 10 more so than other bases. This greater interest has led to a slightly shorter notation for what are called “Common Logarithms”, or “log base 10″, as shown above. If no base is indicated for a logarithm, it is assumed to be base 10, or a Common Logarithm.

Another common base for logarithms is “e“, a number you may not have encountered before. “e” is an irrational number (its decimal representation never terminates or repeats), which explains why it, like “pi”, is usually referred to by name. “e” arises when modeling situations where growth occurs continuously, for example when an initial population of 100 grows continuously at 2%:

y=100\cdot e^{0.02t}

If you need to solve such an equation for “t”, the easiest way to do so is by using the inverse function of “e to the…” , which is log base e. This function is referred to as a “Natural Logarithm”, or when using function notation by writing “ln”:

\frac{y}{100}=e^{0.02t}\\*ln\left(\frac{y}{100}\right)=ln(e^{0.02t})\\*ln\left(\frac{y}{100}\right)=0.02t\\*ln\left(\frac{y}{100}\right)\div 0.02=t

Without logarithms, we could not get the “t” out of the exponent in the example above to solve for it.

Laws of Logarithms

Since the result of a logarithm is an exponent, it should come as no surprise that three of the Laws of Logarithms mirror the Laws of Exponents. To derive them, let us work with two real numbers expressed as a power of a base. Any base will do, but since we work with numbers that are powers of 10 the most in our daily lives, base 10 has been used below. This also allows us to use Common Logarithms in the derivation, so that we don’t need to indicate a “base 10″ below each logarithm.

Any real number can be represented as a power of ten. For example:


Let’s use this idea to express a number “A” as a power of ten, as shown in equation (1) below. Take Log base 10 of both sides of this equation, simplify, and the resulting equation (2) is mathematically equivalent to equation (1), but has been solved for “a“, the power of ten:


Since two quantities are needed to explain the Laws of Logarithms, we’ll define a second value in the same way:


These two definitions can now be used to derive the following “laws”:

1) The logarithm of a product equals the sum of the logarithms of the factors:

log(A\cdot B)\\*=log(10^a \cdot 10^b)~~~~~~~~~Substituting~(1)~and~(3)~from~above\\*=log(10^{a+b})~~~~~~~~~~~~~Laws~of~exponents\\*=a+b~~~~~~~~~~~~~~~~~~~~Inverse~functions~cancel\\*=log(A)+log(B)~~~~~Substituting~(2)~and~(4)~from~above\\*\therefore \mathbf{log(A\cdot B)=log(A)+log(B)}

As you will hopefully recall from the Laws of Exponents, when like bases are being multiplied we add the exponents. This is exactly the process that this property of logarithms describes.  The first line requires us to calculate the Common Logarithm, or power of ten, of the product AB. We know by the laws of exponents that this exponent must be the sum of a (A’s power of ten) and b (B’s power of ten), which is the same thing as the sum of log(A) and log(B).

Note that this identity is used just as often from left-to-right as it is from right-to-left.  You are welcome to convert a sum of logarithms (with the same base) into the logarithm of a product, or the logarithm of a product into a sum of logarithms. So, don’t think of this identity as a one-way-street… it is frequently used in either direction.

2) The logarithm of a quotient equals the logarithm of the numerator less the logarithm of the denominator:

log\left(\dfrac{A}{B}\right)\\*=log\left(\dfrac{10^a}{10^b}\right)~~~~~~~~~~~~Substituting~(1)~and~(3)\\*=log(10^{a-b})~~~~~~~~~~~~~Laws~of~exponents\\*=a-b~~~~~~~~~~~~~~~~~~~~Inverse~functions~cancel\\*=log(A)-log(B)~~~~~Substituting~(2)~and~(4)\\*\therefore \mathbf{log\left(\dfrac{A}{B}\right)=log(A)-log(B)}

Once again, from the Laws of Exponents, when like bases are divided we subtract the exponents. This identity mirrors that law of exponents in the same way as the previous one, and is also used in either direction… so keep an eye out for expressions that look like either side of the last line above.  Sometimes you will prefer to have things expressed as the logarithm of a quotient, and other times you will prefer to express things as a difference of logarithms.

3) The logarithm of an exponential equals the exponent times the logarithm of the base:

log(B^c)\\*=log([10^b]^c)~~~~Substituting~(3)\\*=log(10^{bc})~~~~~~Laws~of~exponents\\*=bc~~~~~~~~~~~~~~~Inverse~functions~cancel\\*=log(B)\cdot c~~~~~Substituting~(4)\\*=c\cdot log(B)\\*\therefore \mathbf{log(B^c)=c\cdot log(B)}

This is very handy for both a) getting a coefficient that is in front of a logarithm “out of the way” so that an inverse function may be used, or b) getting the expression in an exponent out of the exponent, and down where we can work with it more easily. Once again, this identity is often used in either direction.

4) And lastly, the base change formula. This formula allows the value of a logarithm with any base to be calculated using logarithms with a different base. The formula is usually used to convert logarithms into base 10 or base e, both of which are found on many calculators (as well as in tables of logarithms at the back of textbooks).

(5)~~~b^c=a\\*~\\*~~~~~~~~log_b(b^c)=log_b(a)~~~~~~~Taking~the~log_b~of~both~sides~of~(5)\\*(6)~~~c=log_b(a)\\*~\\*~~~~~~~~log_x(b^c)=log_x(a)~~~~~~Taking~the~log_x~of~both~sides~of~(5)\\*~~~~~~~~c\cdot log_x(b)=log_x(a)\\*(7)~~~c=\dfrac{log_x(a)}{log_x(b)}\\*~\\*~~~~~~\therefore \mathbf{log_b(a)=\dfrac{log_x(a)}{log_x(b)}}~~~~~Substituting~(6)~into~(7)

The result on the last line above is called the base change formula, as it allows a logarithm base “b” to be converted into a ratio of logarithms in any base you choose… labelled “x” above. Note that this derivation uses Law #3 from above.

Using the Laws of Logarithms

Returning to a couple of examples shown above, let’s use the Laws of Logarithms to change the way they look a bit.  The first example was:

5^{(7+log_5(x))}\\*=5^7 \cdot 5^{log_5(x)}~~~Laws~of~exponents\\*=5^7 \cdot x~~~~~~~~~Inverse~functions~cancel

And the second example was:

log_5(6\cdot 5^x)\\*=log_5(6)+log_5(5^x)~~~Laws~of~Logarithms\\*=log_5(6)+x~~~~~~~~~~~Inverse~functions~cancel\\*=\dfrac{log(6)}{log(5)}+x~~~~~~~~~~~Base~change~formula

Be careful!  The following do not follow a pattern found in any of the first three laws of logarithms, therefore they cannot be manipulated in any way using those laws. The only actions you could take on them would be to evaluate them (if you know the value of “a” and “b”), or use the base change formula to rewrite in terms of logarithms with a different base:


Why Logarithms?

Logarithms have many uses, some of which appear in the media regularly, and some of which are more special-purpose. In addition to their usefulness in mathematics (as the inverse function of an exponential, which allows us to solve for a variable in the exponent), logarithms are often used to make it easier to think about and compare values in situations that involve numbers that span a very large range.  By talking about values as exponents of a base, usually base 10, it is easier to work with both tiny numbers and huge ones. For example, consider the following four values.  Their decimal representations require a range of five places to the right of the decimal to 10 places to the left of the decimal:


yet by taking the logarithm of each value, and referring to each value by its power of ten, we can use a much smaller number of digits (one in this example), with a much smaller range (negative four to nine in this case), which can make working with quantities that span such a large range much simpler.

Graphing data with a large range

Logarithms are often used when graphing data about something that is growing.  By either graphing the logarithm of the data on the vertical axis, or graphing the raw data on “semi-log” graph paper (which has a linearly scaled horizontal axis, and a logarithmic vertical axis), you can easily tell if the data reflects a constant growth rate or not.

A constant growth rate produces a curve that rises faster and faster as you move to the right when graphed on “normal” graph paper, but will produce a graph with a constant slope when plotted using semi-log graph paper.  This is very useful when looking at multiple years of sales or earnings data from growing companies, as you can instantly see if the company’s growth is accelerating (the slope of the graph becomes greater), remaining constant (the slope is constant), or slowing (the slope of the graph becomes smaller).

A good example of using a graph on semi-log paper to analyze changes in growth rates can be found in this 2009 swine flu graph from Wikipedia:

The “Total” (blue points above the other curves) shows a very fast and relatively constant initial growth rate through early to mid-May (we can infer this from the fact that the graph is almost linear during this period), followed by a transition to a slower but also relatively constant long term growth rate through the end of June.  Notice that each value along the vertical axis is double the previous one, even though the axis tick marks are all the same distance apart. This is a semi-log (base 2) graph, because the distances from the origin on the vertical axis are proportional to the “Log base 2″ of the number of cases.

Other quantities in our world and universe for which this approach is useful include:

The Richter scale

The Richter scale is used to measure earthquake strengths. Seismographs measure the amplitude (size or strength) of waves that travel through the earth from the site of an earthquake to the measuring station. The Richter scale is based on the logarithm of  the measured wave amplitude, so a Richter Scale measurement is a power of 10. An earthquake of magnitude 3 is ten times more powerful than one of magnitude 2 (a micro-earthquake that is not able to be felt).

The chart below shows the magnitude reported by the U.S. Geological Survey for the more significant earthquakes around the earth over a 24 hour period. The most intense earthquake on that day measured a 6.6 on the Richter scale, while the least intense one measured 2.5.  Since these numbers are the result of logarithms, they are exponents – so their difference (4.1) tells us the exponent of the ratio of the original values.  The strongest earthquake that day was 10^{4.1}=12,589 times more powerful than the weakest one.

Earthquakes 2013-04-14


The strength of a signal or sound is usually measured in decibels, which is calculated by dividing the signal’s strength by a standard reference level, taking the logarithm of the result, then multiplying that by 10. Therefore, a decibel measurement is ten times an exponent of ten. To interpret the meaning of a 20 dB measurement, divide it by ten and use that result as a power of ten


which tells you that the measured signal is one hundred times stronger than a 0 dB signal. A 30 dB signal is


one thousand times stronger than a 0 dB signal.


The quantity of hydrogen ion activity determines how a solution reacts with many elements. A solution with a large quantity of active hydrogen ions is called “acidic”, and a solution with relatively few active hydrogen ions is called “basic”. pH is a measure of how acidic or basic a solution is, and is calculated by taking the logarithm of the reciprocal of the hydrogen ion activity in a solution. Therefore, a higher level of hydrogen ion activity will result in a a lower pH value. A pH value of 7 is considered neutral (neither acidic nor basic), so a solution with a pH of 5 would have


one hundred times as many active hydrogen ions as a neutral solution. A solution with a pH of 10 would have


one thousandth as many active hydrogen ions as a neutral solution.


The higher pitched of two musical notes that we perceive to be an octave apart has a frequency that is double that of the lower pitch. Therefore the formula for converting a sound frequency to a pitch uses log_2 to convert a frequency into a “number of doublings”. The number of doublings (relative to a standard pitch) tells us how many octaves (and fractions of an octave) apart the sounds are. Comparing the pitch of a 3,520 Hz tone with a 440 Hz tone, we can determine that they are


exactly three octaves apart.

Multiplication, Division, and Powers

If you do not have a calculator handy, but do have a table of logarithms handy (something that used to be true more often than it is today), you can use the table to speed up the process of manually calculating products, quotients, or powers. By converting the relevant numbers into powers of ten, you can then use the laws of exponents to add, subtract, or multiply the exponents to arrive at the exponent of the answer:

(123,000)( 917,000)\\*=(1.23)(10^5)(9.17)(10^5)\\*=(1.23)(9.17)(10^{10})~~~~~~~~Laws~of~Exponents\\*=10^{log(1.23 \cdot 9.17)} \cdot 10^{10}~~~~~~~~Inverse~functions\\*=10^{log(1.23)+log(9.17)} \cdot 10^{10}~~~Laws~of~Logarithms\\*=10^{0.0899051+0.9623693} \cdot 10^{10}\\*=10^{1.0522744} \cdot 10^{10}

The last step is to look up exponent of ten in the body of the table of logarithms to convert it back into the answer to the original problem. Since the two numbers I started with had three significant digits each, I rounded the answer to 6 significant digits:

10^{1.0522744} \cdot 10^{10}\\*=10^{0.0522744} \cdot 10^{11}\\*=1.12791\cdot 10^{11}\\*=112,791,000,000

A similar process, which also relies on the laws of exponents, can be used to raise a number to a power:

3.1416^6\\*=10^{log(3.1416^6)}\\*=10^{6 \cdot log(3.1416)}~~~Laws~of~Logarithms\\*=10^{6 \cdot 0.49715}~~~~~~Using~table~of~logarithms\\*=10^{2.9829}\\*=10^2 \cdot 10^{0.9829}\\*=100 \cdot 9.6139~~~Using~table~of~logarithms~in~reverse\\*=961.39

While the examples above may seem lengthy, with a little practice the process becomes a faster process than doing the calculation by hand. However… today’s calculators and computers are faster yet.


The result of a logarithm is an exponent… an exponent of the logarithm’s base.

Logarithms make it easier to read comparable percentage changes for both very large and very small numbers on the same graph by converting them to powers of a common base.

Logarithms allow us to isolate a variable that is in the exponent of an exponential expression. Roots allow us to solve for a variable that is in the base of an exponential expression.

The laws of logarithms, like the laws of exponents, provide us with ways to manipulate the appearance of certain expressions or equations without affecting the quantities or relationships that they represent. They are another useful tool in our Algebraic toolbox, particularly when working with exponential expressions or equations.

For a slightly different approach to introducing logarithms, with additional useful or interesting information, check out “It’s the law too – the Laws of Logarithms“.

About these ads
4 Comments leave one →
  1. April 27, 2013 3:11 pm

    This is a great lesson in logarithms! You have explained so many aspects of them in a single post, making this a great page to bookmark and come back to for reference. Thanks for taking the time to put something of this scale together!


  1. Summary: Roots and Rational Exponents | Learning and Teaching Math
  2. Math Teachers at Play #62 | Let's Play Math!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: