Ask Uncle Colin: A Strange Error

Dear Uncle Colin,

If $(-2)^3 = -8$, why doesn’t $\log_{-2}(-8) = 3$?

Exponential Rules: Rubbish Or Reasonable?

Hi, ERROR, and thanks for your message! As is so often the case, there are two (or possibly three) answers to this.

A problem of definition

The way logarithms are usually1 defined as $\log_{a}(x) = \frac{\ln(x)}{\ln(a)}$.

For this to work, it requires $\ln(a)$ to be defined (so $a$ has to be positive) - and non-zero (so $a$ can’t be 1).

That’s probably why your calculator complains.

In the real numbers

The trouble with negative-based logarithms is that something like $f(x) = (-2)^x$ isn’t a very well-behaved function for real values of $x$: it only takes on real values when $x$ is an integer.

It’s possible to construct an inverse function for $f(x)$ all the same, but it’s only defined for exact powers of -2, and isn’t exactly all that useful - it has much the same behaviour from $\log_2(x)$ with signs alternating.

In the complex numbers

If you want things to get really messy, you can think about logarithms in the complex numbers.

Even there, the answer isn’t quite 3. This is because, in the complex numbers, logarithm functions aren’t single-valued - as a result of Euler’s identity, $e^{i\pi} = -1$. This means that $\ln(-8)$, for example, would give all of the complex numbers $z$ such that $e^z = -8$ - which would be $z=3\ln(2) \pm (2n+1)\pi$, where $n$ is an integer.

Similarly, $\ln(-2)$ is $\ln(2) \pm (2m+1) \pi$, where $m$ is an integer.

That means that $\log_{-2}(-8)$, in the complex numbers, is $\frac{3 \ln(2) \pm (2n+1)\pi}{\ln(2) \pm (2m+1) \pi}$. In the very specific case where $n=1$ and $m=0$, this does work out to three! But there are infinitely many other answers, too.

Hope that helps!

- Uncle Colin

* Edited 2020-01-22 to fix a typo. Thanks, Rob!

Colin

Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.

  1. by usually, I mean ‘in my head’ - other places of definition are available []

Share

2 comments on “Ask Uncle Colin: A Strange Error

  • Rob

    Shouldn’t the first line, right hand half read, log-2(-8)=3.

    For sure, -2^3 doesn’t equal 8. Just a typo I believe

    • Colin

      Good catch! Fixed now.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter