$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?

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$.
