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).
 A: 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}$
A: 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. 
A: 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)}$" ?
