✖

Logarithmic functions

The logarithmic function is the inverse function of the exponential function.

What a logarithm is

We write the logarithmic function with the word log; if it is the natural logarithm (see below), we write ln. The basic form of a logarithmic function looks like this:

y=loga⁡x

We read this as “the logarithm of x to the base a”. This logarithmic function is the inverse of the exponential function f(x) = ax. The value of a logarithmic function is called the logarithm.

Since the logarithmic function is the inverse of the exponential function, the following equivalence must hold:

y=loga⁡x⇔ay=x

So if ay is equal to x, then the logarithm of x to the base a is y. Let’s try a few examples. Take the exponential function f(x) = 2x. What would the inverse (logarithmic) function look like? Like this: f−1(x) = log2x. If we substitute 3 into the exponential function, we get f(3) = 23 = 8.

What relationship must hold now? If we put 8 into the inverse function f−1, the logarithmic function must give us back 3. That is because the number 3 was the input of the exponential function and the number 8 was the result. The inverse function behaves the other way round: the input is 8 and the output is 3. You can check that this is true on your calculator.

So if we write 23 = 8, the inverse logarithmic function gives us the relationship log28 = 3. So what is a logarithm? A logarithm is the power to which we must raise the base to get the number x.

Important logarithmic functions

Some logarithmic functions are particularly important. One of them is the “natural logarithm”, which has as its base Euler’s number. We denote it by the letter e. It is an irrational number, that is, a number with an infinite non-recurring decimal expansion. Its approximate value is e = 2.718 281,828…. We write the natural logarithm either as logex or, more simply, as ln x. The “n” comes from the Latin “logarithmus naturalis”, and the English “natural” makes it easy to remember.

Another important logarithm is the logarithm to base 10, that is, the logarithmic function with base ten. We usually write it either as log10x or just log x. If no base is given for a logarithm, base 10 is assumed: log means log₁₀.

Properties of the logarithmic function

As we already know, the logarithmic function is the inverse of the exponential function. Because of this it also takes over some of its properties and restrictions. We know that the exponential function has the form f(x) = ax, where a is a real number greater than zero and not equal to 1. Because of this, the base a of a logarithm must also be greater than zero and not equal to 1. So once more, the logarithmic function:

y=loga⁡x,a∈R,a>0,a≠1

Since this is an inverse function, we already know its domain and range. The domain of the logarithmic function is the same as the range of the exponential function, so the domain of the logarithmic function is (0, ∞). The range of the logarithm is then the same as the domain of the exponential function, that is, the set of all real numbers.

Graphs of logarithmic functions

Just as with the exponential function, we have to distinguish two cases: when the base a is in the interval (0, 1) and when it is in the interval (1, ∞). In the first case, that is, when a is in the interval (0, 1), the graph looks like this:

Graph of the logarithmic function \log_{\frac12}x

When the base a is in the interval (1, ∞), the graph looks like this:

Graph of the logarithmic function \log_ex

Have a look, too, at the graph of the exponential function and its inverse logarithmic function in one graph (the logarithm is blue, the exponential function is red):

Graph of the functions y=e^x and y=\log_ex – the curves are symmetrical about the line y = x (the grey dashed line)

Why the graphs pass through the point (1, 0)

Both graphs cross the x-axis at x = 1. That makes sense, because every exponential function passes through the point (0, 1). Since the logarithm is an inverse function, this function must always pass through the point (1, 0). There is a logic to it. If the graph passes through the point (1, 0), it means that for the input x = 1 the output is f(x) = 0.

For logarithms, this means we are looking for the power to which we must raise the base to get 1. What is that power? Only zero. Anything to the power zero is 1, so whatever the base is, the logarithmic function will pass through the point (1, 0). (Note: don’t forget that the base cannot be just anything: a>0 and a ≠ 1.)

Laws of logarithms

Here are some important relationships and formulae that hold for logarithms:

Assume that the base a really is the base of a logarithm, that is, a>0, a ≠ 1. Let x1 and x2 be any positive real numbers. Then:

loga⁡(x1⋅x2)=loga⁡x1+loga⁡x2loga⁡(x1x2)=loga⁡x1−loga⁡x2loga⁡xr=r⋅loga⁡x∀r∈Rloga⁡xn=1nloga⁡x∀n∈Z+

Some relationships that follow directly from the definition of a logarithm:

loga⁡1=0(a0=1)loga⁡a=1(a1=a)aloga⁡x=loga⁡ax=x

How to express one logarithm using the natural logarithm

Sometimes, on a calculator for example, we don’t have a logarithm to an arbitrary base, only the natural logarithm and the logarithm to base 10. What can you do if you need to work out a logarithm to a different base? There is a formula that helps. It says that:

loga⁡x=logb⁡xlogb⁡a

If we choose Euler’s number as the value of b, we get the formula:

loga⁡x=ln⁡xln⁡a

At the start we needed to work out the logarithm of 8 to the base 2. Using the natural logarithm we can work it out like this:

log2⁡8=ln⁡8ln⁡2=3

Again, you can check the calculation on your calculator. But you don’t have to use the natural logarithm; you can just as well use the logarithm to base 10, as the formula allows. So it is equally true that:

log2⁡8=log⁡8log⁡2=3

(Don’t forget that if no base is given, the base a = 10 is assumed.)

Calculator

If you need to work out a logarithm, you can use our logarithm calculator 🧮.