Is $(-1)^{ab} = (-1)^{ba}$ true? => $(-1)^{ab} = ((-1)^a )^b$ is true? In general we know $A^{bc} = A^{cb}$ for integer $A$. 
I want to extend this to the case $A=-1$. 
For integers $a,b$ I guess the above relation holds, 
\begin{align}
(-1)^{2\cdot3} = ((-1)^2)^3 = 1 = ((-1)^3)^2
.\end{align}
But if we include the fraction
\begin{align}
(-1)^{-\frac{1}{2}} &= ((-1)^{-1})^{\frac{1}{2}} = (-1)^{\frac{1}{2}} = i \\
&= ((-1)^{\frac{1}{2}})^{-1}=\frac{1}{i} = -i
\end{align}
this does not hold any more. 
Is something wrong with my computation?
 A: In complex numbers, 
$$(a^b)^c=a^{bc}$$ doesn't hold. You just found a counterexample.
This is due to the $2k\pi$ undeterminacy of the argument. When you take the square root, it becomes a $k\pi$ i.e. a sign indeterminacy.
A: Of course $(-1)^{ab} = (-1)^{ba}$, since multiplication is commutative. (No matter how you define exponentiation for complex numbers: fixed branch or multivalued.)
What isn't true is that $(-1)^{ab} = ((-1)^a)^b$ in general. This has been asked and answered many times on this site.
For similar questions, see for example


*

*Why $\sqrt{-1 \times {-1}} \neq \sqrt{-1}^2$?

*Why $\sqrt{-1 \times -1} \neq \sqrt{-1}^2$?

*math fallacy problem: $-1= (-1)^3 = (-1)^{6/2} = \sqrt{(-1)^6}= 1$?

*A basic question about exponentiation

*How to find complex numbers $z,\lambda,\mu$ such that $(z^\lambda)^\mu\neq z^{\lambda\mu}$
just to mention a few.
A: For complex number $z$ and integer $a$, $z^a$ is defined and equals $z*z*...*z$ ($a$ times) or ${1\over z}*{1\over z}*...*{1\over z}$ ($-a$ times) for negative $a$.
For rational $a={p \over q}$, $z^a$ can be said to have $q$ values, with one value called "main" or principal value. For rational $a,b$, $(z^a)^b$ and $(z^b)^a$ have the same set of values, but may have different principal values. In your case (simplifying things a bit):
$$((-1)^{-1})^{1 \over 2} = (-1)^{1 \over 2} = \{i, -i\} \\
((-1)^{1 \over 2})^{-1} = (\{i, -i\})^{-1} = \{-i, i\}$$
When $a$ is irrational, $z^a$ is usually said to be undefined (one could say it has infinitely many values).
