I am beginning a study of modules and I am having trouble with the following exercise.
Let $M$ be an abelain group and let $End(M)$ be the set of all endomorphisms on $M$, i.e. the set of all group morphisms $f:M\rightarrow M$. Show that $End(M)$ is an abelian group under the law of composition $(f,g)\mapsto f+g$ where \begin{align*} (\forall x\in M)(f+g)(x)=f(x)+g(x). \end{align*} Show also that $(End(M),+,\circ)$ is a unitary ring.
I have been able to smoothly work out everything except for the unitary part. I think my trouble might be with the word morphism which is more abstract than what I am used to. I have been working under the assumption that a morphism of groups is a group homomorphism. This causes trouble when finding a unit for $(End(M),+,\circ)$ because in order for every morphism $f$ to have an inverse under composition then $f$ has to be bijective but if the endomorphisms are just homomorphisms then as an example of the trouble $f(x)=0$ is a perfectly good group homomorphism for any group but $f$ wouldn't have a well defined inverse under composition.\
I hope this makes sense and that somebody can clear things up a little. Thanks.
A unitary ring is just a ring which has a multiplicative identity (many people just call this a ring!). Note that there is no need for elements to multiply to give the identity (think of $\mathbb Z$, most elements cannot be multiplied by anything to give $1$).
As the multiplication operation is composition, you just need a map $i\colon M \to M$ so that $i \circ f = f\circ i = f$ for all $f \colon M \to M$.
It sounds like you are describing the property of each element having an inverse, not of the ring having an identity element.