If $x^2=y^2$, prove that $x=y$ or $x=-y$ I have a simple question here. I am trying to prove that, given $x^2=y^2$, $x=y$ or $x=-y$. I know exactly why this is true; it's obvious. I'm just unclear on the general format of a proof, as well as how I should specifically write this one.
Any help would be appreciated. Thanks.
 A: We have that 
$$x^2 = y^2 \iff x^2 - y^2 = 0 \iff (x - y)(x + y) = 0$$
Now we can conclude that either $x - y = 0$ (so that $x = y$) or $x + y = 0$ (so that $x = -y$). Hence, if $x^2 = y^2$, it is true that $x = \pm y$.
The reverse is immediate.
A: Equivalently to @T's approach, note that we have $$|x|=|y|⟺x=\pm  y$$
A: Another approach is to note that $x^2-y^2 = 0$ as a polynomial in $x$ over a field (think $y$ as a constant in that field) has at most $2$ roots (counting multiplicities) because it has degree $2$. This basic fact about polynomials follows from the fact that some $w$ being a root of a polynomial is equivalent to the divisibility of the polynomial by $x - w$, and dividing by $x-w$ makes the degree decrease by $1$, thus for a degree $n$ polynomial I can divide at most $n$ times until I get a constant. 
Now that we have justified that equations (one variable polynomials) of degree $2$ over a field have at most two solutions, since $ x = y$ and $ x = -y$ are two solutions (I exclude the case $y=0$, where the equation has only the zero solution, but with multiplicity $2$) that we find by pure luck, we know that there is no room for more, and we prove the equivalence.
As observed in previous comments, all of these arguments are good over any field (but may fail over rings in general).
