# Showing $x-y\in\mathbb{Q}$ is an equivalence relation?

How would one show the the following is an equivalence relation.

The relation R on the real numbers given by xRy iff number $x-y\in\mathbb{Q}$.

This is what I did.

Reflexive

Let $x \in \mathbb{R}$ and $y\in \mathbb{R}$ then $x-y \in \mathbb{Q}$ is the the same as $x-y \in \mathbb{Q}$

Thus xRx yRy

Symmetric

Let xRy then $x-y \in \mathbb{Q}$ is the same as

$y-x \in \mathbb{Q}$ thus yRx.

Transitive x,y,z are real numbers/

Let xRy be $x-y \in \mathbb{Q}$, then let yRz be $y-z \in \mathbb{Q}$. Thus

$x-z \in \mathbb{Q}$ and in conclusion xRz showing transitive.

Now I have to find the equivalence class of the following

$0=\{1/2-1/2,2-2,3-3\}$ any real minus itself

$1=\{2-1,3-2,4-3\}$

$\sqrt{2}$= empty set b/c it cannot be written as a rational.

• You have a problem with the reflexive property. Do you see it? – mfl Jul 3 '14 at 17:05
• Hmm I have to look – Fernando Martinez Jul 3 '14 at 17:09
• If you look at thecorrect answers more closely, you may notice that the proofes hinge on the fact that $\mathbb Q$ is a subgroup of $\mathbb R$ (under addition): You make use of the neutral element for reflexivity, of inverses for symmetry and of closedness under addition for transitivity. – Hagen von Eitzen Jul 3 '14 at 17:15

Your "reflexive" proof is wrong. It should read $$\forall x\in\mathbb{R}, \quad x-x=0\in\mathbb{Q}\implies xRx$$

I'm not sure if this was implied, but for transitivity the correct argument is \begin{align}xRy, \;yRz&\implies x-y,y-z\in\mathbb{Q} \\ &\implies (x-y)-(y-z)\in\mathbb{Q} \\ &\implies x-z\in \mathbb{Q} \\ &\implies xRz.\end{align}

The equivalence class of a number is the set of all numbers at a rational distance away from it. In other words, $$\bar{0}=\mathbb{Q}, \\ \bar{1}=1+\mathbb{Q}=\mathbb{Q}=\bar{0}, \\ \overline{\sqrt 2}=\sqrt 2 +\mathbb{Q}.$$ I have used "coset" notation. That $1+\mathbb{Q}=\mathbb{Q}$ follows from $1\in\mathbb{Q}$.

• yes these proof make sense except the abstract algebra part but that is my fault as I have not learned that content. – Fernando Martinez Jul 3 '14 at 17:24
• @FernandoMartinez No problem, the notation just means this: $$a+\mathbb{Q}=\{a+q: q\in\mathbb{Q}\}$$ – user142299 Jul 3 '14 at 17:25
• I see that makes sense. One thing is how did you know the equivalence is the set of all numbers a rational distance away from say zero. – Fernando Martinez Jul 3 '14 at 17:29
• @FernandoMartinez For something to be equivalent to $x$, it needs to satisfy (call it $y$) $x-y\in \mathbb{Q}$. So $y$ has to be $x+\text{some rational number}$. – user142299 Jul 3 '14 at 17:32
• I think I get it so what the relation is saying if y=1 is your equivalence class,and 1-x is in a rational number, then y=1 will be equal to x+rational number. – Fernando Martinez Jul 3 '14 at 17:51

Your proof of reflexivity is incorrect. To show that $xRx$, show that $x-x$ is rational (and it is because $0 \in \mathbb Q$). Your proof of symmetry and transitivity should make some reference to the fact that $\mathbb Q$ is closed under negatives and addition, respectively.

Now, your discussion of the equivalence classes of $0$, $1$, and $\sqrt{2}$ are incorrect. The equivalence class of $x$ is the set of all $y$ such that $x R y$. So we are looking for all $y$ such that $y - x = q$ is rational. Solving this equation, we're looking for all numbers of the form $x + q$, for $q$ rational. If you know some abstract algebra, the equivalence class in this case is the coset $x + \mathbb Q$.

Therefore, the equivalence class of $\sqrt{2}$ is not empty ($\sqrt{2}$ should be in that set, at the very least), but rather should include all numbers of the form $\sqrt{2} + q$ for $q \in \mathbb Q$. This thought process should be similar for the other two cases.

• I mean what would be an example of a number in my equivalence cases? I know they are infinite. But what would be a number to help me use my intuition to see through this theory. – Fernando Martinez Jul 3 '14 at 17:22
• one thing is how did you go from $x+y\in\mathbb{Q}$ to $y-x=q$ I do not see it, I am guessing the zero is an X or Y in my relation – Fernando Martinez Jul 3 '14 at 17:27
• In reference to equivalence classes, like Andrew said, your equivalence classes should look like sets of the form $x + q$ for $q \in \mathbb{Q}$. Essentially, this is $\mathbb{Q}$ "shifted" by $x$. So $\sqrt{2} + \mathbb{Q}$ contains things like $\sqrt{2} + \frac{1}{3}, \sqrt{2} + \frac{1}{2}, \sqrt{2} + 1$, etc. – Scott Caldwell Jul 3 '14 at 17:33
• so is y my equivalence class – Fernando Martinez Jul 3 '14 at 17:44

Your phrasing of things is a little odd; I think you might be misunderstanding something.

For example, to prove the transitive property, you need to assume that you start with $x,y,z$ such that $xRy$ and $yRz$ and make an argument that eventually concludes $xRz$. e.g. you might write

Let $xRy$ and $yRz$. Therefore ... and thus $xRz$.

or better yet,

Let $x,y,z$ satisfy $xRy$ and $yRz$. Therefore ... and thus $xRz$.

Let $xRy$ be $x - y \in \mathbf{Q}$
sound more like you're stating a definition of $R$ rather than, for example, stating the hypothesis that you have variables $x$ and $y$ that satisfy $xRy$, and then inferring that $x - y \in \mathbf{Q}$.