How to fix the confusion of power? I think the question which I am asking may small but  I am getting confused whenever I see.
I have studied that $(a^m)^n=(a^n)^m$ but in case of the
$(-1)^\tfrac{15}{2}$ when I deal. I get different answers. Why I don't understand.
When  $(-1)^\tfrac{15}{2}=\big((-1)^\tfrac{1}{2}\big)^{15}=(\iota)^{15}=(\iota^{2})^7.\iota=-\iota$
When  $(-1)^\tfrac{15}{2}=\big((-1)^{15}\big)^\tfrac{1}{2}=(-1)^\tfrac{1}{2}=\iota$
What is the reason that I am getting two different answers. I am totally confused about this and do not know which procedure or answer is correct one.
I shall be thankful if confusion is get removed.
 A: The confusion here comes from the way we define the power function for complex numbers.
Consider a complex number $z$ in polar (or exponential) form, given as $z = Re^{i\theta}$. Note that the argument $\theta$ isn't unique: letting $\alpha = \theta + 2\pi$ yields $Re^{i\alpha} = Re^{i(\theta + 2\pi)} = Re^{i\theta}e^{2i\pi} = Re^{i\theta}$.
Now let's consider the natural logarithm of $z$: using the properties of logarithms gives us $\log{z} = \ln R + i \theta$. Since $\theta$ can take on many different values, it should be clear that $\log$ can as well, and this should make sense given that $e^z$ is periodic.
The reason $\log z$ being multi-valued is important is because it is used directly in the definition of complex-valued power functions: for any $z \neq 0$, $z^x = e^{x\log{z}}$. So, since $\log$ is multi-valued, so is the power function, which is why you get multiple answers here.
The fact that these values are multi-valued may seem like a detriment to their usefulness, but we can define a single value for these multi-valued functions using the concept of branches. The idea here is kind of similar to what we do with $\arcsin$ in the real numbers: there are infinite possible angles for with the same sine, but if we restrict the range of the function to a certain range, then we can define a single principal result.
In the complex numbers we do this by imposing a restriction on the values that the argument, $\theta$, of a complex number can take to an interval of $2\pi$, typically saying $\theta$ must satisfy $0 \leq \theta < 2\pi$. Now, $\log$ (and by proxy the power function) have one value on this branch. However, these different branches have some ramifications for what happens when you cross the line $\theta = 0$, so this is likely what causes the identity in question to fail in this instance.
So in your example with $(-1)^{\frac{15}{2}}$, which answer you get as the principal result depends on what branch of the function you work on. On the "default" principal branch with $0 \leq \theta < 2\pi$, you would get:
$$(-1)^{\frac{15}{2}} = e^{\frac{15}{2}\log{-1}} = e^{\frac{15}{2}i\pi} = \cos(\frac{15}{2}\pi)+i\sin(\frac{15}{2}\pi) = -i$$
However, if you use $2\pi \leq \theta < 4\pi$, you would get:
$$(-1)^{\frac{15}{2}} = e^{\frac{15}{2}\log{-1}} = e^{\frac{15}{2}\cdot3i\pi} = \cos(\frac{45}{2}\pi)+i\sin(\frac{45}{2}\pi) = i$$
