I saw the following example of an equivalence relation in a topology textbook:
Let $X$ be the unit square. Define $\sim$ as follows:
$(0,y)\sim(1,y)$ for all $y\in [0,1]$, and for any point $(x,y)\in X, (x,y)\sim(y,x).$
How would we show that this is truly an equivalence relation? I understand that reflexivity is true by definition of $\sim$ but I'm confused about we would proceed to show symmetry and transitivity.
Usually, I've seen equivalence relations as something like this:
Define $\sim$ on $\mathbb{R}$ as follows:
$x\sim y \iff x-y\in\mathbb{Z}$
I understand how to prove equivalence relations like the one above, by showing reflexivity, symmetry, and transitivity, but I'm stuck on how to proceed with the example from the topology textbook.