# Proof that $\mathbb{Q}$ is injective but $\mathbb{Z}$ is not

I am trying to understand why $\mathbb{Q}$ is an injective abelian group but $\mathbb{Z}$ is not.

We say that an abelian group $A$ is injective if it has the following property: Given an abelian group $Q$, a subgroup $P<Q$ and a homomorphism $f:P\rightarrow A$ then there exists a homomorphism $g:Q\rightarrow A$ whose restriction to $P$ is $f$.

$\mathbb{Z}$ is not injective and this can be seen by considering the group $Q=(\mathbb{Q},+)$ with $P = \mathbb{Z}$ and $f:\mathbb{Z} \rightarrow \mathbb{Z}$ the identity map.

The following is a proof that $\mathbb{Q}$ is injective(from some of my course notes):

Let $Q$ be an abelian group with subgroup $P$ emedded within $Q$ via an injective map $i:P\rightarrow Q$. Since $P$ and $Q$ are both abelian they are direct products of cyclic groups. Let $G$ be a set of generators for $P$ and $H$ a set of generators for $Q$ containing $i(G)$. Notice that the image $f(P)$ is free abelian, since torsion elements must be mapped to $0\in\mathbb{Q}$

Define a map $g:H\rightarrow \mathbb{Q}$ by $g(x)=f(y)$ if there exists $y\in G$ so $i(G)=x$, otherwise define $G(x)=0$. Extend this map in the natural unique way to make a homomorhism $g:Q\rightarrow \mathbb{Q}$. This is well defined as $i$ is injective. Moreover, for all $x\in G$, we have $g(x)=f(y)=f(i(x))$; so as the image of $P$ under both maps is free abelian we have $g(x)=f(i(x))\forall{x}\in P$. Hence $\mathbb{Q}$ is injective.

I understand the counterexample for $\mathbb{Z}$ and I understand the proof. However I cannot understand why this proof doesn't apply to $\mathbb{Z}$. Having thought about this for a while I am now not sure if the proof is valid, since it assumes all abelian groups (not just finitely generated) are the product of cyclic groups.

Thanks for any help

-
you might want to rewrite "Z is not injective and this can be seen by considering the group Q=(Q,+) with P=Z and f:Z→Z the identity map.".... – Praphulla Koushik Oct 23 '13 at 9:37
In fact, as Rotman says, $\mathbb Q$ is divisible while $\mathbb Z$ is not. And that's why it has not the injective property. – Babak S. Oct 23 '13 at 9:39
@BabakS. thanks, so where in the proof that $\mathbb{Q}$ is injective do we use the fact that $\mathbb{Q}$ is divisible? – hmmmm Oct 23 '13 at 9:54

The proof is bogus. Take for example $Q=\mathbb Z$, $P=2\mathbb Z$, $G=\{2\}$, $H=\{1,2\}$. If $f\ne0$, there is no homomorphism $g$ extending $f$ with $g(1)=0$.
Why does this show that the proof that $\mathbb{Q}$ is injective is bogus? – hmmmm Oct 23 '13 at 10:23
@hmmmm Carsten is right. The proof is bogus, because the map $g$ it defines is not a group homomorphism. If $y\in Q$ is not in $P$, but $2y$ is, then you cannot just send $y$ to 0, since the image of $2y$ is determined for you by $f$. You have to send $y$ to "half that image", i.e. to some element of $A$ that doubles to $f(2y)$. This also shows why the fact that $\mathbb{Q}$ is divisible is crucial for it to be injective. – Alex B. Oct 23 '13 at 10:59