How to show that $\mathbb{Z}[i]\cong \mathbb{Z}[x]/(x^2+1)$? Let $\mathbb{Z}[i]$ be the ring $\{a+bi:a,b\in\mathbb{Z}\}$ and $\mathbb{Z}[x]$ the ring of polynomials over $\mathbb{Z}$. If $(x^2+1)$ denotes the ideal generated by $x^2+1$, how to show that
$$\mathbb{Z}[i]\cong \mathbb{Z}[x]/(x^2+1)?$$
Attempt: If we define the map
$$F:\mathbb{Z}[x]\longrightarrow\mathbb{Z}[i]$$
by
$$F(f(x))=f(i)$$
then we easily see that $F$ is a surjective ring homomorphism with $(x^2+1)\subseteq\ker\ F$. Hence, by the first isomorphism theorem, we would be done if $(x^2+1)\supseteq\ker\ F$. But how to show that? That is, if $f(i)=0$, why must $x^2+1\mid f(x)$?
 A: I assume that you have defined $\mathbb{Z}[i]=\{a+bi\in\mathbb{C}:a,b\in\mathbb{Z}\}$.
It's a fundamental result that you can define a unique homomorphism from $\varphi_b\colon\mathbb{A}[X]\to B$, where $A$ and $B$ are any commutative rings by just giving a homomorphism $\varphi\colon A\to B$ and choosing an element $b\in B$, and stating that
$$
\varphi_b(a)=\varphi(a)\ (a\in A),\quad \varphi_b(X)=b
$$
and extending in the obvious way to polynomials.
In our case $A=\mathbb{Z}$, $\varphi$ is the inclusion $\mathbb{Z}\to\mathbb{C}$ and $b=i$. So it's immediate that $\varphi_i$ is surjective, hence it induces an isomorphism
$$
\tilde{\varphi_i}\colon \mathbb{Z}[X]/I\to\mathbb{Z}[i]
$$
where $I=\ker\varphi_i$.
Now it's just a matter of showing that $I=(X^2+1)$. One inclusion is easy, because $\varphi_i(X^2+1)=i^2+1=0$. For the other inclusion, use long division for polynomials.
If $F(X)$ is a polynomial with $\varphi_i(F)=0$, then write
$$
F(X)=(X^2+1)G(X)+aX+b
$$
(which is possible because $X^2+1$ is monic). Then…

Let $A$ be a commutative ring and let $F(X),G(X)\in A[X]$, where $G$ is monic. Then there exist $Q(X),R(X)\in A[X]$ such that
$$
F=GQ+R,\quad \operatorname{degree}R<\operatorname{degree}G.
$$
(where $\operatorname{degree}0=-\infty$).
Proof. If $F=0$, there's nothing to prove. Also if $\operatorname{degree}G=0$ there's nothing to prove, because in this case $G=1$. We make induction on $\operatorname{degree}F$. If $\operatorname{degree}F<\operatorname{degree}G$, in particular if $F$ has degree $0$, $F=G\cdot0+F$.
So, assume the result holds for all polynomials with degree less than $F$. Write $F(X)=aX^m+F_1(X)$, where $F_1$ has degree less than $F$ and suppose $G$ has degree $n\le m$. Then
$$
F(X)-aX^{m-n}G(X)
$$
has degree less than $F$, so by the induction hypothesis,
$$
F(X)-aX^{m-n}G(X)=G(X)Q_1(X)+R(X)
$$
and
$$
F(X)=G(X)\bigl(aX^{m-n}+Q_1(X)\bigr)+R(X).
$$
This ends the proof.
A: By the division algorithm for $\mathbb{Q}[x]$, $f(x) = q(x)(x^2+1) + r(x)$ with $r(x) = ax + b \in \mathbb{Q}[x]$ having degree $\leq 1$.  If $f(i) = 0$, then $a i + b = 0$ for some $a, b \in \mathbb{Q}$.  If $a = 0$, then clearly $b = 0$, in which case $x^2 + 1$ divides $f(x)$ in $\mathbb{Q}[x]$.  Otherwise, $i = -b/a$, so squaring both sides, $-1 = b^2 / a^2$, a contradiction since the left-hand side is negative while the right-hand side is non-negative.
There's a slight subtlety  in going from $x^2 + 1$ divides $f(x)$ in $\mathbb{Q}[x]$ to $x^2 + 1$ divides $f(x)$ in $\mathbb{Z}[x]$.  You need to use Gauss' Lemma to argue that the content of $q(x)$ is an integer, so $q(x) \in \mathbb{Z}[x]$.
A: Say $f(x) \in {\mathbb{Z}[x]}$ is such that $f(i) = 0$. As polynomials over $\mathbb C$, $x - i \mid f(x)$ and therefore, taking complex conjugates, also $x + i \mid f(x)$. Because $x - i$ and $x + i$ are relatively prime, $(x - i)(x + i) \mid f(x)$, i.e., $x^2 + 1 \mid f(x)$. That this is divisibility of polynomials over ${\mathbb C}$ is irrelevant: do long division as polynomials over ${\mathbb Q}$, the remainder is 0 anyway. By Gauss' Lemma, the quotient $f(x) / (x^2 + 1)$ has coefficients in ${\mathbb Z}$. 
A: This much is true for any polynomials over any field $\;\Bbb F\;$
$$\text{For}\;\;f(x)\in\Bbb F[x]\;,\;\;f(\alpha)=0\iff (x-alpha)\mid f(x)\iff f(x)=(x-\alpha)g(x)$$
When the last decomposition is on the ring of polynomials over any field containing both $\;\Bbb F\;,\;\alpha\;$. In our case, that field can be $\;\Bbb C\;$ .
