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.

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.
