Proving that if $x,y \in \Bbb R$ and $|x|=|y|$ then $x^2=y^2$ I've seen that if $|x|=|y|$ for reals $x$ and $y$ that $x^2$ is also equal to $y^2$. Generally that makes handling the absolute values much easier algebraically. I was wondering if there was any more need proof beyond If
$x,y \in \Bbb R$ then $|x|=\sqrt{x^2}$ so if $|x|=|y|$ then $\sqrt{x^2}=\sqrt{y^2}$ square both sides: $x^2=y^2$.
I was also wondering if it would be valid to say if $x,y \in \Bbb R$ and $|x|=y$ then $x=\pm y$ and $\pm x=y$, and in extension $x^2=y$ then $x=\pm \sqrt{y}$.
 A: Just use that
$$\vert x\vert^2=x^2$$
In fact the last equality comes from
$$(\vert x\vert -x)(\vert x\vert+x)=0$$
because one of the two factors is $0$ using the definition of the absolute value.
A: Assuming it is known that:
$\;(1)\quad\quad |a| \cdot |b| = | a \cdot b|$
$\;(2)\quad\quad a^2 \ge 0$ for $\forall a \in \mathbb{R}$
$\;(3)\quad\quad a \ge 0 \implies |a| = a$
The proof follows in one line: $$x^2 \stackrel{(2)+(3)}{\;=\;} |x^2| = |x \cdot x| \stackrel{(1)}{\,=\,} |x| \cdot |x| = |x|^2 = |y|^2 = |y|\cdot|y| \stackrel{(1)}{\,=\,} |y \cdot y| = |y^2| \stackrel{(2)+(3)}{\;=\;} y^2$$
A: By definition of absolute value, $x=\pm y$.
If $x=y$, then $$x^2=x\cdot x=y\cdot y=y^2.$$ If $x=-y,$ then $$x^2=x\cdot x=(-y)\cdot(-y)=y\cdot y=y^2$$
A: Thats a good question.
I think it is more consequential than direct though.
For real numbers,
We have as an axiom for $a > 0$ and $x < y$ than $ax < ay$. This gives us: if $x > 0$ then $x^2 = x*x > x*0 = 0$.
We also have as an axiom that for ever real $b$ there is a unique $-b$ so that $b + (-b) = 0$.  And we have an axiom that if $x < y$ than $x + c < y +c$ for any $c$.  From this we have $b > 0 \iff b +(-b) > 0 + (-b) \iff 0 > -b$.
And there therefore we have a proposition that for $a < 0$ and $x < y$ than $ax > ay$.  (Because $a < 0 \implies -a > 0 \implies -ax < -ay \implies ax > ay$.) [Okay, I skipped proving that $(a)(-b) = -(ab)$ but... that's details...].
Thus we have. For any $x \in \mathbb R$ exactly one of the following are true:
i)  $x > 0$ and $x^2 > 0$.
ii) $x = 0$ and $x^2 = 0$.
iii) $x < 0$ and $x^2 = x*x > x*0 = 0$.
So all squares are positive or zero (and only zero if it is zero squared).
....  Hmm.... okay, we do need to prove that $(a)(-b) = -(ab)$ and that $-(-a) = a$ and that $(-a)(-b) = ab$, after all.
We have an axiom that $a(b+c) = ab+bc$.  So $ab+ (a)(-b) = a(b + (-b)) = a*0 = 0$.  Now we have an axiom that there is one unique $-ab$ so that $ab + (-ab) =0$ and $ab + (a)(-b) =0$.... so that mean $(a)(-b)$ must be equal to that unique $-ab$.
We also have $a + (-a) = -a + a = 0$ so there is a unique $-(-a)$ so that $-a + (-(-a)) = 0$.  So that must be $-(-a) = a$.
And finally $(-a)(-b) = -(-a)(b) = --(ab) = ab$.
So .... given all that....
AND defining that $|a| = a$ if $a > 0$ and $|a| = 0$ if $a = 0$ and that $|a| = -a$ (which is positive) if $a < 0$.
We can have:
$|a| = |b|$ means either.
1) $a = b$ and $a\ge 0 ; b\ge 0$ or $a < 0; b < 0$ and $a^2 = b^2$.
2) $a = -b$ and either $a \ge 0; b \le 0$ or $a < 0; b> 0$ and then $a^2 = (-b)^2 = b^2$.
