# Prove $\mathbb{Z}_3[x]/(x^2+1)$ and $\mathbb{Z}_3[x]/(x^2+x-1)$ are isomorphic.

Prove $\mathbb{Z}_3[x]/(x^2+1)$ and $\mathbb{Z}_3[x]/(x^2+x-1)$ are isomorphic by finding an explicit isomorphism. My question is how I can define the map. Here are what I tried:

$\mathbb{Z}_3[x]/(x^2+1)=\{ a+b\alpha \,|\, \alpha^2 + 1 = 0, \quad a,b\in\mathbb{Z} \}$

$\mathbb{Z}_3[x]/(x^2+x-1)=\{ a+b\beta \,|\, \beta^2 + \beta - 1 = 0, \quad a,b\in\mathbb{Z} \}$

Then I am looking for an isomorphism of the form $f(a+b\alpha) = a+bf(\alpha)$ for all $a,b\in\mathbb{Z}$ where $f(\alpha^2)+1=0$. Here I'm stuck.

My professor said $f(a+b\alpha) = a+b(1-\beta)$ so that the restriction of $f$ to $\mathbb{Z}_3$ is the identity morphism. I don't understand why we have $f(\alpha) = 1-\beta$.

He also gave another problem: $\mathbb{Z}_5[x]/(x^2+2)$ and $\mathbb{Z}_5[x]/(x^2-x+1)$, where $f(a+b\alpha) = a+b(2+\beta)$.

Could someone please explain to me why $f(\alpha) = 1-\beta\,$ in the first problem and $f(\alpha)=2+\beta\,$ in the second problem?

Thank you very much.

In the first problem, $f$ is defined by where it sends $1$ and $\alpha$. Certainly it needs to send $1 \mapsto 1$. Then it needs to send $\alpha \mapsto r + s \beta$ for some $r, s \in \mathbb{Z}_3$.
Applying the isomorphism $f$ to $\alpha^2 + 1 = 0$, we get that $(r + s \beta)^2 + 1 = 0$, i.e. $1 + r^2 + 2s \beta + \beta^2 = 0$, and since $\beta^2 = 1 - \beta$ we get $(2 + r^2) + (2s - 1) \beta = 0$. This implies $2 + r^2, 2s - 1 = 0$ so $r = \pm 1, s = -1$ (mod $3$). So there are two options: $f(\alpha) = 1 - \beta$ or $f(\alpha) = -1 - \beta$. You can check that both of them are in fact isomorphisms.
The second problem is identical; write $f(\alpha) = r + s \beta$ and then use the fact that $f(\alpha)^2 + 2 = 0$ to solve for what $r$ and $s$ are. You will see that $r = 2, s = 1$ satisfies the required equality.
The two polynomials are irreducible, because they have no roots and have degree $2$, so the fields $\mathbb{Z}_3[x]/(x^2+1)$ and $\mathbb{Z}_3[x]/(x^2+x-1)$ are certainly isomorphic.
Let's try manipulating the second polynomial: $$x^2+x-1=x^2+x+2=x^2-2x+1+1=(x-1)^2+1$$ so the ring homomorphism $$f\colon\mathbb{Z}_3[x]\to\mathbb{Z}_3[x]/(x^2+x-1)$$ defined by $f(x)=x-1+(x^2+x-1)$ has the property that $$f(x^2+1)=(x-1)^2+1+(x^2+x-1)=x^2+x-1+(x^2+x-1)=(x^2+x-1)$$ so $x^2+1\in\ker f$. No degree $1$ polynomial belongs to $\ker f$, so $\ker f=(x^2+1)$ and the induced map is an isomorphism.