[Math] Reflexive but not Transitive relation

equivalence-relationsrelations

What is an example of a relation $\mathscr{R}$ on a set $S$ such that $\mathscr{R}$ is reflexive but not transitive?

Here is what I have come up with.

Let $S = \mathbb{Z}$. Then let $\mathscr{R} = \{(x,y) \in S\times S|(x > 0 \land y>0) \lor (x < 0 \land y < 0)\}$

Because $(2,2) \in \mathscr{R}$ (i.e reflexive).
But if $(-2,0) \in \mathscr{R}$ and $(0,2) \in \mathscr{R}$ but $(-2,2) \notin \mathscr{R}$ (i.e. NOT transitive)

Can anyone verify whether I have answered the question correctly or provide a much simpler example for a relation that is reflexive but not transitive on $\mathbb{Z}$?

Best Answer

The relation $R=\{(1,1),(1,2),(2,2),(2,3),(3,3)\}$ on the set $\{1,2,3\}$ is reflexive and not transitive.

If you want the relation to be on the set of integers, cheat as follows: consider the relation $R=\{(1,2),(2,3)\}\cup\{(n,n):n\in\mathbb Z\}$.