Let $G,H$ groups, $H$ abelian, prove $\def\Hom{\operatorname{Hom}}\Hom(G,H)$, with the entrywise sum $(f+g)(x)=f(x)+g(x)$ is an abelian group. I'm working on a proof to show that for a group $G$ and an abelian group $H$, the set of all homomorphisms $\def\Hom{\operatorname{Hom}}\Hom(G,H)$ from $G$ to $H$ is an abelian group. I just want to verify that my proof is valid. I proceed by trying to show this group satisfies 4 conditions.
First, I defined the operation on $\Hom(G,H)$ as $(f+g)(u)$, $u \in G$,  $f(u) + g(u)$. Is this a valid first move?
Then, associativity is easy to show. $((f+g)+h)(u) = (f+g)(u) + h(u) = f(u) + g(u) + h(u) = (f+(g+h))(u)$.
It is similarly easy to verify that this group is abelian: $(f+g)(u) = f(u) + g(u) = g(u) + f(u)$ since $H$ is abelian, so $(f+g)(u) = (g+f)(u)$.
Is it necessary to show closure, i.e. the product of homomorphisms into an abelian group is a homomorphism? This also follows since $H$ is abelian.
The trivial (zero) homomorphism is the homomorphism that maps every element of G to the identity element of $H$. Since $\Hom(G,H)$ includes all homomorphisms, the identity homomorphism is also in $\Hom(G,H)$.
I'm having trouble finding the inverse homomorphism. Let's say $f$ is in $\Hom(G,H)$. If we take $g$ to be $-f$, $(f+g)(u) = f(u) - f(u) = 1$? What does it mean for a homomorphism to be an inverse of another?
Thanks for your help.
 A: Note: I'm using additive notation for both groups G and H, however, I assume ONLY $H$ abelian, I will not use abelian for $G$, tell me if I mistake that. but it totally can be done without using $G$ abelian.
Proof: Let $A=Hom(G,H)$, with the sum $(f+g)(x)=f(x)+g(x)$. Let's prove $A$ it's a abelian group:
Closed: $(f+g)(x+y)=f(x+y)+g(x+y)=f(x)+f(y)+g(x)+g(y)$
Now IMPORTANT, we use "$H$ is abelian" hypothesis, if not, we can't do this step, it's simply false.
$=f(x)+g(x)+f(y)+g(y)=(f+g)(x)+(f+g)(y)$ that proves the sum of homomorphism is homomorphism, so it's closed.
Associative: I copy and improve your proof $((f+g)+h)(u)=(f+g)(u)+h(u)=f(u)+g(u)+h(u)=(f+(g+h))(u)$
Abelian: $(f+g)(u)=f(u)+g(u)=g(u)+f(u)$ IMPORTANT: This uses $H$ abelian.
Inverses: Let $f \in Hom(G,H)$ then the only candidate to be inverse that could work, is the entrywise inverse $-f$ defined by $-f(x)=f(-x)$ . So let's check it does the job first:
$(f+(-f))(x)=f(x)+(-f)(x)=f(x)+f(-x)=f(x-x)=f(0)=0$ And the sum in the other direction has the same proof (or you remember this group $A$ is abelian).
And $-f$ is a homomorphism: $-f(x+y)=f(-(x+y))=f(-y-x)=f(-y)+f(-x)=f(-x)+f(-y)
=-f(x)+-f(y)$ Note this also uses $H$ to be abelian.
