# Proof that when $x + y$ are irrational then $x$ and $y$ are irrational

I want to prove by contrapositive that:

Proof that if $x + y$ are irrational then $x$ and $y$ are irrational. $x,y \in \mathbb{R}$

I did the following:

Negation of the statement: $x + y$ are rational then $x$ and $y$ are also rational

$\exists m,n,i,j \in \mathbb{Z}$ $gcd(m,n)=1$ $gcd(i,j)=1$

Then $x = m/n$ and $y = i/j$

So when, $x + y = \frac{m}{n} + \frac{i}{j} = \frac{m*j + i*n}{n*j}$

Therefore if the gcd of $gcd(m,n,i,j)=1$ then we can conclude that the number is rational.

q.e.d

Is this proof formally correct?

• let $x=a+\sqrt b,y=c-\sqrt b$ – lab bhattacharjee Sep 12 '13 at 18:32
• it is obviously false. Let $x\in \mathbb{R}\setminus \mathbb{Q}$ and $y=0 \in \mathbb{Q}$ – Dominic Michaelis Sep 12 '13 at 18:32
• Only one invariant : irrational+ rational =irrational – lab bhattacharjee Sep 12 '13 at 18:33
• The correct negation is that when $x+y \in \mathbb{R}\setminus \mathbb{Q}$, then at least one of $x,y$ are irrational – Dominic Michaelis Sep 12 '13 at 18:33
• Thx a lot for your answers!!! – Kare Sep 12 '13 at 18:37

The negation would not be the statement that if $x+y$ are rational, then $x$ and $y$ are also rational. $A$ implies $B$ is equivalent to "not $B$" implies "not $A$": This would be: if either $x$ or $y$ is rational then $x+y$ is rational. Unfortunately this is wrong. Take $x=1$ and $y=\sqrt{2}$.

Edit: The second claim that $x+y\in \mathbb{Q}$ implies $x,y\in \mathbb{Q}$ is not true either. For $x=\sqrt{2}$ and $y=1-\sqrt{2}$ we have $x+y=1\in \mathbb{Q}$, but not $x$ and $y$ rational.

• Sorry that I cannot upvote you, I have to less votes yet. However, how to prove by contrapositive then? – Kare Sep 12 '13 at 18:40
• Yeah it was definitely helpful. However, please would you be so kind to add how to prove by contrapositive in the formal way? – Kare Sep 12 '13 at 18:41
• What do you want to be proved ? – Dietrich Burde Sep 12 '13 at 18:43
• My problem is, that I do not know how to write this prove by contrapositive. I tried, $x+y = \frac {m}{n} + y$ which gives me a rational number. Is this the correct formal prove by contrapositive? – Kare Sep 12 '13 at 18:47

The statement

If $x+y$ is irrational, then $x$ and $y$ are irrational.

is false (as witnessed by Dietrich Burde's counterexample). Therefore, it shouldn't be possible to prove this statement.

However

If $x+y$ is irrational, then $x$ is irrational or $y$ are irrational (or both).

is true. This is formally written: $$x+y \not\in \mathbb{Q} \implies (x \not\in \mathbb{Q}) \vee (y \not\in \mathbb{Q}).$$

In this case, the contrapositive would be $$\neg\left((x \not\in \mathbb{Q}) \vee (y \not\in \mathbb{Q})\right) \implies \neg(x+y \not\in \mathbb{Q}).$$ Or equivalently $$\neg(x \not\in \mathbb{Q}) \wedge \neg(y \not\in \mathbb{Q}) \implies \neg(x+y \not\in \mathbb{Q})$$ by de Morgan's Law. This is equivalent to $$(x \in \mathbb{Q}) \wedge (y \in \mathbb{Q}) \implies x+y \in \mathbb{Q}$$ since a non-irrational number is rational (assuming that $x$ and $y$ were taken as real numbers all along).

Proof: If $x \in \mathbb{Q}$ and $y \in \mathbb{Q}$, then, by definition of a rational number, we can write $$x=\frac{a}{b} \qquad\text{and}\qquad y=\frac{b}{c}$$ for some integers $a,b,c,d$ with $b \neq 0$ and $c \neq 0$.

Hence \begin{align*} x+y &= \frac{a}{b}+\frac{c}{d} \\ &= \frac{ad}{bd}+\frac{bc}{bd} \\ &= \frac{ad+bc}{bd}. \end{align*} Since $ad+bc$ is an integer, and $bd$ is a non-zero integer, we have that $x+y \in \mathbb{Q}$.