# Is $\mathbb Q(\sqrt p) = \{a + b\sqrt p\mid a,b \in\mathbb Q\}$ a field only for primes $p$?

Is $\mathbb Q(\sqrt p) = \{a + b\sqrt p\mid a,b \in\mathbb Q\}$ a field for every prime p?

Will it be a field for any natural number p or for just prime numbers p?

• It's a field for any $p$, but when $p$ is a perfect square, it is just $\mathbb Q$. Aug 21, 2017 at 16:52
• HInt: try to compute reciprocals by rationalizing the denominator. Aug 21, 2017 at 16:53
• Are you familiar with quotient rings and the First Isomorphism Theorem? Aug 21, 2017 at 17:01

For any $$\alpha\in\mathbf Q$$, $$\mathbf Q(\sqrt \alpha)$$ is a field. This field equal to $$\mathbf Q$$ if $$\alpha$$ is a square in $$\mathbf Q$$.
If $$\alpha$$ is not a square, $$\mathbf Q(\sqrt \alpha)$$ is a quadratic extension of $$\mathbf Q$$, and there exists a unique square-free integer $$d$$ such that $$\mathbf Q(\sqrt \alpha)=\mathbf Q(\sqrt d)$$.
Yes, if $p$ is a prime $X^2-p$ is irreducible and $\mathbb{Q}(\sqrt p)=\mathbb{Q}[X]/(X^2-p)$. The same argument shows that it is a field if $p$ is not a square. if $p$ is a square it is also a field since $\mathbb{Q}(\sqrt p)=\mathbb{Q}$.