# Can $\log_a(-b)$ be solved using complex/imaginary numbers?

Working through Algebra 2, and have read that you can not take the log of a negative number such as $\log_2(-5)$. I've also done some equations involving complex solutions to quadratic equations (such as "$5i+3$", etc). I was wondering (mostly out of curiosity at this point) if, in more advanced mathematics, there is a way to take the log of a negative number using complex numbers without violating the laws of the universe (and, if so, how would this be done).

• Ya surely there is very beautiful way – Devendra Singh Rana Sep 3 '17 at 17:57
• You can study about it Complex Logarithms and Branches you may find it interesting – Devendra Singh Rana Sep 3 '17 at 17:58
• math.stackexchange.com/questions/93051/… – e2-e4 Sep 4 '17 at 1:35
• Why did a moderator change the subject of my question from "Log of a negative number?" to a question asking why the log of a negative number is undefined? I wasn't asking why it's undefined; I was asking weather or not it could be defined by using some kind of imaginary-number jiu-jitsu... – FrenchTheLlama88 Sep 4 '17 at 13:54

Write the value $x = a + b i = r e^{i \theta}$, i.e. in polar form ($r = \sqrt{a^2+b^2}, \theta$ is the angle of the complex number $x$).

Then, you can define $\log(x) = \log r + i \theta$.

(*) $\theta$ is not uniquely specified; if you add or subtract any multiple of $2 \pi$, you still get a valid definition of logarithm.

You can check that this agrees with the regular logarithm by noting for positive numbers $r=a,\theta = 0$. For negative numbers, $r=-a, \theta = \pi$.

For a more detailed discussion, see this wikipedia article.

• It's worth pointing out that for any choice of a branch (i.e., to simplify, the range in which you choose $\theta$), the function will not be continuous on the entire complex plane. – Sasho Nikolov Sep 3 '17 at 19:00
• That is really about $\log_e(-a)= \log_e(a)+i(2k+1)\pi$ for integer $k$. For $\log_2(-a)$, you get $\log_2(a)+i(2k+1)\pi\log_2(e)$ – Henry Sep 3 '17 at 22:09
• @SashoNikolov - true. Algebra 2 indicates a high school junior-level though, so I don't expect them to have any reasonable notion of continuity. – Batman Sep 3 '17 at 22:47
• For negative numbers r=-a? Really? – yngabl Sep 3 '17 at 23:45
• Really. For example, if $x=-1$, $a=-1$ and $r=-a=1$. – Batman Sep 3 '17 at 23:56

Yes, it is: $\log_2(-5)=\frac{\ln(-5)}{\ln(2)}=\frac{1}{\ln(2)}(\ln(5)+i\pi)=\log_2(5)+i\frac{\pi}{\ln(2)}$

In general: $$\operatorname{Log} z=\log|z|+i\operatorname{Arg}(z)$$ where $\operatorname{Arg}$ is the principal value of the argument of $z$. For reals $\operatorname{Arg}(x)=\begin{cases}0\text{ if }x\ge0\\\pi\text{ if }x<0\end{cases}$

• But a complete answer must also address the fact that complex log is multivalued, and any particular choice of a branch is either a matter of convention or convenience (so to speak). – zipirovich Sep 3 '17 at 18:04

Thanks everyone! A lot of the higher-level explanation (in both Wikipedia and the answers here) is going over my head (being as I'm only in Precalculus/Algebra2 at this point), but I think I've gotten a general idea of an answer from what people have posted (though someone should correct me if I'm wrong) and thought I would update people on my understanding at this point.

From what I've gathered, the solution involves something called "complex logarithms" which can have multiple answers. I looked up complex logarithms on YouTube and found this video (which I only partially understood): https://www.youtube.com/watch?v=fMo9TQIVbEo. I saw that the field of math that this falls under is called "complex analysis" (or at least I think it is).

With that information, I went to Google to find a calculator that can do complex analysis problems and typed my problem into it. With the understanding that there can be multiple answers to this kind of problem (and this only shows one of them) this was the result:

https://www.wolframalpha.com/input/?i=log2(-5)

https://www.wolframalpha.com/input/?i=2%5E((log(5)%2Bi*pi)%2Flog(2))

So, assuming this is all correct, would at least one answer be "$\log_a(-b) = \frac{\ln(b)+i\pi}{\ln(a)}$" ?