A basic question about exponentiation: when is $a^{xy}=(a^x)^y$? This is a silly question but under what conditions is $a^{xy}=(a^x)^y$ true, given all are complex numbers? 

Let's spell out the definitions. For complex numbers $z$ and $\alpha$, and choice of range of argument, such as $[0,2\pi)$ or $(-\pi, \pi]$, we can define
$$z^{\alpha} = \exp(\alpha \log z) = \exp(\alpha (\log |z| + i\arg z))$$
With this definition, we have
$$a^{xy} = \exp(xy(\log |a| + i\arg a))$$
Now $a^x = \exp(x(\log |a| + i\arg a))$, so $\log |a^x| = \log (\exp(x \log |a|)) = x\log |a|$ and $\arg(a^x) = \arg a + 2n\pi$ for the unique $n_x \in \mathbb{Z}$ making $\arg(a^x)$ live in the desired range. Hence
$$(a^x)^y = \exp(xy(\log |a| + i(\arg a + 2n_x\pi))$$
In other words,
$$(a^x)^y = a^{xy}\exp(2n_xxyi\pi)$$
for some $n \in \mathbb{Z}$. Thus we have $(a^x)^y = a^{xy}$ if and only if $n_x=0$ or $xy \mid n_x$.
If you consider complex exponentiation as a multifunction, the identity $(a^x)^y = a^{xy}$ is true since this issue with the choice of range of argument goes away.
