OVERALL THEORY
If $x$ is a positive real number and $m$ and $n$ are integers, then
$$x^{\frac mn} = (x^m)^{\frac 1n} = (x^\frac 1n)^m = \sqrt[n]{x^m} = (\sqrt[n]x)^m$$
When $x$ is negative, all heck breaks loose. We can say that
$$\text{$x^m$ is positive when $m$ is even and is negative when $m$ is odd.}$$
So there is no sense in which $4^2 = -16$.
It is OK to work with negative numbers and integer powers. For example,
$$((-2)^3)^4 = (-2)^{12} = 4096$$
But, weird things can happen with a negative $x$ and fractional exponents. For example
$$
\begin{array}{c}
(-8)^\frac 13 = \sqrt[3]{-8}= -2 \\
(-8)^\frac 26 = \sqrt[6]{((-8)^2)}= \sqrt[6]{64} = 2 \\
\end{array}
$$
Since $\frac 13 = \frac 26$, we see that we have a problem.
There is no way to fix this problem. There is no way around it. Raising a negative real number to a fractional power is not well-defined.
PRINCIPAL SQUARE ROOTS
The roots of an expression, $f(x)-n$, is the set of all $x$ for which $f(x)=0$
The solutions to the equation $x^2 - n = 0$ are called the square roots of $n$.
- Negative numbers have no (real-valued) square roots.
- $0$ has one square root.
- Positive numbers have two square roots.
The principal square root of a number is defined to be the non negative root of that number. There is a really cool equation that encapsulates this.
$$\sqrt{x^2} = |x|$$
Hence, for example,
$$\sqrt{(-3)^2} = \sqrt{3^2} = |3| = |-3| = 3$$
So, if $x^2 = y$, then the principal value of $\sqrt y$ is $|x|$.