# Does $(x^m)^n$ not always equal $x^{mn}$?

I was messing around and "proved" that $|x|=x$: $$|x|=\sqrt{x^2}=x^\frac{2}{2}=x^1=x.$$ Now clearly this cannot be true unless $x$ is non-negative. The error seems to be going from the second equality to the third. However, using our exponent rules, $$\sqrt{x^2}=(x^2)^\frac{1}{2}=x^\frac{2}{2}$$ should be true. What is the problem with this "proof"?

• @T.Bongers No what? No not? Or no yes. Double negative? – CogitoErgoCogitoSum Apr 27 '18 at 17:58

The rule$$a^{bc}=(a^b)^c$$holds when $a>0$ and $b,c\in\mathbb R$. Otherwise, what does it even mean? What is $(-1)^\frac12$, for instance?
The problem is that the rule: $$(x^a)^b=x^{ab}$$ for $a,b \in \Bbb R$ (and not $\Bbb Z$) is only valid for $x \geq 0$.
And indeed for $x \geq 0$, $|x|=x$.