Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Logarithms of negative numbers must be complex.

But how do you find $\ln{(-2)}$ expressed in something like $x \cdot i$ where $x \in \mathbb{R}$?

share|cite|improve this question
Complex logarithm is defined only modulo $2\pi i$ since $e^{x+2k\pi i} = e^x$ for any $x\in\mathbb C$ and $k\in\mathbb Z$. To find one of the possible value of logarithm you may want to represent $-x$ for $x>0$ in the form of $$-x = |x|e^{\pi i}$$ so $\operatorname{ln}(-x) = \operatorname{ln}|x|+\pi i$ modulo $2\pi i$. The complete answer is then $$\operatorname{Ln}(-x) = \operatorname{ln}|x|+(2k+1)\pi i$$ where $k\in\mathbb Z$ – Ilya Dec 20 '11 at 22:09
@Ilya: That looks like an answer to me. – joriki Dec 20 '11 at 22:14
Me too, thanks! You can put it as an answer. – Dimme Dec 20 '11 at 22:22
up vote 3 down vote accepted

First note that allowing complex values, $\ln$ stops being unique (or, alternatively, it's not defined on all of $\mathbb{C}={0}$).

The key property of $\ln$ is that $e^{\ln z} = z$ for all complex numbers $z\neq 0$.

Write $\ln(z) = u(z) + iv(z)$ for 2 real valued functions $u(z)$ and $v(Z)$. Then the key property gives $$e^{u(z)}[\cos v(z) + i\sin v(z)] = z$$

In particular, we must have $|z| = e^{u(z)}$ so $u(z) = \ln(|z|)$ (this is the usual real valued $\ln$ defined on positive real numbers).

Likewise, we must have $v(z)= arg(z) + 2\pi k$ for some $k\in\mathbb{Z}$.

Putting this together gives $\ln(z) = \ln(|z|) + i(arg(z) + 2\pi k)$, valid for any nonzero complex number.

Setting $z = -2$, we have $|z| = 2$ and $arg(-2) = \pi$ so $\ln(-2) = \ln(2) + i(\pi + 2\pi k)$.

Just to verify this works, we get $$e^{\ln(-2)} = e^{\ln(2) + i(\pi + 2\pi k)} = 2e^{i\pi} = -2.$$

share|cite|improve this answer
Or, alternatively again, the logarithm can be unique and defined on all of $\mathbb C\setminus\{0\}$, only not continuous on all of $\mathbb C\setminus\{0\}$. – Henning Makholm Dec 20 '11 at 22:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.