Linear/Discrete Math Equivalence Classes I am confused on this question:

For each of the following binary relations on $\Bbb R$, state whether or not the relation is an equivalence relation. If it is an equivalence relation, describe the set of equivalent classes. If it is not an equivalence relation, explain why not.
$x \sim y$ if and only if $x-y \in  \Bbb Z$.

I don't get why the answer is [0,1)
 A: The set $[0,1)$ is not really the set of equivalence classes, it is instead $$\big\{\{x+n:n \in \mathbb{Z}\}:x \in [0,1)\big\}.$$
It seems $e \in [0,1)$ is being used as shorthand here for the equivalence class $\{e+n:n \in \mathbb{Z}\}$.
For any real number $r$, there exists one an only one real number in $[0,1)$ which is equivalent to $r$ under the equivalence relation $\sim$: specifically, for positive reals, it is the real number obtained by subtracting the integer component of $r$ from $r$ (e.g. $3.14159$ is equivalent to $0.14159$), and for negative reals $-r$ (where $r$ is positive), it is equivalent to the real number obtained by subtracting the integer component of $1-r$ from $r$ (e.g., $-0.7$ is equivalent to $0.3$).  This determines the equivalence class.
Here's a figure to illustrate:

Here the bouncy line identifies the real numbers equivalent to, say, $2.4124$, i.e., the real numbers that differ from $2.4124$ by an integer.  Precisely one of them falls in the interval $[0,1)$.
A: $\def\zz{\mathbb{Z}} \def\rr{\mathbb{R}}$There are two issues here. The first is that you should know why $( \{ x+n : n \in \zz \} : x \in [0,1) )$ is really the sequence of all the equivalence classes. Specifically you need to check:


*

*Every element in $\rr$ is in one of the claimed classes. Rebecca gave a nice illustration of that, but you need to actually work out the proof yourself.

*Any two elements in each class are related by the equivalence relation.

*Any two classes in the sequence are distinct.
The third condition is needed because if you just wanted the set of equivalent classes you would just take $\{ \{ x+n : n \in \zz \} : x \in \rr \}$ because duplicates are not counted when forming a set. Since the answer you are given is $[0,1)$, clearly you were expected to list each equivalence class only once.
The second issue is how to figure out the equivalence classes. In general it is ad-hoc, but you always just start with the definition of the set of equivalence classes, namely $\{ \{ y : y \sim x \} : x \in S \}$, where $\sim$ is the equivalence relation on a set $S$, and then try to see which are duplicates.
A: If $f:X\rightarrow Y$ is a function then the relation $\sim$ defined by: $$a\sim b\iff f(a)=f(b)$$ is an equivalence relation on $X$. 
This is not difficult to prove. 
Its equivalence classes are sets of the form $\{x\in X\mid f(x)=f(a)\}$ (the fibres of function $f$). 
So for proving that the relation mentioned in your question is an equivalence relation it is enough to find a suitable function. 
Here you could use function $f:\mathbb R\rightarrow\mathbb R$ prescribed by: $$x\mapsto x-\lfloor x\rfloor$$
This because it is evident that: $$x-y\in\mathbb Z\iff x-\lfloor x\rfloor=y-\lfloor x\rfloor$$
