$F:= \{ a+b\sqrt{7} \mid a,b \in \mathbb{Q} \}$ closed under addition, subtraction, multiplication, and division I am in my math class and I came across this problem on my past midterm. How can we prove that $F:=\{ a+b\sqrt{7} \mid a,b \in \mathbb{Q} \} $ is closed under addition, subtraction, multiplication, and division by a nonzero number in the set?
 A: Since $\Bbb Q$ is closed under addition, subtraction, and multiplication, then it shouldn't be hard to prove that $F$ is closed under those, as well. For division, do you know how to "rationalize" a denominator?
Since you know how to rationalize a denominator, then take any $a,b,c,d\in\Bbb Q$ so that $c+d\sqrt{7}\neq 0$. That is, we need $c,d$ not both zero. Note that this means that $c-d\sqrt{7}\neq 0$, as well. (Why?) Hence, we have $$\begin{align}\frac{a+b\sqrt{7}}{c+d\sqrt{7}} &= \frac{a+b\sqrt{7}}{c+d\sqrt{7}}\cdot\frac{c-d\sqrt{7}}{c-d\sqrt{7}}\\ &= \frac{(ac-7bd)+(bc-ad)\sqrt{7}}{c^2-7d^2}\\ &= \frac{ac-7bd}{c^2-7d^2}+\frac{bc-ad}{c^2-7d^2}\sqrt{7}.\end{align}$$ All you need to do is justify why those two fractions in the last lines are rational, and why $c-d\sqrt{7}\neq 0$ when $c,d\in\Bbb Q$ not both zero.
For that last part, try showing for a rational number $p$ and an irrational number $\alpha$, we have $p\cdot\alpha\in\Bbb Q$ if and only if $p=0$. Then, show that $\sqrt{7}$ is not rational.
A: The only somewhat tricky one is division. Let $x=a+b\sqrt{7}$, where $a+b\sqrt{7}\ne 0$. Note that $a-b\sqrt{7}\ne 0$, since $\sqrt{7}$ is irrational. (This needs proof.)
Then 
$$\frac{1}{x}=\frac{a-b\sqrt{7}}{(a-b\sqrt{7})(a+b\sqrt{7})}=\frac{a}{a^2-7b^2}+\frac{-b}{a^2-7b^2}\sqrt{7}.$$
Remark: To show that if $a$ and $b$ are not both $0$, then $a-b\sqrt{7}\ne 0$, maybe proceed as follows. Suppose to the contrary that $a-b\sqrt{7}=0$. By multiplying through by a suitable non-zero integer if necessary, we can assume that $a$ and $b$ are integers. We can also assume without loss of generality that the integers $a$ and $b$ have no common factor $\gt 1$. We obtain $a=b\sqrt{7}$, and therefore $a^2=7b^2$, Then $7$ divides $a^2$, but since $7$ is prime, $7$ divides $a$. Thus $a=7c$ for some $c$, and therefore $7c^2=b^2$. It follows that $7$ divides $b$, contradicting the fact that $a$ and $b$ have no common factor greater than $1$.
A: To do multiplication, given two numbers in the set with $a,b,c,d \in \mathbb Q, (a+b\sqrt 7)(c+d\sqrt 7)=ad+7bd+(ad+bc)\sqrt 7\in \mathbb F$
The others are similar.
A: Hint $\ $ For division,  $\rm\,\ 0\,\ne\,\alpha\alpha' =\, n\in \Bbb Z\ $ $\Rightarrow$ $\rm\  \dfrac{\beta}\alpha = \dfrac{\alpha'\beta}{\alpha'\alpha} = \dfrac{\alpha'\beta}n$
This is called rationalizing the denominator. It works because irrational algebraic number has a rational multiple (its norm). So we can  reduce division by an irrational to division by a rational.
Here's an example of realizing the denominator to prove that the real part is zero:
$$\displaystyle\ z\bar z\: =\: 1\ \:\Rightarrow\:\ \frac{(1-z)\:(1+\bar z)}{(1+z)\:(1+\bar z)}\: =\: \frac{\bar z-z}{|1+z|^2}\: =\: \frac{r\:i}{s},\ \ r,s\in \mathbb R$$
Generally, rationalizing denominators allows one to lift "existence of inverses of elements $\ne 0\:$" from a base field (e.g. $\mathbb R$) to an algebraic extension field (e.g. $\mathbb  C$). Namely, since $\mathbb R$ is a field, $\rm\ 0\ne r\in \mathbb R\ \Rightarrow\ r^{-1}\in \mathbb R\:,\:$ so
$$\rm 0\ne\alpha\in\mathbb C\ \ \Rightarrow\ \ 0\ne\alpha\alpha' = r\in \mathbb R\ \ \Rightarrow\ \ \frac{1}\alpha\ =\ \frac{\alpha'}{\alpha\:\alpha'}\ = \frac{\alpha'}r\in\mathbb C $$
Thus $\:$ field $\mathbb R\ \Rightarrow\:\: $ field $\mathbb C\ $ by using the norm $\rm\:\alpha\to\alpha\ \alpha'\:$ to lift existence of inverses from $\mathbb R$ to $\mathbb C\:.$ See this post for more.
