Natural log of a negative number

My teacher told me that the natural logarithm of a negative number does not exist, but

$$\ln(-1)=\ln (e^{i\pi})=i\pi$$

So, is it logical to have the natural logarithm of a negative number?


Context is important here. In the context of real numbers, negative numbers have no logarithms (and neither does $0$) because $\log(x)$ is a number $y$ such that $e^y=x$ and $e^y$ is always greater than $0$.

On the other hand, in the context of complex numbers, every complex number other than $0$ has logarithms. In fact, any such complex number has infinitely many logarithms! You are right when you claim that $i\pi$ is a logarithm of $-1$. However, every complex number of the form $\pi i+2\pi in$ (with $n\in\Bbb Z)$ is also a logarithm of $-1$, since$$e^{\pi i+2n\pi i}=e^{\pi i}e^{2\pi in}=(-1)\times1=-1.$$


$\log(-1)=i\pi$ is the principal value of the logarithm of $-1$. In general: the principal value of $\log re^{i\theta}$ is $\log r+i\theta$ where $\theta\in(-\pi,\pi]$, and adding integer multiples of $2i\pi$ produces all other possible logarithms.

Your teacher was correct... but only in the fully real setting.