Algebraic integers in a quadratic number field I want to show that an element in $\alpha$ in a quadratic number field, $\mathbb{Q}(d)$, is an algebraic integer if the Norm and the Trace of $\alpha$ are in $\mathbb{Z}.$

Let $\alpha\in\mathbb{Q}(\sqrt d)$ be an algebraic integer; By definition, it is the root of a polynomial $f(x)\in\mathbb{Z}[x]$. One can show that in fact, the minimal polynomial of $\alpha$ over $\mathbb{Q}$, is with integral coefficients 
(please tell me if you want me to elaborate on this point). Note that if $\alpha=a+b\sqrt d$, then $\alpha$  is a root of $x^2-2ax+a^2-db^2\in\mathbb{Q}[x]$ and that this is in fact its minimal polynomial, as there is no polynomial of degree 1 over $\mathbb{Q}$ has $\alpha$ as a root (otherwise, $\alpha$ would be a rational number, and this case is easy to handle with). But then it follows that $2a,a^2-db^2\in\mathbb{Z}$, and these are the trace and norm of $\alpha$, so we're finished.
Conversely, write $\alpha=a+b\sqrt d$. Then $tr_{\mathbb{Q}(\sqrt d)/\mathbb{Q}}(\alpha)=2a$ and $Norm_{\mathbb{Q}(\sqrt d)/\mathbb{Q}}(\alpha)=a^2-db^2$. If they're both in $\mathbb{Z}$, then $f(x)=x^2-2ax+(a^2-db^2)\in\mathbb{Z}[x]$. Now by Vietta's formula (or by substitution, whatever you like...) we get that $f(\alpha)=0$ and so $\alpha$ is algebraic. 
Conceptually, $\alpha$ is an algebraic integer, iff its minimal polynomial over $\mathbb{Q}$ is a polynomial with integer coefficients. In the case of a quadratic extension, the coefficients of the minimal polynomial (except for the leading coefficient, which is 1) are precisely the norm and the trace of $\alpha$. 
