Determine whether $G= \{ a+b\sqrt{p} \ \rvert \ a,b \in \mathbb{Q}, \ a^2+b^2 \neq 0, \ p \text{ is a fixed prime number} \} $ is a group I'm curious about proving some properties of a group for the following set with respect to multiplication of real numbers :
 $$G= \{ a+b\sqrt{p} \ \rvert \ a,b \in \mathbb{Q}, \ a^2+b^2 \neq 0, \ p \text{ is a fixed prime number} \}$$
I've managed to prove the closure in a not so very clean way. I considered the product: $$(a+b\sqrt{p})(c+d\sqrt{p})=ac+bdp+(bc+ad)\sqrt{p}$$
Now it is enough to prove that $(ac+bdp)^2+(bc+ad)^2 \neq 0$
Let's assume the opposite $(ac+bdp)^2 +(bc+ad)^2 = 0$. Then we consider the determinant of quadratic equation of $c$ that is :
$$c^2(a^2+b^2)+c(2abdp+2abd)+(b^2 d^2 p^2)=0$$
Its determinant is $D=(2abdp +2abd)^2-4(a^2+b^2)(b^2d^2p^2)$ which can be simplified to: $$D= -(2a^2d-2b^2dp)^2$$
But then the roots of this equation would be complex numbers and that is contradiction with $c \in \mathbb{Q}$.
Another way is to assume that $(ac+bdp)^2+(bc+ad)^2 = 0 \iff ac=-bdp,\ bc=-ad$ and try to arrive to contradiction from here.
Both these methods require either a lot of algebraic manipulation or a lot of case work.
Is there an easier method to prove that $G(\cdot)$ is closed?
Another important question I have is whether this can be extended to $p$ is any positive rational number? I don't see the significance of $p$ being a prime number.

Clearly, $G$ is a subset of $\Bbb{R}^\times$ since all of the numbers in $G$ are non-zero real numbers. To prove $a+b\sqrt p \in G$ is non-zero, assume, for sake of contradiction, $a+b\sqrt p=0$. Thus, if $b\neq 0$, $\sqrt p=-\frac a b$, which is a contradiction since $\sqrt p$ is irrational. Therefore, $b=0$, which means $a+b\sqrt p=0 \rightarrow a+0\sqrt p=a=0$, which gives us $a^2+b^2=0^2+0^2=0$, meaning $a+b\sqrt p\notin G$. Thus, no $a+b\sqrt p\in G$ is equal to $0$.
Note that here, we assumed $\sqrt p$ is irrational. This is true only if $p$ is not the ratio of two integer perfect squares. For example, $p=4$ or $p=\frac{9}{4}$ won't work because then, $\sqrt p$ is rational and the above proof fails. This is why they made $p$ a prime number: Because prime numbers are never perfect squares, so $\sqrt p$ must be irrational.
Since $G$ is a subset of $\Bbb{R}^\times$, to prove $G$ is closed, you can use properties of $\Bbb{R}^\times$. For example, you have:
$$(a+b\sqrt p)(c+d\sqrt p)=(ac+bdp)+(bc+ad)\sqrt p$$
Now, this shows that the product is in the form $m+n\sqrt p$ for $m, n\in \Bbb{Q}$. (To be clear, $m=ac+bdp$ and $n=bc+ad$.)
Then, to show $m^2+n^2 \neq 0$, we can use the fact that, in the real numbers, both $a+b\sqrt p \neq 0$ and $c+d\sqrt p \neq 0$, so since the product of two non-zero real numbers is non-zero, $m+n\sqrt p \neq 0$. Thus, either $m\neq 0$ or $n\neq 0$, so $m^2+n^2\neq 0$. This is a pretty succinct proof that $G$ is closed.
Finally, after proving $G$ is closed under multiplication, you must prove that the inverse of any element in $G$ is also in $G$. Let $a+b\sqrt p\in G$. We can find the inverse as follows:
$$\frac{1}{a+b\sqrt p}=\frac{a-b\sqrt p}{a^2-b^2p}=\frac{a}{a^2-b^2p}-\frac{b}{a^2-b^2p}\sqrt p$$
Thus, the inverse of $a+b\sqrt p$ is also in the form of $m+n\sqrt p$ for $m, n \in \Bbb{Q}$. Furthermore, we know that the reciprocal of any non-zero real number is non-zero, meaning $m+n\sqrt p\neq 0$ and thus $m^2+n^2\neq 0$. Thus, the inverse of $a+b\sqrt p$ is also in $G$.
Therefore, $G$ is closed under multiplication and inverses, so $G$ is a subgroup of $\Bbb{R}^\times$ and thus is a group in and of itself.
