What is $\operatorname{Hom}_\mathbb{Z}(\mathbb{Q}/\mathbb{Z},\mathbb{Q}/\mathbb{Z})$?

$\newcommand\QQ{\mathbb Q}\newcommand\ZZ{\mathbb Z}$ If $p$ and $q$ are distinct primes, then there is no non-zero homorphism from $\ZZ_{p^\infty}$ to $\ZZ_{q^\infty}$. Since $\QQ/\ZZ\cong\bigoplus_q\ZZ_{p^\infty}$, we see that $\hom(\QQ/\ZZ,\QQ/\ZZ)=\prod_p\hom(\ZZ_{p^\infty},\ZZ_{p^\infty})$.

Fix a prime $p$. We know that $\ZZ_{p^\infty}$ can be described as the group generated by elements $x_n$ for all $n\geq0$ such that $px_1=0$ and $px_{n+1}=x_n$ for all $n\geq1$; the element $x_n$ corresponds to $\tfrac1{p^{n}}$ in this presentation. It follows that if $M$ is an abelian group, that giving a homomorphism $f:\ZZ_{p^\infty}\to M$ is the same as giving a sequence $(m_n)_{n\geq1}$ of elements of $M$ such that $pm_1=0$ and $pm_{n+1}=m_n$ for all $n\geq1$.

Now suppose $M=\ZZ_{p^\infty}$, let $f:M\to M$ be a morphism and suppose $(m_n)_{n\geq1}$ is the corresponding image; let us fix representatives for elements in $M$ as fractions $a/p^r$ with $0\leq a<p^r$ and $r\geq1$. Since $pm_1=0$, we must have $m_1=a_0/p$ for some $a_0\in\{0,\dots,p-1\}$. Since $pm_2=m_1=a_0/p$, we must have $m_2=a_0/p^2+a_1/p$ for some $a_1\in\{0,\dots,p-1\}$. Similarly, from $pm_3=m_2$ we now see that $m_3=a_0/p^3+a_1/p^2+a_2/p$ for some $a_2\in\{0,\dots,p-1\}$. And so on. It follows that there is a sequence $(a_n)_{n\geq0}$ of elements of $\{0,\dots,p\}$ such that $m_n=\sum_{i=0}^{n-1}a_i/p^{n-i}$.

This gives us a nice parametrization of $\hom(\ZZ_{p^\infty}, \ZZ_{p^\infty})$.

Notice that we have $p^nm_n=a_0+a_1p+a_2p^2+\cdots+a_{n-1}p^{n-1}$ in $\mathbb Z$; this makes sense, because I fixed representatives for elements of $M$ as fractions. The series $\sum_{n\geq0}a_ip^i$ converges in the $p$-adic integers $\ZZ_p$ to a certain number $\alpha$. This gives us a map $\hom(M,M)\to\ZZ_p$. It is surjective, because every $p$-adic integer is the sum of exactly one series like the one above, and clearly the map is injective. We have gotten ourselves a bijection.


$\mathbb{Q}/\mathbb{Z}$ can be described as the filtered colimit of its $n$-torsion subgroups, each isomorphic to $\mathbb{Z}/n\mathbb{Z}$. Hence $\text{Hom}(\mathbb{Q}/\mathbb{Z}, \mathbb{Q}/\mathbb{Z})$ is the cofiltered limit of the groups $\text{Hom}(\mathbb{Z}/n\mathbb{Z}, \mathbb{Q}/\mathbb{Z}) \cong \mathbb{Z}/n\mathbb{Z}$ (a simple form of Pontryagin duality), and a little inspection to check that the morphisms in the corresponding diagram are what you expect them to be shows that you get the profinite integers $\widehat{\mathbb{Z}} \cong \prod_p \mathbb{Z}_p$ (a priori as a group but in fact as a ring).