Prove that $a^2 \equiv b^2 $ (mod $p$) implies that $a \equiv \pm b$ (mod $p$). Where $p$ is a prime number.
So I know that $a^2 \equiv b^2 $ (mod $p$) implies $p|(a^2 -b^2)$ which implies that $a^2 -b^2 = mp$ for some $m \in \mathbb{Z}$. So $a^2 =b^2 +mp$.
But I am not sure where to go from here.
Since $p\mid(a^2-b^2)$, since $a^2-b^2=(a-b)(a+b)$, and since $p$ is prime, $p\mid(a-b)$ or $p\mid(a+b)$.