# I proved something wrong. If a and b are irrational proof that a + b is irrational or rational.

I'm practicing and Found this question.

If $$a$$ and $$b$$ are irrational, either prove or disprove that $$a + b$$ is irrational.

So I tried contradiction (to a + b is irrational).

Let $$a$$ and $$b$$ be arbitrary irrational numbers. Assume that$$a + b$$is rational.

Then $$a + b = x/y$$ for some integers $$x$$ and $$y$$.

then $$y(a + b) = x$$

and $$ay + by = x$$

Because $$x$$ was an integer $$ay$$ is an integer and $$by$$ is an integer.

then $$a$$ divides $$ay$$ and $$b$$ divides $$by$$. But that's impossible because a is irrational and b is irrational and y is an integer.

So $$a+b$$ must be irrational as well.

Now I know this is wrong. Because I found a counterexample as the solution.

$$sqrt(2)$$ + $$-sqrt(2)$$ = 0.

Can someone point out my logic mistake? Thank you very much in advance!

• Since you know a counterexample just examine your proof in this case till you reach a line that is false. You'll reach "Because $x$ was an integer $y\sqrt 2$ is an integer", which yields the contradiction that $\,\sqrt{2}\in\Bbb Q,\,$ since $\,y\neq 0.\,$ So that inference is false, which invalidates the proof. So your counterexample is also a counterexample to that claimed inference, i.e $\,x+y\in\Bbb Z\,\Rightarrow\, x,y\in\Bbb Z.\ \$ Dec 18, 2019 at 18:54
• The above method works generally to debug proofs when you know a counterexample, e.g. here and here and here for some worked examples and further discussion. Dec 18, 2019 at 19:00
• You can use "\sqrt n" instead of "sqrt n" to get $\sqrt n$, in case you didn't know about it. Dec 19, 2019 at 7:39
• @Yao Hao Ng, thanks I didn't know about it! Dec 19, 2019 at 16:50

$$ay$$ and $$by$$ need not be integers in your proof.

$$0=\sqrt 2 +(-\sqrt 2)$$. If sum of two numbers is an integer you cannot say that both numbers are integers.

• Thank you @Kabo Murphy, I'm sorry for being slow. If I would let x not be zero, can ay + by be not an integer and equal an integer? Like if x/y is a non zero rational number. Dec 18, 2019 at 12:31
• $1 =(\sqrt 2) +(1-\sqrt 2)$; any integer can be written as the sum of non-integers. @oliver Dec 18, 2019 at 12:33
• I see it now. Somewhat... :-D thank you! Dec 18, 2019 at 12:35

The mistake is in the step when you say "Because $$x$$ was an integer $$ay$$ is an integer and $$by$$ is an integer."

As your counterexample shows, the sum of two non-integer real numbers may be an integer.

• I got it from Kabo's kind second comment, thanks! Dec 18, 2019 at 12:32

The mistake is that $$\ ay\$$ and $$\ by\$$ cannot be integers since $$\ a\$$ and $$\ b\$$ are irrational and $$\ y\$$ a non-zero integer.

• Hi @Peter thank you. Yes, that was the idea of my proof that they cannot be integers. I just went on to go further. But if they can not be integers a + b can not be rational so it has to be irrational? I'm sorry for being slow Dec 18, 2019 at 12:28
• If $\ a\$ and $\ b\$ are irrational , $\ a+b\$ can be anything : irrational, rational and even an integer. But in your proof, you apparently used that $\ ay\$ and $\ by\$ are integers which is not the case. Dec 18, 2019 at 12:40