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? 

Any multiplicative homomorphism must send $1$ to an idempotent.
The only idempotents of $\mathbb{Q}$ are $0$ and $1$ (the roots of $x^2-x=x(x-1)$), so $\varphi(1)=0$ or $\varphi(1)=1$.
If $\varphi(1)=0$, then $\varphi(a) = \varphi(1a) = \varphi(1)\varphi(a)=0$, so $\varphi(x)=0$ for all $x$.
If $\varphi(1)=1$ and the map is additive, then prove inductively that $\varphi(n)=n$ for all positive integers, hence for all integers; deduce that $\varphi(q) = q$ for all $q$. 
