Let $d\in \Bbb{Z}$ be a square free in, I need to find an isomorphism between $\Bbb{Z}[\sqrt{d}]$ and a quotient of $\Bbb{Z}[X].$ I Would guess it's $$\Bbb{Z}[\sqrt{d}]\simeq\Bbb{Z}[X]/\langle X^2-d\rangle.$$ But I need to prove it. So, as $X^2+1$ is monic, I can perform the euclidean algorithm: all polynomial $\Bbb{Z}[X]$ can be written $$P=(X^2-d)Q+(aX+b)$$ for $Q\in\Bbb{Z}[X].$ We have $P(\sqrt{d})=0$ if and only if $a+\sqrt{d}b=0.$
If $d<0$ then $\sqrt{d}=i\sqrt{-d}$ so $a=b=0.$
If $d>0$ I am not sure how can I prove that $a=b=0$, I can do it for some special ("easy") case.
More than a solution, I need to understand what's going on to get the idea of the proof. I can conclude, but