Let $A$ = $\{-4, -3, -2, -1, \space 0, \space1, \space2, \space3, \space4\}.$ $R$ is defined on $A$ as follows: For all $(m, n) \space\epsilon\space A,$
$\space \space mRn \Leftrightarrow 4 \space\mid \space(m^{2} - n^{2})$
Find the distinct equivalence classes of $R$.
What I did:
- $m^{2} - n^{2} \Leftrightarrow m^{2} = n^{2} \space mod \space 4 \Leftrightarrow m = n \space mod \space 2 \Leftrightarrow m - n = 2k, \space k \space\epsilon\space \mathbb{Z}$
$[\space0\space]$ = $\{x \space \epsilon\space A \space\mid -x=2k\}$ (The numbers in this equivalence class differ from zero by a multiple of 2)
Therefore, $[\space 0\space]$ = $\{-4 ,-2 , \space0, \space2, \space4\}$
$[\space 1\space]$ =$\{x \space\epsilon\space A, \space\mid \space1-x=2k \}$
Therefore, $[\space 1\space]$ = $\{-3, -1, \space1, \space3 \}$
Questions:
I wanted to know if my working is right and if there is another way of solving this question.
In addition, is there a way of knowing from the get-go how many equivalence classes a relation to a particular set have?
Your working is right. There is just a typo : $$"\color{red}{4|}m^{2} - n^{2} \Leftrightarrow ..."$$
But I think this type of example deserves to be illustrated.
So we have a partition of $A$ $$A=A_0\cup A_1$$ with $\color{blue}{[0]=A_0=\{-4,-2,0,2,4\}}$ and $\color{red}{[1]=A_1=\{-3,-1,1,3\}}$
$\mathcal A\subset A\times A$ is represented on the top corner left.
As to whether there is a way to know from the start how many equivalence classes, I don't know of a general one.