Suppose we have two groups $G,H$, and the premise is that every homomorphism from $G$ to $H$ is trivial.
This certainly can happen when either of $G,H$ is trivial, but is it possible that neither of $G,H$ are trivial?
Suppose we have two groups $G,H$, and the premise is that every homomorphism from $G$ to $H$ is trivial.
This certainly can happen when either of $G,H$ is trivial, but is it possible that neither of $G,H$ are trivial?
First, remember that there are $(m,n)$ number of homomorphisms between $\mathbb{Z}_n$ and $\mathbb{Z}_m$, see Find the number of homomorphisms between $\mathbb{Z}_m$ and $\mathbb{Z}_n$. Hence if $n$ amd $m$ are coprime, there is only one homomorphism. So it is not necessary for both groups to be trivial.