We know by definition that: $$\sqrt[n]{a^m}=(\sqrt[n]{a})^m$$ Having said that, I can't help but wonder if this is always the case. Specifically, if $a$ is a negative number and $n$ is even. Take for instance the 6th root of $-2$ to the power of $2$.
When written down as $\sqrt[6]{(-2)^2}$, we get: $$\sqrt[6]{(-2)^2}=\sqrt[6]{2^2}=\sqrt[3]{2}$$
However, if we write it down as $(\sqrt[6]{-2})^2$, the expression is undefined, as it contains an even root of a negative number. If we ignore this fact and still try to calculate it, we get: $$(\sqrt[6]{-2})^2=((-2)^\frac{1}{6})^2=(-2)^\frac{1}{3}=\sqrt[3]{-2}=-\sqrt[3]{2}$$
And obviously $\sqrt[3]{2}$ does not equal $-\sqrt[3]{2}$.
I don't know how to make sense of this. Is there an error in my reasoning or is $a^\frac{m}{n}$ actually undefined for negative $a$ and even $n$?