Let R or $\sim$ be the relation defined on Z by
$$x\sim y\text{ if } |x-y| \le 3$$
Is $\sim$ an equivalence relation?
It is reflexive and symmetric if I did it correctly. However, I am having doubt about transitive.
Transitive:
Assume $a\sim b$ and $b\sim c$, then, $$|a-b|\le 3\text{ and }|b-c|\le 3$$ $$|a-c|\le |a-b|+|b-c|\le 3+3 =6$$
This is where I am stuck at. I am not sure if I should conclude $|a-c|\le 6$ and it is not transitive.
Take $x=-3,y=0,z=3$. Then, $x \sim y$ since their difference is exactly 3, and $y \sim z$ for the same reason. But $x \not\sim z$ since their difference is exactly 6.