# Why is $i^i$ real but not $\left(\frac{1+i}{\sqrt{2}}\right)^i$?

I know that generally the exponent rule $$\left(a^b\right)^c=a^{bc}$$ does not apply over the field of complex numbers. From what I've read it is due to the periodicity of the complex exponential function causing $$\ln{e^c}$$ to be a multivalued function when $$c$$ is complex. But what I don't get is why $$i^i$$ can be found by doing $$\left(e^{i\frac{\pi}{2}}\right)^i=e^{i^2\frac{\pi}{2}}=e^{\frac{-\pi}{2}}$$ and still obeys normal exponentiation rules even though the exponent is complex but for a different base such as $$\left(\frac{1+i}{\sqrt{2}}\right)^i$$, according to Wolfram Alpha, this number is still complex. Can someone explain why changing the base in this case means that the exponent rule can no longer be followed??

For example, I tried to be a little more rigorous (I think it's more rigorous at least) in my calculation but still arrived at a real number for $$\left(\frac{1+i}{\sqrt{2}}\right)^i$$ as follows:

$$\left(\frac{1+i}{\sqrt{2}}\right)^i=e^{i\ln{\frac{1+i}{\sqrt{2}}}}=e^{i(\ln{1}+i(\frac{\pi}{4}+2k\pi))}=e^{-\frac{\pi}{4}-2k\pi}$$ which is still real. So could someone help explain what is going on?

• Wolfram does give a real number: https://www.wolframalpha.com/input?i=exp%28i*ln%28%281%2Bi%29%2Fsqrt2%29%29 Commented Feb 17, 2022 at 10:19
• Both expressions are multi-valued, but in both cases all possible values are positive real numbers.
– J.G.
Commented Feb 17, 2022 at 10:21
• When you get a number like that from WolframAlpha, read it as $0$. Commented Feb 17, 2022 at 10:26
• If you see such a small imaginary part , the number is probably (but of course not necessarily) real. In most cases, it is a numerical issue , perhaps caused by the limited time for the calculation (Wolfram Alpha only allows a few seconds). Sometimes a button allows to improve the result. Commented Feb 17, 2022 at 10:27
• @Quippy If you read carefully, that's in the section of approximation, and indeed $6.08758\times10^{-17}$ is approximately $0$ Commented Feb 17, 2022 at 10:31

On the unit circle $$z=e^{i\theta}$$ becomes real on $$z^i$$.

Off the unit circle, e.g. $$z=1+i$$, becomes $$z=re^{i\theta}$$, and $$r^i$$ is complex unless $$|r|=1$$.

• This actually explains things very simply. Commented Feb 18 at 2:41

How would you define $$a^b$$ in the most general sense for complex numbers?

If $$a$$ is arbitrary, and $$b$$ is an integer:

• If $$b$$ is a positive integer, you define $$a^b:=a\cdot a \cdot...\cdot a$$ as multiplying $$a$$ by itself $$b$$ times.
• If $$b$$ is a negative integer, you define $$a^b := \frac{1}{a^{-b}}$$, where $$-b$$ is now a positive integer, so the first definition applies. Also $$a^0:=1$$ for all $$a\neq 0$$.

If $$a$$ is positive real, and $$b$$ is any complex number:

• We define $$a^b:=\exp(\ln(a)\cdot b)$$, where the exponential function $$\exp$$ is defined using the series $$\exp(x)=1+x+\frac{1}{2}x^2+...$$, which works for all complex numbers $$x$$.

You can show, that all these definitions together fulfill the relations \begin{align} (a^b)^c = a^{bc}\quad \text{and}\quad a^b\cdot a^c=a^{b+c} \end{align} (and some more relations). But these are only fullfiled when all expressions are defined in one of the senses above. So in particular, if $$a$$ is not a positive real number, and $$b$$ is not an integer, the expression $$a^b$$ is not defined.

Finally: Yes, you can extend the definition of $$a^b$$ to more numbers. This amounts to extending the definition of logarithms to more than positive real numbers. But the complex logarithms is multi-valued function (see wikipedia), so you have to choose one "branch" of it to have an actual function. And if you do so, you will always violate some of the laws of logarithm and also of the resulting exponentiation.

For this reason, mathematical literature quite often avoids general exponentiation. If complex numbers are involved, you should try to stay with the $$\exp$$ function, which is very nice and has beautiful laws that always hold.