How to show that switching the ring of integers for the field of rationals will yield a field? Given:

$( \{a+b \sqrt{n}\,|\,a,b\in \mathbb{Z} \},+,\times)$ and $( \{a+bi\sqrt{n}\,|\,a,b\in \mathbb{Z} \},+,\times)$ with $n\in\mathbb{N}^+$.
Show that in the given example, if we switch the ring of the integers
for the field of rational numbers (e.g if we take $a,b\in\mathbb{Q}$)
we will obtain fields.

I proceded from the definition of a field:

A field is a ring $(K,+,\times)$ that has an inverse multiplicative
for every $n\in K\neq 0$ so that $x\times y=1$.

I thought that the demonstration consist in finding a $y$ such that $(a+b \sqrt{n})\times y=1$, solving for $y$, I'll obtain:
$$y=\frac{1}{a+b \sqrt{n}}$$
Which is a rational number for some $n$'s, is that correct? I'm starting to doubt it because I guess for some $n$'s (e.g. $n=2$), we'll have a real number.
 A: You don't need $y$ itself to be rational (that usually isn't possible). You need $y$ to be of the form $$c+d\sqrt n$$ for some rationals $c,d$. In the case that $n$ isn't a perfect square, try rationalizing the denominator of $$y=\frac1{a+b\sqrt n}$$ to find this form of $y$. If $n$ is a perfect square, then the structure should be far more familiar. (What is it?)
A: First of all, there is no need to do this separately: just take $n\in\mathbb{Z}$ and the two cases can be treated in the same way.
The simple case is when $n$ is a perfect square: $n=m^2$. Then the set you want to verify to be a field is just $\mathbb{Q}$.
So we can assume that $n$ is not a square. Therefore
$$
a^2 - nb^2\ne0
$$
for all $a,b\in\mathbb{Q}$. Otherwise
$$
n=\biggl(\frac{a}{b}\biggr)^2
$$
which is impossible. (Proof?)
Next, consider
$$
y=\frac{1}{a+b\sqrt{n}}
$$
that you know is defined in $\mathbb{C}$; we want to reduce it to the form $y=c+d\sqrt{n}$ where $c,d\in\mathbb{Q}$. Just observe that
$$
y=\frac{a-b\sqrt{n}}{a^2-nb^2}
$$
and that the denominator is non zero. Therefore
$$
c=\frac{a}{a^2-nb^2},\qquad d=\frac{-b}{a^2-nb^2}
$$
are the rational numbers you wanted.
Also you should check closure for addition and multiplication, which are easy.
