# Conjecture: if $a+b$ and $ab$ are rational, $a$ and $b$ are rational

I can't find a rigorous proof but I have a feeling it's true.

Informal argument: Suppose $a+b$ and $ab$ are rational, $a$ and $b$ are irrational (since just one can't be irrational). Then $a$ and $b$ must have irrational "parts" that "cancel out" eg. $a = \frac4\pi$, $b = \pi$, $ab = 4$, which is rational. But then $a + b$ ends up being irrational, since the denominator has the irrational part squared and the numerator does not.

Obviously, this isn't a proper proof at all, but I can't think of any examples of numbers where this argument wouldn't hold true. Can someone provide a proof or counterexample?

• $\sqrt2$ and $-\sqrt2$. Jul 9 '14 at 9:29
• Just a remark: what you can say though, is that $a,b$ are algebraic over $\mathbb{Q}$, since they are zeros of the polynomial $x^{2} - 2(a+b)x +ab$, which has by assumption rational coefficients.
– m.g.
Jul 9 '14 at 9:35
• @Sawarnik I feel stupid now... Jul 9 '14 at 21:51

$$a = 1 - \sqrt 2, \\ b = 1 + \sqrt 2 \\ a + b = 2, \\ a b = 1 - 2 = -1$$
$a + b$ and $a b$ are rational, but $a$ and $b$ are not rational.
If $s=a+b$ and $p=ab$ are rational, then $a$ and $b$ are roots of the polynomial $X^2-sX+p$ which has rational coefficients.
Then $a$ and $b$ are irrational if and only if the discriminant $D=s^2-4p$ is not a perfect square in $\mathbb{Q}$. Thus $$a=\frac{s}{2}+\frac{\sqrt{D}}{2},\qquad b=\frac{s}{2}-\frac{\sqrt{D}}{2}$$ (or conversely), so your conjecture is true, provided we interpret irrational part with a loose meaning. To wit, what's the irrational part of $\sqrt{2}$? Is it $\sqrt{2}$ or $\sqrt{2}-1$, as $\sqrt{2}=1+(\sqrt{2}-1)$?
More rigorously, when $a$ and $b$ are irrational, there is a field automorphism in $\mathbb{Q}[a,b]$ sending $a$ to $b$.