Concerning ideals of $\mathbb Z[\sqrt m]$ and $\mathbb Z[\sqrt m] [x] $ For a given integer $m<-1$ or non-square integer $m>1$ , how do we calculate the quotient ring $\mathbb Z[\sqrt m]/I$ , for example its order or whether it is a field or has zero divisors or not , for ideal $I$ ? I will be at least happy if some procedure can be given for only principal ideals $I$ . Where can I read about ideals of such rings $\mathbb Z[\sqrt m]$ and also about its polynomial ring $\mathbb Z[\sqrt m] [x] $ ? Please give some links or/and references .Thanks in advance 
 A: If $\mathbb Z[\sqrt m]$ is not integral domain, I think it's common to view it as $\mathbb Z[X]/(X^2-m)$. Similarly we can view $\mathbb Z[\sqrt m]/I$ as $\mathbb Z[X]/J$ where $X^2-m\in J$ (to ask $I$ being principle is the same to ask $J$ being principle or 2-generated) and view $\mathbb Z[\sqrt m] [x]$ as $\mathbb Z[X,Y]/(X^2-m)$. For a systematic investigation of properties of ideal structures of $\mathbb Z[X]$ and $\mathbb Z[X,Y]$, I need to read some commutative algebra or algebraic number theory. I recommend GTM150(Commutative Algebra: with a View Toward Algebraic Geometry, by David Eisenbud).
For the case I being principal, things become a little bit simpler. We have $\mathbb Z[\sqrt m]/I\simeq \mathbb Z[X]/(X^2-m,f(X))$. without loss of generality, we assume $f=aX-b$ (since we can  always divide $f$ by $X^2-m$). Let $d:=\gcd(a,b)$ and write $a=da^\prime$, $b=db^\prime$. Then $(X^2-m,aX-b)=(X^2-m,a^\prime X-b^\prime)\cap(X^2-m,d)$, and $\mathbb Z[X]/(X^2-m,aX+b)$ can be embedded into $\mathbb Z[X]/(X^2-m,d)\times\mathbb Z[X]/(X^2-m,a^\prime X-b^\prime)$. Furthermore, we have $\mathbb Z[X]/(X^2-m,a^\prime X-b^\prime)\simeq\mathbb Z[\frac1{a^\prime}]/((\frac{b^\prime}{a^\prime})^2-m)=\mathbb Z[\frac1{a^\prime}]/({b^\prime}^2-{a^\prime}^2m)$, so the structure of $\mathbb Z[X]/(X^2-m,a^\prime X-b^\prime)$ depends on the factorization of ${b^\prime}^2-{a^\prime}^2m$. Similarly we can analyze the structure of $\mathbb Z[X]/(X^2-m,d)$ by factorizing $d$: if $d=\prod p_i^{n_i}$, then $\mathbb Z[X]/(X^2-m,d)\simeq\times\mathbb Z_{p_i^{n_i}}[X]/(X^2-m)$.
