Prove that the following are isomorphic as groups but not as rings 
*

*$\mathbb{Z}$ and $\mathbb{2Z}$


My solution: To prove they are isomorphic as groups, I take the mapping $f: \mathbb{Z} \rightarrow \mathbb{2Z}$ defined by $f(x)=2x$. I prove it's a homomorphism and surjective and I am done.
To prove they are not isomorphic as rings, I take the equation $x^2=1$. It has solutions $x=1,-1$ in $\mathbb{Z}$ but no solutions in $\mathbb{2Z}$ and are hence not isomorphic.


*$\mathbb{Z}[\sqrt2]$ and $\mathbb{Z}[\sqrt5]$


My solution: To prove they are isomorphic as groups, I take the mapping 
$f: \mathbb{Z}[\sqrt2] \rightarrow \mathbb{Z}[\sqrt5]$ defined by $f(a+b\sqrt2)=a+b\sqrt5$. I prove it's a homomorphism and surjective and I am done.
Here, to prove they are not isomorphic as rings, I take the equation $x^2=2$, which has solutions $x=\sqrt2, -\sqrt2$ in $\mathbb{Z}[\sqrt2]$ but no solution in $\mathbb{Z}[\sqrt5]$. 
Is this the correct approach to proving non-isomorphism as rings? That an equation has a solution in one ring but not in another? 
 A: By Definition, a ring homomorphism $f: R \rightarrow R'$ must preserve addition and multiplication and must map the multiplicative identity of $R$ to the multiplicative identity of $R'$.  In your example, the ring $R'=2\mathbb{Z}$ does not have a multiplicative identity.  So the two rings are not isomorphic (there is no isomorphism, or even a homomorphism from one ring to the other, for that matter). 
To show that the rings $\mathbb{Z}[\sqrt{2}]$ and $\mathbb{Z}[\sqrt{5}]$ are not isomorphic, you can use your idea that $x^2=2$ has no solution in the latter ring.  But you need to justify why this method works.  Here is a proof. Suppose there is an isomorphism $f$ between these two rings that takes $a+b\sqrt{2}$ to $a'+b'\sqrt{5}$.  Since $f$ must take the identity to the identity, $f$ takes 1 to 1' (here, 1' is the identity in the second ring, and actually equals the integer 1;  the primes are just to make things clearer).  Since $f$ preserves sums, $f$ must take $1+1$ to $1'+1'$.   Now, $(0+1 \sqrt{2})(0+1\sqrt{2}) = 1+1$ in the first ring.  We can apply $f$ to both sides. Since $f$ preserves sums and products, we get the equation $(x'+y'\sqrt{5})^2 = 2$, where $x'+y'\sqrt{5}$ is the image of $(0+1\sqrt{2})$ under $f$.  This equation has no solutions, and so we get a contradiction.  Thus, there does not exist an isomorphism $f$ from the first ring to the second.
