I am going through some practice questions and am having trouble to finding distinct equivalence classes and this is my understanding so far.
Let S be a nonempty subset of Z, and let R be a relation defined on $S$ by $xRy$ if $3 | (x + 2y)$.
Find the distinct equivalence classes for $S=\{−7, −6, −2, 0, 1, 4, 5, 7\}$
Now, I understand that for $3 | (x + 2y) \equiv$ $$x\equiv -2y(mod 3)$$
So that means, I would have to find combinations of elements from the set S such that $-2y$ must have a remainder $x$ when divided by 3? However for one of the solutions given, $$[5] = \{5,-7\}$$
If I am not mistaken, for $-2(5) = - 10; -2(-7) = 14$ and $$-10(mod3)=2$$ $$14(mod3)=2$$.
So, then $[2] = \{5,-7\}$ right? Or am I missing something that I don't understand. Also, from further observation, anything divided by 3 can only have remainder of 0,1 and 2. Then [5] = ... doesn't make sense. If anyone could clarify, that would be helpful! Thanks.
No; this means that $x$ and $-2y$ must have the same remainder when divided by $3$. For example, both $5$ and $-2(-7)$ have the remainder $2$ when divided by $3$, so $5$ and $-7$ are in the same class.
$2$ doesn't belong to $S$, so technically the "class of $2$", which you denoted $[2]$, is meaningless in this context.
By definition, $[5]$ means "the equivalence class that contains $5$." Hopefully the above remarks make it clearer that this does makes sense.