image of the neutral in group homomorphism

It it always true that the image of the neutral element in a group homomorphism $$f$$ is the neutral element of the codomain group regardless whether $$f$$ is injective/surjective?

The answer is most probably true as written at various places but I can’t understand the following (counter?) example.

Let $$G$$ be the group $$\{0,1\}$$ and the mapping $$f: G \rightarrow G$$ such that for all $$x \in G, f(x) = 0$$ ; $$f$$ is indeed a group morphism $$f(x*y) = f(x)*f(y)=0$$ but the image of the neutral $$f(1)$$ is $$0$$ and different to $$1$$.

Thanks.

• Are you considering the two elements $0$ and $1$ with their usual multiplication? That's not a group. $0$ has no inverse. – badjohn Feb 11 at 8:33

As I said in a comment, your $$G$$ does not seem to be a group, what is the inverse of $$0$$?

Let's suppose $$f : G \rightarrow H$$ is a group homomorphism.

The identity of $$G$$ is $$e_G$$ and that of $$H$$ is $$e_H$$.

Let's distinguish two cases:

1. $$\forall g \in G: f(g) = e_H$$

Obviously, $$f$$ maps $$e_G$$ to $$e_H$$.

1. $$\exists g \in G: f(g) \neq e_H$$

Let $$h = f(g)$$.

$$f(e_Gg) = f(e_G)f(g)$$ since $$f$$ is a homomorphism.

But also $$e_G g = g$$ so:

$$f(g) = f(e_G)f(g)$$

$$h = f(e_G) h$$

$$H$$ is a group so $$h$$ has an inverse $$h^{-1}$$.

$$h h^{-1} = f(e_G) h h^{-1}$$

$$e_H = f(e_G)$$.

So the image of $$e_G$$ is $$e_H$$.

We did not actually need to distinguish the two cases, it just seemed a little clearer to do so.

• Thank you. Very clear. – mauricebis Feb 11 at 9:29