I am trying to determine if the following sets are equivalence relations:
Set: $B=\mathbb{R}$
Relation: $x \sim y$ if $|x-y|\leq 1$
Reflexive property: For $x \sim x$, we have $|x-x|\leq 1=|0|=0\leq1$ so this is true.
Symmetry property: We need to ensure that if $x \sim y$ then $y \sim x$. This is also true since we have $|y-x|=|-(x-y)|=|x-y|$ and we know that $|x-y|\leq1$ so symmetry is satisfied.
Transitive property: I always struggle with this part. I think what I need to show is that if $|x-y|\leq1$ and $|y-z|\leq1$, then $|x-z|\leq1$. If my assumption is right, how would I go about doing this? My idea was to write $|x-z|\leq1$ as $|(x-y)+(y-z)||\leq1$. Since $(x-y)$ and $(y-z)$ could both potentially equal something that adds to a value larger than 1, transitivity is NOT satisfied so this is not an equivalence relation. However, I am not sure if this is the right approach...
Set: $B=M_n(\mathbb{R})$, the set of $n \times n$ matrices with real entries, where $n$ is some fixed positive integer.
Relation: $X \sim Y$ if $Tr(X-Y) \in\mathbb{Z}$
Reflexive property: For $x \sim x$ we have $Tr(X-X)=0\in \mathbb{Z}$ so the reflexive property is satisfied.
Symmetry property: We need to ensure that if $x \sim y$ then $y \sim x$. We have $Tr(Y-X)=-Tr(X-Y)$ which is still in $\mathbb{Z}$ so symmetry is satisfied
Transitivity: Again, this is what I struggle with. I believe that here, we need to check that if $Tr(X-Y)\in \mathbb{Z}$ and $Tr(Y-Z)\in \mathbb{Z}$, then we need to show that $Tr(X-Z)\in \mathbb{Z}$.
My idea was to write $Tr(X-Z)$ as $Tr(X)-Tr(Z)$. However, I am not sure if this implies that $Tr(X)\in \mathbb{Z}$ and $Tr(Z)\in \mathbb{Z}$ which implies transitivity.
Any guidance on this would be very much appreciated! Also, is my work on the other properties right?