Skip to main content

Subsection 2.7.1 Whirlwind Review of Logarithms

Before you read much further into this little review on logarithms, you should first go back and take a look at the review of inverse functions in Section 0.6.

Subsubsection 2.7.1.1 Logarithmic Functions

We are about to define the “logarithm with base \(q\)”. In principle, \(q\) is allowed to be any strictly positive real number, except \(q=1\text{.}\) However we shall restrict our attention to \(q \gt 1\text{,}\) because, in practice, the only \(q\)'s that are ever used are \(e\) (a number that we shall define in the next few pages), \(10\) and, if you are a computer scientist, \(2\text{.}\) So, fix any \(q \gt 1\) (if you like, pretend that \(q=10\)). The function \(f(x)=q^x\)

  • increases as \(x\) increases (for example if \(x' \gt x\text{,}\) then \(10^{x'} = 10^x \cdot 10^{x'-x} \gt 10^x\) since \(10^{x'-x} \gt 1\))
  • obeys \(\lim\limits_{x\rightarrow-\infty} q^x=0\) (for example \(10^{-1000}\) is really small) and
  • obeys \(\lim\limits_{x\rightarrow+\infty} q^x=+\infty\) (for example \(10^{+1000}\) is really big).

Consequently, for any \(0 \lt Y \lt \infty\text{,}\) the horizontal straight line \(y=Y\) crosses the graph of \(y=f(x)=q^x\) at exactly one point, as illustrated in the figure below.

The \(x\)–coordinate of that intersection point, denoted \(X\) in the figure, is \(\log_q(Y)\text{.}\) So \(\log_q(Y)\) is the power to which you have to raise \(q\) to get \(Y\text{.}\) It is the inverse function of \(f(x)=q^x\text{.}\) Of course we are free to rename the dummy variables \(X\) and \(Y\text{.}\) If, for example, we wish to graph our logarithm function, it is natural to rename \(Y\rightarrow x\) and \(X\rightarrow y\text{,}\) giving

Definition 2.7.2

Let \(q \gt 1\text{.}\) Then the logarithm with base \(q\) is defined  4 We can also define logarithms with base \(0 \lt r \lt 1\) but doing so is not necessary. To see this, set \(q=1/r \gt 1\text{.}\) Then it is reasonable to define \(\log_r(x) = - \log_q(x)\) since

\begin{equation*} r^{\log_r(x)} = \left(\frac{1}{q}\right)^{\log_r(x)} = \left(\frac{1}{q}\right)^{-\log_q(x)} = q^{\log_q(x)} = x \end{equation*}
as required. by

\begin{align*} y=\log_q(x) & \liff x=q^y \end{align*}

Obviously the power to which we have to raise \(q\) to get \(q^x\) is \(x\text{,}\) so we have both

\begin{align*} \log_q( q^x ) &=x & q^{\log_q(x)} &=x \end{align*}

From the exponential properties

\begin{align*} q^{log_q(xy)} &= xy &&= q^{log_q(x)} q^{log_q(y)} = q^{log_q(x)+log_q(y)}\\ q^{log_q(x/y)} &= x/y&&= q^{log_q(x)} / q^{log_q(y)} = q^{log_q(x)-log_q(y)}\\ q^{log_q(x^r)} &= x^r &&= \big(q^{log_q(x)}\big)^r = q^{r log_q(x)} \end{align*}

we have

\begin{align*} \log_q(xy) &= \log_q(x) + \log_q(y)\\ \log_q(x/y) &= \log_q(x) - \log_q(y)\\ \log_q( x^r ) &= r \log_q (x) \end{align*}

Can we convert from logarithms in one base to logarithms in another? For example, if our calculator computes logarithms base 10 for us (which it very likely does), can we also use it to compute a logarithm base \(q\text{?}\) Yes, using

\begin{align*} \log_q(x) &= \frac{\log_{10} x}{\log_{10} q} \end{align*}

How did we get this? Well, let's start with a number \(x\) and suppose that we want to compute

\begin{align*} y &= \log_q x\\ \end{align*}

We can rearrange this by exponentiating both sides

\begin{align*} q^y &= q^{\log_q x} = x\\ \end{align*}

Now take log base 10 of both sides

\begin{align*} \log_{10} q^y &= \log_{10} x\\ \end{align*}

But recall that \(\log_q( x^r ) = r \log_q(x)\text{,}\) so

\begin{align*} y \log_{10} q &= \log_{10} x\\ y &= \frac{\log_{10} x}{\log_{10} q} \end{align*}