For real numbers, a logarithm finds the exponent that when put on the base gives the input, in this case $a$. $$\log_a(a^b)=b.$$

As far as I know, logarithms cannot be found for negative numbers: $$\log(a) \,, \quad a>0.$$ $a>0$ is a general requirement, as far as I am aware.

My question is: does this requirement apply universally or only to some numbers? For instance, I fully see that for a number like $2^n$, no value of the exponent $n$ will ever make this power negative. It is therefor not allowed (not possible) to write, say:


since no exponent $n$ in $2^n$ will ever give this negative number. This applies to all positive bases.

But for some negative bases it is possible. Was the base not $2$ but instead $-2$,


then I would argue that $n=3$ is a fine solution, since obviously: $(-2)^3=-8$.

But even with negative bases, certain negative values seem to be impossible, such as: $$\log_{-2}(-4).$$

No exponent $n$ in $-2^n$ will result in $-4$, as far as I can see.

So, it seems to be in summary that for all positive bases, the logarithm can't be found for negative numbers. But for some negative bases it can. Am I right in this? Is the requirement of a positive number within the logarithm restricted to all positive and some negative numbers? Or do we deal with negative bases in a different manner that I have not been introduced to yet?

  • 2
    $\begingroup$ Good already-answers on MSE. $\endgroup$
    – ryang
    Oct 29, 2021 at 11:00
  • $\begingroup$ You ought to edit the title and body to make it easier to see that (1) you are asking about negative base, not negative input, (2) you are interested only in the non-complex universe. (It is currently easy to misread your meaning and give a tangential answer like the one below.) In any case, the answers that I linked above have addressed your actual question. After perusing them, if you're so-inclined, perhaps write a summarising self-Answer? $\endgroup$
    – ryang
    Oct 30, 2021 at 2:54

2 Answers 2


The definition that you mentioned about logarithms is true. $$a^{b}=x \implies \log_{a}(x)=b$$. And to solve your problem, you must need to understand new kind of number system called as complex numbers. "A complex number is a number of form $a+ib$ where $a,b \in \mathbb{R}$ and $i=\sqrt{-1}$." Generally in high school it's taught that $\sqrt{-1}$ is undefined. But the thing is they do work and their applications are widely used in various braches of math like analytic number theory,... You may have already seen the formula $e^{i\pi}=-1$, which as many mathematicians quote to be one of beautiful equations in math. It's because is involved three constants which themselves are irrational and are of great importance. There is a beautiful formula concerning complex numbers $$e^{ix}=cos(x)+isin(x)$$ It's about complex numbers. Now coming to your problem of negative bases. Complex numbers can be used to solve them. For example, $$\ln(-4)=\ln(-1)+\ln(4)=i\pi+ln(4)=ln(4)+i\pi $$. You can extend this idea to negative bases as well. In case you are interested to learn much more about the complex numbers I suggest the following videos by khan academy. https://youtube.com/playlist?list=PLXSlB4yMaoJtM2gG5Mas5mMjwX_B51vsB $$\mathbf{continuation:-}$$ Apologise for incomplete answer. The thing is that, in the question you said even giving an example that $\log_{2}(-8)$ doesn't exist. When you are talking about real numbers then you are right. But it isn't true that it doesn't have solutions. The example you have has a complex solution at $3+\frac{iπ}{ln2}$. Similarly $\log_{-2}(-4)$ also has a complex solution but not real. So no matter if base is positive or negative and no matter if input is positive or negative. Solution do exist.

  • $\begingroup$ Thank you for the answer. I am aware of the general solutions for complex numbers. In my question above I am specifically asking to the definition for real numbers. It is in that scenario that I have always only understood logarithms as defined for positive numbers, although there seems to be solutions for negative bases. My apologies if that wasn't clear. $\endgroup$
    – Steeven
    Oct 29, 2021 at 13:19
  • 1
    $\begingroup$ I edited the answer giving the required clarification. Apologise for incomplete answer. $\endgroup$
    – RAHUL
    Oct 29, 2021 at 13:35

Let a and b be positive real numbers, $i^2=-1$, and z be any integer.

$$log_{b}(-a)=\frac {ln(-a)}{ln(b)}=\frac{ln(a)+i𝜋+i2𝜋z}{ln(b)}=log_{b}(a)+\frac{i𝜋(2z+1)}{ln(b)}$$

$$log_{-b}(a)=\frac {ln(a)}{ln(-b)}=\frac{ln(a)}{ln(b)+i𝜋(2z+1)}=\frac{(ln(a))(ln(b)-i𝜋(2z+1)}{(ln(b))^2+𝜋^2(4z^2+4z+1)}=\frac{(ln(a))(ln(b))}{(ln(b))^2+𝜋^2(4z^2+4z+1)}-\frac{i𝜋(ln(a))(2z+1)}{(ln(b))^2+𝜋^2(4z^2+4z+1)}$$

$$log_{-b}(-a)=\frac{ln(-a)}{ln(-b)}=\frac{ln(a)+i𝜋(2z+1)}{ln(b)+i𝜋(2z+1)}=\frac{(ln(a)+i𝜋(2z+1))(ln(b)-i𝜋(2z+1))}{(ln(b))^2+𝜋^2(4z^2+4z+1)}=\frac{(ln(a))(ln(b))+𝜋^2(4z^2+4z+1)}{(ln(b))^2+𝜋^2(4z^2+4z+1)}+i \frac{𝜋(ln(b))(2z+1)-𝜋(ln(a))(2z+1)}{(ln(b))^2+𝜋^2(4z^2+4z+1)} $$

This definitely is much harder to type than to scribble on a notepad!

  • $\begingroup$ A bit more descriptive text helps for clarity and makes it easier to understand. You didn't define $\ln(-a)$ for example and what/how/why you are doing what you are doing and why it works. But indeed in the complex numbers, you can violate the constraints that the log function has on the real numbers. $\endgroup$ Jan 26 at 3:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .