The ring of integers of $\mathbf{Q}[i]$ Is there a relatively "simple" (in the sense that it does not require knowledge of algebraic number theory) proof that the ring of integers of the algebraic number field $\mathbf{Q}[i]$ is $\mathbf{Z}[i]$? One can assume a one year course in algebra, covering the usual topics on ring and field theory, e.g. Gauss's lemma etc
 A: Suppose $\,w = a+bi\in \Bbb Q[i]\backslash\Bbb  Q\,$ is a an algebraic integer. By definition, there is a monic $\,f(x) \in \Bbb Z[x]$ such that $\,f(w) = 0.\,$  $w$ is also a root of $\,g(x) = (x\!-\!w)(x\!-\!w') = x^2-(w\!+\!w')x + ww'\in\Bbb Q[x].\,$ Hence, by the Division Algorithm in $\,\Bbb Q[x],\,$ we deduce that $g\mid f,\,$ since a nonzero remainder would be a linear polynomial with $w$ as root, implying $w\in \Bbb Q,\,$ contra hypothesis. 
By Gauss's Lemma $\,g\in \Bbb Z[x],\,$ so $\,w\!+\!w' = 2a\in\Bbb Z,\, ww'\! = a^2\!+b^2\!\in\Bbb Z,\,$ so $\,(2b)^2\! = 4ww'\! -\! (2a)^2\!\in\Bbb Z$ so $\,2b\in\Bbb Z,\,$ by  the Rational Root Test. Thus $\,2a=j,\,2b=k\in\Bbb Z,\,$ $\, a^2\!+b^2\! = (j^2\!+k^2)/4\in\Bbb Z\,$ hence $\,j,k\in\Bbb 2\Bbb Z\,$ $\Rightarrow$  $\, a=j/2,\, b = k/2 \in\Bbb Z\ \ $ QED
A: In Bill Dubuque's proof, we have $f(X) = g(X)h(X)$ where $f\in \mathbb{Z}[X]$ and $g,h\in \mathbb{Q}[X]$, all monic polynomials ($h$ is introduced by me). Then $g\in \mathbb{Z}[X]$. 
A slightly more generic way to prove this is to note that any root of $g$ (in an algebraic closure of $\mathbb{Q}$) is also a root of $f$. As $f$ has coefficients in $\mathbb{Z}$ and is monic, then any root of $g$ is an integral element over $\mathbb{Z}$.
Since the coeﬃcients of $g$ are sums of products of its own roots, each coeﬃcient is both
integral over $\mathbb{Z}$ and in $\mathbb{Q}$. 
It's not hard to see that this means that each coefficient must be in $\mathbb{Z}$ (due to rational  root test, or, differently said, $\mathbb{Z}$ is integrally closed).   
