Define equivalence relation on set of real numbers so distinct equivalence classes are $[2k,2k+2)$ Define an equivalence relation $\sim$ on $\mathbb{R}$ such that the distinct equivalence classes of $\sim$ are $[2k,2k+2)$, where $k$ is an integer (Hint: find an appropriate function $f$ with all real numbers as its domain and let $R = \{(x,y)|f(x)=f(y)\}$.)
I feel like I can do these problems, but starting out I almost never know what is being asked. I am so utterly confused. I know what an equivalence relation is, and I know what equivalence classes are, but how can equivalence classes be $[2k,2k+2)$ with $k $ integer? I think I'm confusing myself further.
 A: When they say that $A $ is an equivalence class they mean that $a, b \in A \rightarrow a \sim b $. So they are asking you to create an equivalence relation $R $ for which the classes are the intervals of the form $[2k, 2k + 2) $.
Let $f(x) = \left\lfloor{\frac{x }{2}}\right\rfloor$
Now define the relation $R = \{(x, y) : f(x) = f(y)\} $.
That is, $xRy  \iff f(x) = f(y) $.
You should now be able to prove that $R $ is an equivalence relation and that its equivalence classes are as asked.
A: So we will follow the hint. We want a function that has the same value on two reals $x$ and $y$, if they only if they belong to the same interval $[2k, 2k+2)$. So for instance let us put $f(x) = k$ whenever $x \in [2k, 2k+2)$. You need to prove that this is a well-defined function, and that it answers your question.
A: RSerrao has already given a good answer to this question. If you are still confused about how intervals can be equivalence classes, remember that intervals are just sets of real numbers; for example, $[1,2)$ is the set $\{x \in \mathbb{R}|1\le x<2\}$. Since equivalence classes are sets, it is fine for intervals to be equivalence classes. I hope this clarifies the second part of your question!
