# Is mapping that sends an idempotent to an idempotent is necessarily a ring homomorphism?

Question: Let $$R, S$$ be rings. If $$f: R\rightarrow S$$ is a mapping such that $$f$$ carries an idempotent to an idempotent. That is, If $$a\in R$$ is an idempotent element in $$R$$ then $$f(a)$$ is an idempotent element in $$S$$ then is $$f$$ is necessarily a ring homomorphism?

I know that, other direction holds! that is, a ring homomorphism carries an idempotent to an idempotent.

To solve a given question either I need to find a counter-example that is, the mapping between two rings that maps an idempotent to an idempotent but is not a ring homomorphism 'or' I need to prove this direction also holds... please help.

You could just take $$f:\mathbb Z\to \mathbb Z$$ and map every element to $$1$$.

Or if you want non-idempotents to map to non idempotents too, you could just use the map that interchanges $$0$$ with $$1$$ and leave everything else alone.

In some sense, the subset of functions from $$\mathbb Z$$ to $$\mathbb Z$$ that aren't ring homomorphisms is "huge" compared to the ones that are, and you shouldn't have a hard time finding an element that isn't a ring homomorphism (or even a group homomorphism.)

• You can replace $\mathbb Z$ with any nonzero finite ring of course. Aug 25, 2021 at 18:12
• sir, what If I add one more condition? "If $f:R\rightarrow S$ is mapping such that $f$ is group is homomorphism from $(R,+)$ to $(S,+)$ and $f$ carries an idempotent in $R$ to an idempotent in $S$ then Is $f$ is necessarily a ring homomorphism? Aug 26, 2021 at 5:33

Let $$Z$$ be the ring of integers and let $$f: Z\to Z$$ be a function defined by $$f(x)=x^{2}$$ then $$f(0)=0$$ and $$f(1)=1$$ . Note that $$f$$ is not a ring homomorphism and $$0 , 1$$ are the only idempotent elements of $$Z$$. Generally suppose that $$R$$ is a ring such that there are elements $$x , y$$ such that $$xy+yx\neq0$$, then the function $$f:R\to R$$ defined by $$f(x)=x^2$$ is not a ring homomorphism but sends an idempotent to an idempotent.

• Any example in case of Finite rings? Please.... Aug 25, 2021 at 15:19
• Consider the ring $Z_{8}$ instead of $R$ . You see that $f(x)=x^2$ is not a ring homomorphism, since $f(1+3)=(1+3)^2=0\neq f(1)+f(3)=2$ Aug 25, 2021 at 16:00
• Thank you so much sir Aug 25, 2021 at 17:48
• sir, what If I add one more condition? "If $f:R\rightarrow S$ is mapping such that $f$ is group is homomorphism from $(R,+)$ to $(S,+)$ and $f$ carries an idempotent in $R$ to an idempotent in $S$ then Is $f$ is necessarily a ring homomorphism? Aug 26, 2021 at 5:36
• Consider the map $f:2Z\to 2Z$ defined by $f(x)=2x$. Then $f(0)=0$ and $f$ is a group homomorphism but it is not a ring homomorphism. Aug 26, 2021 at 6:23