# Calculating Hom(A,B)

I have been studying modules and homological algebra as of late but somehow I have missed how to calculate Hom(A,B) for abelian groups, modules and Hom(A,_)/Hom(_,B) for exact sequences. I have no problem with the abstract nonsense in the subject. But explicit examples are useful and this construction is seldom mentioned explicitly in texts so I suspect it's pretty trivial but I'd still like someone to write this out for me.

Is it as as simple as finding generators in A and picking elements in B to send them to? (with careful adjectives of course, but I am looking for the general idea.)

Also some examples would be really helpful! (If they show a general idea, not just some clever construction.)

Thanks!

-
Yes, and then making sure all the relations are satisfied. Any specific examples you're having trouble with? – Qiaochu Yuan Aug 2 '11 at 18:22
Say for example all combinations of $\mathbb{Z}$, $\mathbb{Z}_p$ and $\mathbb{Q}$ as abelian groups. Not really difficult stuff, but I had an exam where calculating these took me very long and was error-prone, thus the question. – kbb Aug 2 '11 at 18:29
by $\mathbb{Z}_p$ do you mean the additive group of the $p$-adic integers or $\mathbb{Z}/p\mathbb{Z}$? – Qiaochu Yuan Aug 2 '11 at 18:32
How you compute depends on how the groups A, B, &c. are given. I think it would be best if you proposed a concrete example, and then hopefully we can show you how to handle it. The general question «how does one compute homs between abelian groups?» has no useful answer. – Mariano Suárez-Alvarez Aug 2 '11 at 18:45
For finitely generated modules over PIDs (including the case of finitely generated abelian groups) the universal properties of the direct sum/product yield that the problem of computing homs can be reduced to the problem of computing $\mathrm{Hom}(C,D)$, where $C$ and $D$ are cyclic; for f.g. abelian groups, this essentially solves the problem for this subclass. – Arturo Magidin Aug 2 '11 at 18:48

I guess there are probably intelligent things to say in general, but I don't really know what to say beyond "a homomorphism is specified by what it does to generators, and specifying the images of the generators gives a homomorphism if and only if all relations are sent to zero." So let's work through examples instead. I make heavy use of universal properties.

$\mathbb{Z}$ is the free abelian group on one generator. This means that $\text{Hom}(\mathbb{Z}, A)$ can be canonically identified with $A$ (where the identification sends a homomorphism to the image of $1$).

$\mathbb{Z}/p\mathbb{Z}$ is the free abelian group on a generator of order $p$. This means that $\text{Hom}(\mathbb{Z}/p\mathbb{Z}, A)$ can be canonically identified with the subgroup of all elements of $A$ of order (dividing) $p$.

$\mathbb{Q}$ is the colimit of its subgroups $\frac{1}{n} \mathbb{Z}$ with the obvious inclusions, so $\text{Hom}(\mathbb{Q}, A)$ can be canonically identified with the appropriate limit of copies of $\text{Hom}(\mathbb{Z}, A) \cong A$. The image of $1 \in \mathbb{Q}$ must be divisible, so if $A$ has no divisible elements, then $\text{Hom}(\mathbb{Q}, A) = 0$. If $A$ is torsion-free, then $\text{Hom}(\mathbb{Q}, A)$ can be canonically identified with the subgroup of divisible elements of $A$, since in this case the image of $1 \in \mathbb{Q}$ uniquely specifies a homomorphism.

That takes care of all combinations of $\mathbb{Z}, \mathbb{Z}/p\mathbb{Z}, \mathbb{Q}$, but it's probably worth saying some things about homomorphisms into these groups as well.

A homomorphism into $\mathbb{Z}$ has image $n \mathbb{Z}$ for some $n \ge 0$. If $n > 0$, then the image is isomorphic to $\mathbb{Z}$. Any surjection onto $\mathbb{Z}$ can be split, since $1 \in \mathbb{Z}$ can be sent to any element in its preimage, so any element of an abelian group $A$ which has nonzero image under a homomorphism $A \to \mathbb{Z}$ must have infinite order, and the subgroup it generates must be a direct summand of $A$, and this necessary condition is also sufficient.

A homomorphism $A \to \mathbb{Z}/p\mathbb{Z}$ necessarily factors through $A/pA$, which is a vector space over $\mathbb{F}_p$. Hence $\text{Hom}(A, \mathbb{Z}/p\mathbb{Z})$ can be canonically identified with the dual vector space $(A/pA)^{\ast}$ over $\mathbb{F}_p$.

Homomorphisms into $\mathbb{Q}$ seem somewhat complicated in general.

For more complicated examples, I guess the smart thing to do is write down short exact sequences and compute Ext groups. I don't know much about this, though, and I'm not sure the examples you're having trouble with merit techniques of this level.

-
Thank you very much! – kbb Aug 2 '11 at 19:16
@kbb: it isn't a good idea to accept answers this soon. Not having an accepted answer draws in more users to either contribute other useful answers or to vote on existing answers. It might be a good idea to edit into the question more examples you're having trouble with instead, if there are others. – Qiaochu Yuan Aug 2 '11 at 19:19
@Marek: I didn't say it was. I'm just describing its universal property. – Qiaochu Yuan Aug 2 '11 at 19:52
@Marek: the first part of that sentence can't be divorced from the rest of it. I am saying, intuitively speaking, that $\mathbb{Z}/p\mathbb{Z}$ is what you get if you specify that you have a group and an element of it of order $p$, but don't specify any other relations. And I am saying, precisely, that $\text{Hom}(\mathbb{Z}/p\mathbb{Z}, A)$ can be canonically identified with the subgroup of elements of order dividing $p$. The construction "free $X$ such that $Y$" makes sense in a great deal of generality and is not identical to "free $X$." – Qiaochu Yuan Aug 2 '11 at 20:03
@Marek: There is a concept of "relatively free groups" with respect to any variety (class of groups closed under arbitrary direct products, subgroups, and quotients). Just take the definition of free group in terms of a universal property, but consider only maps into groups that are in the variety. "Abelian groups" is a variety, and so is "abelian groups of exponent $n$". The relatively free abelian groups (commonly called "free abelian groups") the one you are familiar with; the relatively free abelian groups of exponent $n$ are direct sums of copies of $\mathbb{Z}/n\mathbb{Z}$. – Arturo Magidin Aug 2 '11 at 20:59