## How much can $i^i$ buy?

Posted by Diego Assencio on 2013.11.12 under Mathematics (Complex numbers)

Suppose you want to buy some candy at a store. You look at your pocket and find you have (in your local currency) an amount of money equal to $i^i$ ($i$ here is really the complex number $i$). You choose a snack and check its price: its costs $0.10$. Do you have money to buy it?

If $i^i$ looks absurd to you, you might be impressed by the fact that there is a thing such as complex exponentiation. It turns out that complex exponentiation is extremely important in mathematics, in the natural sciences and in engineering. Being myself a physicist, I dealt with complex exponentiation countless times when learning topics such as waves, circuits, fluids, classical mechanics, quantum mechanics and many others.

But back to the question: how do we compute $i^i$? The answer starts with the definition of the exponential function for a pure imaginary number $i\theta$, where $\theta$ is a real number: $$\boxed{ e^{i\theta} := \cos\theta + i\sin\theta } \label{post_827f3801cb1a0f2b336b0fc67f9e1abd_euler_eq}$$ Equation \eqref{post_827f3801cb1a0f2b336b0fc67f9e1abd_euler_eq} is called Euler's formula. If you are wondering what could motivate such a strange definition, consider the Taylor series for $e^x$, where $x$ is a real number: $$e^x = 1 + \displaystyle\frac{x}{1!} + \displaystyle\frac{x^2}{2!} + \displaystyle\frac{x^3}{3!} + \displaystyle\frac{x^4}{4!} + \ldots = \sum_{n=0}^{\infty} \displaystyle\frac{x^n}{n!} \label{post_827f3801cb1a0f2b336b0fc67f9e1abd_exp_real_def}$$ What would happen if we lost our senses and decided to replace $x$ with $i\theta$ on equation \eqref{post_827f3801cb1a0f2b336b0fc67f9e1abd_exp_real_def}? Well, we would obtain: $$\begin{eqnarray} e^{i\theta} & = & 1 + \displaystyle\frac{(i\theta)}{1!} + \displaystyle\frac{(i\theta)^2}{2!} + \displaystyle\frac{(i\theta)^3}{3!} + \displaystyle\frac{(i\theta)^4}{4!} + \displaystyle\frac{(i\theta)^5}{5!} + \ldots \nonumber\\[5pt] & = & 1 + i\theta - \displaystyle\frac{\theta^2}{2!} - i\displaystyle\frac{\theta^3}{3!} + \displaystyle\frac{\theta^4}{4!} + i\displaystyle\frac{\theta^5}{5!} + \ldots \nonumber\\[5pt] & = & \left(1 - \displaystyle\frac{\theta^2}{2!} + \displaystyle\frac{\theta^4}{4!} + \ldots\right) + i\left(\theta - \displaystyle\frac{\theta^3}{3!} + \displaystyle\frac{\theta^5}{5!} + \ldots\right) \nonumber\\[5pt] & = & \cos\theta + i\sin\theta \end{eqnarray}$$ where above we used the Taylor series for both $\cos\theta$ and $\sin\theta$. This is exactly what equation \eqref{post_827f3801cb1a0f2b336b0fc67f9e1abd_euler_eq} states!

In general, since any complex number $z$ is such that $z = a + ib$ with both $a$ and $b$ being real numbers, then we can compute $e^{a+ib}$ through: $$\boxed{ e^z = e^{a+ib} := e^ae^{ib} = e^a(\cos{b} + i\sin{b}) }$$

Now we can define the logarithm of a complex number. Since every nonzero complex number $z$ can be uniquely written in the form $z = |z|(\cos\theta + i\sin\theta)$ for some $\theta$ such that $0 \leq \theta \lt 2\pi$, then we can write: $$z = |z|(\cos\theta + i\sin\theta) = |z|e^{i\theta} = e^{\log|z|}e^{i\theta} = e^{\log|z| + i\theta}$$ This leads us to define the logarithm of a complex number $z \neq 0$ as: $$\boxed{ \log{z} = \log(e^{\log|z| + i\theta}) := \log|z| + i\theta }$$ The value of $\log{z}$ is uniquely defined provided that we enforce $0 \leq \theta \lt 2\pi$. This restriction is important since on $z = |z|(\cos\theta + i\sin\theta)$ there are infinitely many possible values of $\theta$ values as $$\cos(\theta + 2\pi n) = \cos\theta,\quad \sin(\theta + 2\pi n) = \sin\theta$$ for any integer $n$. As an example, let's compute $\log i$. Since $$i = 0 + i = \cos(\pi/2) + i\sin(\pi/2)$$ then: $$\log i = \log|i| + i\pi/2 = \log 1 + i\pi/2 = i\pi/2 \label{post_827f3801cb1a0f2b336b0fc67f9e1abd_log_i}$$

The last ingredient we need is how to compute $z^w$ for two complex numbers $z$ and $w$ with $z \neq 0$. This can be done according to the following definition: $$\boxed{ z^w := e^{w\log z} }$$ which is motivated by the fact that for real numbers $x \gt 0$ and $y \neq 0$ we have $x^y = e^{\log x^y} = e^{y\log x}$.

If you have endured all of this, you are probably eager to know what the value of $i^i$ is. So let's compute it: $$\boxed{ i^i = e^{i\log i} = e^{i(i\pi/2)} = e^{-\pi/2} \approx 0.2078 }$$ where equation \eqref{post_827f3801cb1a0f2b336b0fc67f9e1abd_log_i} was used. Interestingly, $i^i$ is actually a real number!

Well, there you have it. You can now go ahead and buy your candy. You deserve it! :-)