In the previous section, we learned that for , is always a positive number. Except for , the function is either increasing or decreasing, and thus is one-to-one. Therefore, for any given , there is one and only one value of that satisfies (Figure 1). This value of is called the “logarithm of y to (or in or with) the base b” or simply “log, base b, of y” and we write
Thus, by definition
For example,
(a)
(b)
Figure 1: Exponential functions are one-to-one; there exists exactly one value of satisfying for a given .
Equation (a) defines as a function of :
where b is a fixed positive number different from 1. Because we must have , the domain of this function is , and because can be any real number, the range of this function is .
In Equation (c), and are two variables simply denoting the input and output of the function. So we can simply show the input by (instead of ) and the output by (instead of ) as we usually do, and write the logarithmic function as
Equation (b) implies that the logarithmic function and exponential function are the inverse of each other. If we substitute for in , we obtain
This equation holds for all . If we substitute for in , then we obtain
This equation holds for all . The cancelation property of inverse functions (Theorem 1 of Section 2.16) read
As the logarithmic function and the exponential function are inverse functions, the domain of each of them is the range of the other and vice versa.
Let and then
The best way to remember the above relations is through remembering the graphs of these functions. We learned how the exponential function looks like. Therefore, by its reflection in the line , we can easily sketch the graph of the logarithmic functions (Figure 2).
(a)
(b)
Figure 2: Graphs of and are reflections of one another in the line . The graph of an exponential function passes through and that of a logarithmic function passes through
Because , we have . Therefore, the graph of passes through as we can see in Figure 2.
Important Properties of Logarithms
Logarithmic functions have very important properties that make them very useful:
Theorem 1 (Algebraic Properties of Logarithms): Let and be any real number
(1) the log of a product is the sum of the logs of the factors
(2) the log brings the exponent down to the front of the log
(3) the log of a quotient is the log of the numerator minus the log of the denominator
These properties can be deduced from the properties of the exponential functions.
(1) Let
which means
Therefore
(2) If is a positive integer, then this is a direct result of Property 1. For example, suppose , then
To prove (2) in general, let
then
Therefore
(3) Because we can write
it follows from Properties 1 and 2 that
Common and Natural Logarithms
Theoretically, any positive number, except 1, may be used as the base of a system of logarithms. Practically there are only two numbers so used: the base-10 logarithm and the base- logarithm where is Euler’s number. The base-10 logarithm is more “common” in algebraic settings, trigonometry, and in special kinds of graphs where one or two axes are plotted on logarithmic scales, but as we will see the base- logarithm is more important in calculus.
The 10-base logarithm is called the common logarithm and the base- logarithm is called the natural logarithm.
The common and natural logarithms are so common that they have their own shortened notations:
is written as (by omitting the base)
is written as
In many computing packages such as MATLAB, Mathematica, and in many computer languages such as Python, C++, and Fortran, “log” simply means the natural logarithm or “ln.” But in calculus “log” often denotes the base-10 logarithm.
Because in computer science, we work with binary numbers, the base-2
logarithms are very common.
Change of Base Formula
Many calculators have special keys for the natural and common logarithms (Figure 3), and now the question is: how to calculate the logarithms with base other than 10 or . For example, let it be required to find . If
then, by definition it means
By Property 2, we have
or
In general
Theorem 2 (Change of base formula): For any positive number (, we have
Figure 3: The logarithm keys (LOG for base-10 and LN for base-e) on a typical scientific calculator