I have difficulty of computing some basic contravariant Hom functor.
basically, in the class, teacher write \begin{align} \textrm{Hom}_{\mathbb{Z}}(\mathbb{Z},X) = X \end{align} But i am not sure how this comes up.
Furthermore with above idea, he said one can compute
\begin{align} &\textrm{Hom}_\mathbb{Z}(\mathbb{Z}_m,\mathbb{Z}_n) \\ &\textrm{Hom}_\mathbb{Z}(\mathbb{Z}_m,\mathbb{Z}) \\ & \textrm{Hom}_\mathbb{Z}(\mathbb{Z},\mathbb{Z}_n) \end{align} But i am not sure how to copmute or handle above expressions.
Any idea or hint or reference will be helpful.
[I'm writing this at a level aimed at an intro algebra class; do let me know if this is comes across as too condescending or conversely, confusing.]
I'll clarify the first one and leave the rest to you. (Let me know in the comments if you figure it out!)
I'm assuming here (you should have specified!) that we're working in the category of groups (this means that the object $X$ is a group and all the maps in the hom-set are group homomorphisms). So $\textrm{Hom}_{\mathbb{Z}}(\mathbb{Z},X)$ consists of all the group homomorphisms from $\mathbb{Z}$ to $X$.
However, $\mathbb{Z}$ is generated by a single element, say $1$. That is, given any other element $n$ in $Z$, I can just add $1$ and perhaps its inverse $-1$ some number of times to get $n$.
Note what this means for homomorphisms out of $\mathbb{Z}$. If I tell you where a homomorphism $\phi: \mathbb{Z} \to X$ sends $1$, you can figure out what $\phi$ does to all the other elements (try writing this out if this isn't clear). Moreover, for every single element $x \in X$, I can define a map $\mathbb{Z} \to X$ by setting $\phi(1) = x$.
That is, we have a bijection betwen $\textrm{Hom}_{\mathbb{Z}}(\mathbb{Z},X)$ and $X$.