Let $(G,+)$,$(G^\prime,+)$ two abelian groups and $H, H^\prime$ two proper subgroups of $G$ and $G^\prime$ respectively. Let $\text{Hom}(G,G^\prime) = \{f:G \rightarrow G^\prime : f\text{ homomorphism}\}$. Prove that $\text{Hom}(G,G^\prime)$ is a group endowed with the operation definded by:
$$(f+g)(x) = f(x)+g(x), \forall x\in G$$
I thought it would be easily proven by showing that the group axioms hold. But trying this:
$i)$ Closure: Let $f,g\in \text{Hom}(G,G^\prime)$. Then: $$(f+g)(x) = f(x) + g(x)$$ But I don't know how to show that $f(x)+g(x)$ could be again in $\text{Hom}(G,G^\prime)$. Do I have to somehow use the fact that $G^\prime$ is commutative?
$ii)$ Associativity: Let $f,g,h\in \text{Hom}(G,G^\prime)$. Then: $$(f+g)(x)+h(x) = f(x)+g(x)+h(x)=f(x)+(g+h)(x)$$
$iii)$ Identity element: Let $f\in \text{Hom}(G,G^\prime)$. $$(f+0)(x) = f(x) + 0(x) = 0(x)+f(x) = f(x)$$
$iv)$ Inverse element: Let $f \in \text{Hom}(G,G^\prime)$. Then: $$0 = \dots?$$
I'm kind of stuck and don't know how to approach the last. Any help or advise would be appreciated. Thanks.
Indeed. So we have two group homomorphisms $f,g\in Hom(G,G^\prime)$ and we already know how to add them. So lets check that the result is a homomorphism:
$$(f+g)(x+y)=f(x+y)+g(x+y)=f(x)+f(y)+g(x)+g(y)=$$ $$=f(x)+g(x)+f(y)+g(y)=(f+g)(x)+(f+g)(y)$$
Do you see where we've applied commutativity?
That looks ok. To be formally correct you have to write the initial and final conditions, i.e. you should start with $((f+g)+h)(x)$ and end with $(f+(g+h))(x)$.
Again, that looks fine. You just missed the definition: $0(x):=0_{G^\prime}$.
How about $g(x):=-f(x)$? Can you complete the proof?