[Math] If the sum and product of two rational numbers are both integers, then the two rational numbers must be integers.

arithmeticelementary-number-theoryintegersrational numbers

I would appreciate if somebody could help me with the following problem.

Prove that if the sum and product of two rational numbers are both integers, then the two rational numbers must be integers.

Thanks!

Best Answer

This may not be the simplest proof, but I think it's pretty. Let your two rational numbers be $r,s$. Then the polynomial $f(x)=(x-r)(x-s)=x^2-(r+s)x+rs$ has integer coefficients by your hypotheses. By Gauss' Lemma, this polynomial must be reducible over the integers, and hence $r,s$ are both integers.