# Does $a^2 = b^2$ imply $|a| = |b|$?

This seems like a rather obvious fact, but I can't figure out how to prove (or disprove) it.

Suppose $$a, b, \in \mathbb{R}$$, and $$a^2 = b^2$$. If I take square roots, I get $$a = |b|$$ and $$b = |a|$$. I want to conclude that $$|a| = |b|$$, and this seems to be rather obviously true, but I can't seem to get it via substitution. Perhaps the solution is to consider cases and prove that $$|a| - |b| \geq 0$$ and $$|b| - |a| \geq 0$$.

• Note: $||a||=|a|$ (idempotence) – J. W. Tanner Mar 22 '20 at 4:30
• I am ok with that, but since taking absolute values doesn't preserve equalities, I don't know how to prove that. (Or does it? Perhaps I am thinking of inequalities.) – John P. Mar 22 '20 at 4:32
• $|a| = \sqrt{a^2}$, so taking the square root on both sides of $a^2=b^2$ implies $|a|=|b|$. – Hayden Mar 22 '20 at 4:34
• John: Doesn’t $a^2=b^2$ imply $\sqrt{a^2}=\sqrt{b^2}$? – J. W. Tanner Mar 22 '20 at 4:35
• I should have realized it was that easy. Thanks. – John P. Mar 22 '20 at 4:36

$$a^2=b^2$$
$$a^2-b^2=0$$
$$(a-b)(a+b)=0$$
$$a=b \textrm{ or } a=-b$$
In either case: $$|a|=|b|$$
$$a^2=b^2\implies\sqrt{a^2}=\sqrt{b^2}\implies|a|=|b|$$