Consider the ring of Gaussian integers $D=\lbrace a+bi\mid a,b \in \mathbb{Z \rbrace}$, where $i \in \mathbb{C}$ such that $i^2=-1$. Consider the map $f$ from $D$ to $\mathbb{Z}[x]/(x^2+1)$ sending $i$ to the class of $x$ modulo $x^2+1$. Show that $f$ is a ring isomorphism.
I got a confusion in this question. I don't understand the map sending $i$ to the class of $x$ modulo $x^2+1$. Can anyone help me to clear my confusion?
EDIT: I am having trouble to show the map is injective and surjective. Can anyone guide me?