Well-defined functions using mod $p$ equivalence classes

204 Views Asked by At

Prove that if $m, n$ are elements in the set $\mathbb{Z}$ and $m \equiv n \pmod p$, then $m^2 \equiv n^2 \pmod p$.

Also, is the function $f: [\mathbb{Z}]_p \to [\mathbb{Z}]_p$ given by $f([n]_p) = [n^2]_p$ well defined?

So far I have

$p \:| \: m - n \implies pk = m - n$

and I'm not sure where to proceed from here.

Goal: $p \:|\: m^2 - n^2$

For the function, I'm not quite sure where to begin. I'm guessing the subscript $p$ means, we're using the equivalence classes from $\pmod p$. In that case, the function would not be well defined because $[4] \neq [16]$.