The unit group of $\mathbb{Q}[x, y]/(x^2+y^2+1)$ During some calculations, I encountered with the problem of calculating the unit group of the $\mathbb{Q}$-algebra $\mathbb{Q}[x, y]/(x^2+y^2+1)$. I believe it is the unit group of the field of rational numbers, but I can't find any good way of proving this. Any suggestion will certainly be welcomed!
 A: A direct approach.
Let $R=\mathbb Q[Y]$, and $p=Y^2+1$. Your ring is $R[X]/(X^2+p)$, and its elements are of the form $ax+b$ with $a,b\in R$. (Here $x$ denotes the residue class of $X$ modulo the ideal $(X^2+p)$.)   
Suppose $ax+b$ is invertible. Then there are $c,d\in R$ such that $(ax+b)(cx+d)=1$, that is $(ad+bc)x+bd-pac=1$. (Recall that $x^2=-p$.) It follows $ad+bc=0$ and $bd-pac=1$. This leads to $c=-a(d^2+pc^2)$ and $d=b(d^2+pc^2)$ which gives $(b^2+pa^2)(d^2+pc^2)=1$. Thus $b^2+pa^2$ is invertible in $R$, so $\deg(b^2+pa^2)=0$. In particular, $\deg b=\deg a+1$ and by looking now at the coefficients of the monomials of highest degree in $a$ and $b$ we conclude that the sum of their squares is zero, unless $a=0$. (This proof works as well for $\mathbb R$ instead of $\mathbb Q$.)
A: Let $R=\mathbb Q[x,y]/(x^2+y^2+1)$. Remark that 
$$R\otimes \mathbb Q(i) = \mathbb Q(i)[x,y]/(x^2+y^2+1) = \mathbb Q(i)[x,y]/((x+iy)(x-iy)+1),$$ so $R\otimes \mathbb Q(i)$ is isomorphic over $\mathbb Q(i)$ to $\mathbb Q(i)[u,v]/(uv+1)$, which is itself isomorphic to $\mathbb Q(i)[s,t]/(st-1)$ by $s\mapsto u, t \mapsto -v$. So $R\otimes \mathbb Q(i)$ is $\mathbb Q(i)[s,s^{-1}]$, whose unit group is $\mathbb Q(i)^\times \times s^\mathbb Z$. Now, if $\alpha \in R$ is a unit, then it is still a unit in $R\otimes \mathbb Q(i)$, hence it lies in $\mathbb Q(i)^\times \times s^\mathbb Z$. Hence $\alpha = c s^k$ for some $c \in \mathbb Q(i)$ and for $s = x+iy$. Comparing the coefficient of $x$ on both sides of $\alpha = c s^k$ shows that we must have $c \in \mathbb Q$, and then comparing the coefficient of $y$ on both sides shows that we must have $k=0$, hence $\alpha = c \in \mathbb Q^\times$. 
