I got this question in a homework:
Determine all ring homomorphisms from $\mathbb{R} \to \mathbb{R}$. Also prove that the only ring automorphism of $\mathbb{R}$ is the identity.
I know that $\mathbb{R}$ is a field, so the only ideals are $\mathbb{R}$ and $\{0\}$. Therefore the homomorphisms must be the identity and the function $f(x)=0$ where $x \in \mathbb{R}$.
But how do I prove these are the only two homomorphisms?
Also, I was told to use the fact that $\mathbb{Q}$ is dense in $\mathbb{R}$, how can I use this hint?