# When is $\sqrt a\cdot \sqrt b$ rational?

At first I thought $\sqrt a\cdot\sqrt b$ is rational only when both $a$ and $b$ are squares of rational numbers. But then the example of $\sqrt2$ comes in and if $a=b=\sqrt2$, $\sqrt a\cdot\sqrt b$ is a rational number.

So what's the full version? Is $\sqrt a\cdot\sqrt b$ rational only when a and b are squares of rational numbers and $a=b$?

thanks!

• $\sqrt{a}\cdot\sqrt{b}=\sqrt{ab}$ , so $\sqrt{a}\cdot\sqrt{b}$ is rational, if and only if $ab$ is the square of a rational number. Nov 7 '16 at 12:00
• $a=b$ is not neccessary, neither must $\sqrt{a}$ or $\sqrt{b}$ be rational. Consider $a=2$ and $b=18$. Nov 7 '16 at 12:01

No, the numbers don't need to be squares of rational numbers. For example,

$$\sqrt{\frac{16}{e}}\cdot \sqrt{e}$$

is a rational number.

In fact, if $a\neq 0$, then $$\sqrt{a}\cdot\sqrt{\frac{q^2}{a}}$$ is a rational number if $q$ is a rational number.

And it goes the other way too, i.e. if $a\neq 0$ and $\sqrt{a}\sqrt{b}$ is a rational number, then $b=\frac{q^2}{a}$ for some rational number $q$, since

$$\sqrt a\sqrt b = q\in\mathbb Q\\ ab=q^2\\ b=\frac{a}{q^2}$$

$\sqrt {a}\sqrt {b} = \sqrt {ab}$

Now the square root of a real number is only a rational if $ab$ is the square of some rational number. Otherwise it is irrational.

• No, $ab$ can also be $0.25$, which is not a perfect square.
– 5xum
Nov 7 '16 at 12:10
• @5xum well of course. I phrased my thoughts poorly. Edited the answer to what I really meant.
– RGS
Nov 7 '16 at 12:34