Prove: Let $x,y \in \mathbb{R}$. If $x^{2}=y^{2}$, then $x=\pm{y}$. Prove: Let $x,y \in \mathbb{R}$. If $x^{2}=y^{2}$, then $x=\pm{y}$.
My attempt: If $x^{2}=y^{2}$ then, $\sqrt{x^{2}}=\sqrt{y^{2}}$ $\rightarrow$ $\pm{x}=\pm{y}$ $\rightarrow$ $x=\pm{y}$ and $-x=\pm{y}$. And I think that would leave me $x=y$, $x=-y$, $-x=y$, $-x=-y$. 
But let's say $x^{2}=4$, so $y^{2}=4$ $\rightarrow$ $\pm{2}=\pm{2}$ then that would give me $2=2$, $2=-2$, $-2=2$ and $-2=-2$. But I have a problem on the $2=-2$ part.
 A: It's generally a bad idea to "take square roots of both sides."  It overcomplicates things, as the correct way to handle it is $\sqrt{x^2}=|x|$.  Avoid the absolute value so you can avoid cases. Here's how.
Realize that from $x^2=y^2$ you get $x^2-y^2=0$.  Now factor to get $(x+y)(x-y)=0$.  But this means at least one of those terms had to be $0$, so $x=\pm y$.
A: You have to take the signs consistently. And $\sqrt {x^2}$ conventionally means the positive square root $|x|$.
Another approach would be to say $x^2-y^2=0=(x+y)(x-y)$ so you have either $y=-x$ or $y=x$.
$x^2=y^2$ does not therefore imply $x=y$, so $x=2, y=-2$ is a solution to the problem $x^2=y^2=4$ which belongs to the factor $x+y$ and indeed $x=-y$ as required. Each of the four combinations of signs $x=\pm 2, y=\pm 2$ belongs to one of the two factors. What you have done is to pick out the wrong factor.
With $x=2, y=-2$ the factorisation is $0\times 4=0$. You cannot conclude that $4=0$ from this - the factorisation indicates that that would involve a hidden division by zero.
