If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$. If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.
I'm wondering if you can help me with this one? 

If $f$ is a homomorphism of rings, we know the kernel of $f$ has to be an ideal of $\mathbb{Q}$, but as $\mathbb{Q}$ is a field, the only ideals of $\mathbb{Q}$ are $0$ and $\mathbb{Q}$ itself.
