Finding the equivalence classes of a seemingly infinite set

discrete mathematicsequivalence-relationsrelations

I've encountered this question:

$A = \mathbb Z$ and $R = \{\, (x,y) \mid x + x^2 = y + y^2 \,\}$ is an equivalence relation on $A$. What are its equivalence classes?

The relation is an equivalence relation. To my understanding, every pair $(x,x)$ should belong to $R$ and also the pair $(-1,0)$. What are the equivalence classes and wouldn't they be infinite? According to my understanding of the definition, they are, but I don't think that is the correct answer.

Thank you very much.

Best Answer

One way we can go about it is to pick a particular number, and find the numbers $R$-equivalent to it.

For example, if I want the numbers $R$-equivalent to $0,$ I need to find all $y\in\Bbb Z$ such that $0+0^2=y+y^2,$ meaning that $0=y+y^2=y(y+1),$ so $y=0$ or $y+1=0,$ so $y=0$ or $y=-1.$ So, one $R$-equivalence class is $\{-1,0\}.$

How about another? We've already taken care of $0$ and $-1,$ so how about $1$? Well, for that, we want all $y\in\Bbb Z$ such that $1+1^2=y+y^2,$ so $2=y+y^2,$ so $0=y^2+y-2=(y-1)(y+2),$ so $y-1=0$ or $y+2=0,$ and so another $R$-equivalence class is $\{-2,1\}.$

The more we try, the more we should see that each equivalence class has two elements, and that they follow a pattern. One key observation, though, is that we are always able to rearrange our equation into a form with the left-hand side equal to $0$ and the right-hand side a product of two distinct factors. This suggests that we might be able to do that ahead of time, and thereby find all equivalence classes at once!

Indeed, the following are equivalent: $$x+x^2=y+y^2\\x-y=y^2-x^2\\x-y=(y-x)(y+x)\\0=(y-x)(y+x)+y-x\\0=(y-x)(y+x+1)$$ Thus, $x$ and $y$ are $R$-equivalent if and only if one of the following equivalent conditions holds:

  • $0=(y-x)(y+x+1)$
  • $y-x=0$ or $y+x+1=0$
  • $y=x$ or $y=-x-1$

From this last, we can show that every equivalence class has exactly two elements, and in particular that the equivalence classes will be the sets $\{x,-x-1\}$ for integers $x\ge 0.$