Why is $-x = (x^2) ^ {\frac{1}{2}}$ not logically equivalent to $(-x) ^ 2 = ((x^2) ^ {\frac{1}{2}}) ^ 2$ for all values of x?
First equation:
$-x = (x^2) ^ {\frac{1}{2}}$
Second equation:
$(-x) ^ 2 = ((x^2) ^ {\frac{1}{2}}) ^ 2$
For example, if I plug x = -1 into both equations, only one of them evaluates to true. I would expect both of them to do so because I performed identical operations on both sides. Why are the two equations not logically equivalent?
Why are the following equations not equivalent?
$$x = a$$
$$x^2 = a^2$$
Can you figure out why one implies the other but not the other way around?