Let the relation $µ$ on $Z$ (set of integers) be defined by $xµy$ if and only if $x^2 ≡ y^2(mod 4).$
I have already proven that the relation $µ$ is an equivalence relation, but I am currently struggling with determining the equivalence classes
Do I just testing values for $x \in Z$?
For example:
If $x ≡ 0 (mod 4)$, then $x^2 ≡ 0^2 ≡ 0 (mod 4)$. So, the equivalence class [x] contains all integers that are congruent to $0$ modulo $4$.
If $x ≡ 1 (mod 4)$, then $x^2 ≡ 1^2 ≡ 1 (mod 4).$ The equivalence class [x] contains all integers that are congruent to $1$ modulo $4$.
Therefore, the equivalence classes of the relation $µ$ on $Z$ are:
$[0] = \{..., -8, -4, 0, 4, 8, ...\}$
$[1] = \{..., -7, -3, 1, 5, 9, ...\}$
Is this correct? But I believe that my equivalence classes need to complete $Z$? Not sure if I am doing the right thing. And where is $2$?
Actually, $$ x\mathrel\mu 0\iff x^2\equiv0\pmod4\iff x\text{ is even}, $$ and therefore $[0]$ is the set of all even integers.
And $$ x\mathrel\mu 1\iff x^2\equiv1\pmod4\iff x\text{ is odd,} $$ and therefore $[1]$ is the set of all odd integers.
Since every integer is even or odd, you are done: these are the only equivalence classes.
Here's another way of reaching the same conclusion. If $x,y\in\mathbb{Z}$, then \begin{align} x\mathrel\mu y&\iff x^2\equiv y^2\pmod4\\ &\iff4\mid(x-y)(x+y). \end{align} Now, when a product of integers is a multiple of $4$, then either both factors are even or one of them is odd whereas the other one is a multiple of $4$. But the current situation the second possibility cannot occur. Indeed, if, say $x+y$ is odd, the $x-y$ is odd too, since it is equal to $(x+y)-2y$. So, both $x+y$ and $x-y$ are even, and this means that $x$ and $y$ have the same parity. So, \begin{align} [x]&=\{y\in\mathbb{Z}\,|\,x\text{ and }y\text{ have the same parity}\}\\ &=\begin{cases} \{\text{even integers}\}&\text{ if $x$ is even}\\ \{\text{odd integers}\}&\text{ if $x$ is odd.} \end{cases} \end{align}