# Logarithm-- Inverse of an Exponential Function

## Key Questions

• Definition

${\log}_{b} x = y$ if and only if ${b}^{y} = x$

Logarithmic functions are the inverse of the exponential functions with the same bases.

Example

If you wan to find the value of

log_2 8=?,

then convert the question in terms of exponential function

2^{?}=8=2^3 => ?=3.

Hence, ${\log}_{2} 8 = 3$.

I hope that this was helpful.

See explanation, where I show how to find ${\log}_{2} \left(7\right) \approx 2.8$

#### Explanation:

Since you were not specific as to what base of logarithm you wanted, I will take the liberty of showing you how to calculate logarithms base 2 in binary. They are perhaps the easiest to do by hand. Elsewhere I have shown a method to calculate common (base $10$) logarithms, but that involves a lot of raising numbers to the $10$th power so is rather tedious.

Let us calculate ${\log}_{2} 7$.

From now on express numbers in binary...

We want to calculate ${\log}_{{10}_{2}} {111}_{2}$

${10}_{2}^{{10}_{2}} = {100}_{2} < {111}_{2} < {1000}_{2} = {10}_{2}^{{11}_{2}}$

So the digits before the binary point are $\textcolor{b l u e}{10}$

Next divide ${111}_{2}$ by ${10}_{2}^{{10}_{2}} = {100}_{2}$ to get ${1.11}_{2}$

Square ${1.11}_{2}$ to get ${11.0001}_{2}$

Since this is greater than ${10}_{2}$, the first digit after the binary point is $\textcolor{b l u e}{1}$

Divide by ${10}_{2}$ to get ${1.10001}_{2}$

Square ${1.10001}_{2}$ to get ${10.0101100001}_{2}$

Since this is greater than ${10}_{2}$, the second digit after the binary point is $\textcolor{b l u e}{1}$

Divide by ${10}_{2}$ to get ${1.00101100001}_{2}$

Square ${1.00101100001}_{2}$ to get ${1.0101111111011011000001}_{2}$

Since this is less than ${10}_{2}$, the third digit after the binary point is $\textcolor{b l u e}{0}$

Square ${1.0101111111011011000001}_{2}$ to get ${1.11100011100110100101000001010111110110000001}_{2}$

Since this is less than ${10}_{2}$, the fourth digit after the binary point is $\textcolor{b l u e}{0}$

To cut down on the arithmetic, I will approximate this as ${1.11100011100110100101}_{2}$

Square ${1.11100011100110100101}_{2}$ to get ${11.1001000110001111101001101110010001011001}_{2}$

Since this is greater than ${10}_{2}$, the fifth digit after the binary point is $\textcolor{b l u e}{1}$

Divide by ${10}_{2}$ to get ${1.11001000110001111101001101110010001011001}_{2}$

I'll stop here, but I hope you get the idea.

Putting the digits we have found together we get:

${\log}_{{10}_{2}} {111}_{2} \approx {10.11001}_{2} = 2 + \frac{25}{32} \approx 2.8$

Actually ${\log}_{2} \left(7\right) \approx 2.80735$

• The logarithm base $b$ of a number $n$ is the number $x$ that when $b$ is raised to $x$th power, the resulting value is $n$

${\log}_{b} n = x \iff {b}^{x} = n$

Example:

${\log}_{2} 8 = x$

$\implies {2}^{x} = 8$
$\implies {2}^{x} = {2}^{3}$
$\implies x = 3$

${\log}_{5} 1 = x$
$\implies {5}^{x} = 1$
$\implies {5}^{x} = {5}^{0}$
$\implies x = 0$

• Logarithms of negative numbers are not defined in the real numbers, in the same way that square roots of negative numbers aren't defined in the real numbers. If you are expected to find the log of a negative number, an answer of "undefined" is sufficient in most cases.

It is possible to evaluate one, however, the answer will be a complex number. (a number of the form $a + b i$, where $i = \sqrt{- 1}$)

If you're familiar with complex numbers and feel comfortable working with them, then read on.

log_b (-x) = ?

We will use the change-of-base rule and convert to natural logarithms, to make things easier later:

${\log}_{b} \left(- x\right) = \ln \frac{- x}{\ln} b$

Note that $\ln \left(- x\right)$ is the same thing as $\ln \left(- 1 \cdot x\right)$. We can exploit the addition property of logarithms, and separate this part into two separate logs:

${\log}_{b} \left(- x\right) = \frac{\ln x + \ln \left(- 1\right)}{\ln} b$

Now the only problem is figuring out what $\ln \left(- 1\right)$ is. It might look like an impossible thing to evaluate at first, but there is a pretty famous equation known as Euler's Identity that can help us.

Euler's Identity states:

${e}^{i \pi} = - 1$

This result comes from power series expansions of sine and cosine. (I won't explain that too in-depth, but if you are interested, there is a nice page here which explains a bit more)

For now, let us simply take the natural log of both sides of Euler's Identity:

$\ln {e}^{i \pi} = \ln \left(- 1\right)$

Simplified:

$i \pi = \ln \left(- 1\right)$

So, now that we know what $\ln \left(- 1\right)$ is, we can substitute back into our equation:

${\log}_{b} \left(- x\right) = \frac{\ln x + i \pi}{\ln} b$

Now you have a formula for finding logs of negative numbers. So, if we want to evaluate something like ${\log}_{2} 10$, we can simply plug in a few values:

${\log}_{2} \left(- 10\right) = \frac{\ln 10 + i \pi}{\ln} 2$

$\approx 3.3219 + 4.5324 i$

• Log base "a" of "x" is the same quotient of log base"b" of "x" and log base "b" of "a".

This allows us to convert a base that is not easily solvable into the division of of logs with common base that is easy to solve.

${\log}_{a} \left(x\right) = \frac{{\log}_{b} \left(x\right)}{{\log}_{b} \left(a\right)}$

${\log}_{10} \left(100\right) = \frac{{\log}_{e} \left(100\right)}{{\log}_{e} \left(10\right)} = \frac{\ln \left(100\right)}{\ln \left(10\right)} = 2$