Consider the "obvious" equality $$(a^m)^n = a^{mn}.$$ In particular, if I only want to consider real numbers, for what values of $a,m,n$ is the above displayed equality true? And where can I find the precise statement written down? My first instinct was that as long as $a$, $a^m$, and $(a^m)^n$ were real numbers, then the equality would hold. This would have ruled out examples like $((-1)^{1/2})^2$. But we also have $$((-1)^2)^{1/2} \neq (-1)^1.$$
I'm pretty sure the displayed equation is always true if we require $a$ to be positive, but it's also true for values like $a = -1$, $m = 1/3$, and $n = 3$.
My guess is that the most general statement (again, only considering real numbers) requires $a$, $a^m$, $(a^m)^n$, and also $a^n$ to be real numbers. Is this "easy" stuff written down in something like Rudin's Principles of Mathematical Analysis?
Thanks a lot!