A Little About Logs

For some reason, which remains mysterious to me, all throughout high school math classes and the first year college math classes (at least in the U.S.), the natural logarithm (the log to the base e) is usually referred to as ln. The notation log is often used to mean the logarithm to the base 10.

But, once you begin to study math beyond first year calculus, log is always used to mean the natural logarithm. The logarithm to the base 10 is virtually never used. If you should, for some reason, want to use a logarithm to the base 10, then you specify the base as a subscript to log; that is log10. So, for example, log_10 10 = 1.

Note: If you need to review what a logarithm is and the basic properties of logs, click here.

This matters for three reasons. First, you need to know what I mean by log when I use the notation on this web site. When I use log I mean the natural logarith; that is log means log_e. (The subscript on the log here may be a bit hard to read, but it is the number e; that is log to the base e.)

Second, you need to know what notation is used by statistics programs or other calculation programs (such as Microsoft Excel) you are using so that you can use the correct function or command name. Most statistics and mathematical calculation programs use log to mean log_e. This is also the case for most computer programming languages such as C and C++.

But it is not true for what is probably the most widely used calculation program in the world: Excel. In Excel 2007, the natural logarithm is calculated using ln( ). If you use log( ) you will get the logarithm to the base 10. The function log10( ) also gives you the logarithm to the base 10.

Actually, in Excel 2007, the function log( ) takes two arguments: the number you want logged and the base. But if you leave out the second argument, it defaults to base 10. Thus, in Excel 2007, log( ) = log( ,10). If you wanted to use the Excel log function to calculate the natural log, you could do so with log( ,exp(1)) since exp(1) gives the number e.

The key point of all of this is that you better know what the software you are using is actually calculating. To be certain, it is best to run some tests (see below).

The third reason that you need to understand what is meant by the log notation is that you often will need to “undo” the log. That is, you will need to compute the inverse function of the log.

Specifically, if log means logarithm to the base e then Y=log(X) means that X=e^Y.

It is a very good idea to test the software you are using to make sure that you really know what log is doing. If log means the natural logarithm, then log(exp(1)) will give the answer 1. If it gives something else, the log is not the natural logarithm. Note: in all computer languages (that I know of), exp( ) means raise the number e to the power given by the argument. Thus, exp(1) = e = 2.718281828. You can, of course, check this as well.

In Excel 2007, log(exp(1)) = 0.434294482 so you know that log( ) is not giving you the natural logarithm.

Help with Logarithms

If you do not know about logarithms or need a review that more or less starts from scratch, the series of videos at www.khanacademy.org are good. Start with the introductory video at the following link: Introduction to Logarithms. At the upper right-hand side of the embedded video screen, you will see a link for the next video. The next 9 videos (through “Solving Logarithmic Equations”) give a pretty complete introduction to logarithms.

Here is another good introduction (non-video): Introduction to Exponents and Logarithms.

Questions or Comments?

Any questions or comments? Please feel free to comment below. I am always wanting to improve this material.

I have had to implement a very simple “captcha” field because of spam comments, so be a bit careful about that. Enter your answer as a number (not a word). Also, save your comment before you submit it in case you make a mistake. You can use cntrl-A and then cntrl-C to save a copy on the clipboard. Particularly if your comment is long, I would hate for you to lose it.

This entry was posted in Background and tagged , , . Bookmark the permalink.

One Response to A Little About Logs

  1. Kunal says:

    http://en.wikipedia.org/wiki/Natural_logarithm
    the link shows that Ln notation signifies Napier’s log, named after the eminent mathematician. I just thought I would contribute my two cents

Leave a Reply

Your email address will not be published. Required fields are marked *


ENTER answer below as a NUMBER.
CAREFUL! Error will delete your comment. Save it first (cntrl-A then cntrl-C saves to clipboard). *
Time limit is exhausted. Please reload the CAPTCHA.