Originally Posted by

**emakarov** Caveat: what I am offering is not a manual procedure set in stone; it's just a way to visualize the situation and find an answer.

It makes sense to have a loop at every vertex. They correspond to (0,0), (1,1), (2,2) and (3,3).

And a line from 2 to 1. In fact, we are talking not about lines but about arrows: one from 1 to 2 and one back.

(1,2) and (2,1) are not elements of the set. They are elements of the relation, whereas equivalence classes are subsets of the original *set*, not relation. This would mean that 1 and 2 are in one equivalence class. The other two classes are singletons (one-element sets) {0} and {3}.

In general, suppose you draw a diagram of a relation as described above. Then the relation is an equivalence relation if: (1) every vertex has a loop, (2) for every arrow from a to b there is an arrow back from b to a, and (3) if you can go from a to b in several steps, you can also do this in one step. These conditions are reflexivity, symmetry and transitivity of the relation expressed in terms of arrows and vertices. Given such diagram, an equivalence class consists of all vertices that are interconnected.