# Can $\sqrt{n} + \sqrt{m}$ be rational if neither $n,m$ are perfect squares?

Can the expression $\sqrt{n} + \sqrt{m}$ be rational if neither $n,m \in \mathbb{N}$ are perfect squares? It doesn't seem likely, the only way that could happen is if for example $\sqrt{m} = a-\sqrt{n}, \ \ a \in \mathbb{Q}$, which I don't think is possible, but how to show it?

• For a general case see this question and an earlier version May 31, 2014 at 11:49
• Nov 25, 2018 at 17:46

Squaring we get, $m=a^2+n-2a\sqrt n\implies \sqrt n=\frac{a^2+n-m}{2a}$ which is rational

• where is this formula? Mar 8 at 13:36
• @AviPars, This is also similar : proof by contradiction en.wikipedia.org/wiki/… Mar 8 at 13:37
• Thank you so much! Mar 8 at 19:58

If $$\sqrt{n} + \sqrt{m}$$ is rational, then since
($$\sqrt{n} + \sqrt{m})(\sqrt{n} - \sqrt{m}) = n - m,$$
$$\sqrt{n} - \sqrt{m}$$ is rational. Thus
$$\sqrt{n}, \sqrt{m}$$ are rational, n,m are squares.

• Just wanted to say that this is a surprisingly slick solution, and deserves more recognition. Nov 28, 2018 at 6:44
• @platty This is very well-known and probably has been mentioned here over a hundred times, for example see this 7-year-old answer for a more general perspective. Jun 13, 2019 at 23:16

Assume $m$ is a non-square integer. Then $\sqrt{m}$ is irrational, and if $x=\sqrt{m}+\sqrt{n}$, then

$$(x-\sqrt{m})^2=x^2-2x\sqrt{m}+m=n$$

Or

$$\frac{x^2+m-n}{2x}=\sqrt{m}$$

If $x$ is rational, then the LHS is also rational. However the RHS is irrational, contradiction, so $x$ is irrational.

Same argument as here and here. It should be put in the FAQ :-)

## Nice way to see thinks

Assume that, $$(\sqrt{n}+\sqrt{m})=\frac{p}{q}$$ Then we have $$(\sqrt{n}+\sqrt{m})=\frac{p}{q}\in\Bbb Q \implies n+m+2\sqrt{nm} =(\sqrt{n}+\sqrt{m})^2 =\frac{p^2}{q^2}\in\Bbb Q\\\implies \sqrt{nm} =\frac{n+m}{2}+\frac{p^2}{2q^2}\in\Bbb Q$$

But if $nm$ is not a perfect square then $\sqrt{nm}\not \in\Bbb Q ,$ (This can be easily prove using the fundamental theorem of number theory: Decomposition into prime numbers) Hence in this case we have $$\sqrt{n}+\sqrt{m}\not \in\Bbb Q$$

Remark $~~~~~$1. $mn$ can be a perfect square even though neither $n$ nor $m$ is a perfect square. (see the example below)

1. We can still have $\sqrt{n}+\sqrt{m}\not\in \Bbb Q$ even if $mn$ is perfect square.(see the example below)

Example: $n= 3$ and $m = 12$ are not perfect square and $nm = 36 =6^2.$ Moreover, $$\sqrt{n}+\sqrt{m} = \sqrt{3}+\sqrt{12} =3\sqrt 3 \not \in\Bbb Q$$

It's easy to show that if the result is rational, it has to be natural.

Hint: $$m=(\lfloor\sqrt{m}\rfloor+\epsilon)^{2}=\lfloor\sqrt m \rfloor ^2+2\epsilon \lfloor\sqrt m \rfloor + \epsilon^2$$ $$n=(\lceil \sqrt n \rceil-\epsilon)^2=\lceil \sqrt n \rceil^2-2\epsilon\lceil \sqrt n \rceil+\epsilon^2$$ Subtract these two from each other and show that $\epsilon$ has to be rational.

• m+n+2*sqrt(m*n) has to be rational Sep 22, 2014 at 13:53