Nature of algebraic structure I am given $G = \{x + y \sqrt7 \mid x^2 - 7y^2 = 1; x,y \in \mathbb Q\}$ and the task is to determine the nature of $(G, \cdot)$, where $\cdot$ is multiplication. I'm having trouble finding the inverse element (I have found the neutral and proven the associative rule.

For $a+b\sqrt{7}$ we seek $x+y\sqrt{7}$ such that $(a+b\sqrt{7})(x+y\sqrt{7})=1$. Expanding these brackets and comparing coefficients gives
$$\begin{align} ax+7by &= 1 \\ bx+ay &= 0 \end{align}$$
It is then just a task of solving for $x$ and $y$.
This can be done using matrices:
$$\begin{align} \begin{pmatrix} a & 7b \\ b & a \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} 1 \\ 0\end{pmatrix} \\ \Rightarrow \begin{pmatrix} x \\ y \end{pmatrix} &= \begin{pmatrix} a & 7b \\ b & a \end{pmatrix}^{-1} \begin{pmatrix} 1 \\ 0 \end{pmatrix} \end{align}$$
Note that $a^2-7b^2 \ne 0$ for any $a,b \in \mathbb{Q}$ and so this matrix is invertible. It comes out from here in a couple of lines; then $x+y\sqrt{7} = (a+b\sqrt{7})^{-1}$.
