Stanford math qual: Abelian groups $G$ satisfying $0\to \Bbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} \to G \to \Bbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} \to 0$ I am studying for my qualifying exams and came across the following question: 


Find all abelian groups $G$ that fit into an exact sequence $0\to \Bbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} \to G \to \Bbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} \to 0$.


From another question on this site, I know I can make a diagram  of the form
$$\require{AMScd}
\begin{CD}
0 @>>> \mathbb{Z}^2 @>>> \mathbb{Z}^4 @>>> \mathbb{Z}^2 @>>> 0 \\
@. @VVV @VVV @VV V @. \\
0 @>>> \mathbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} @>>> G @>>> \mathbb{Z}\oplus \mathbb{Z}/3\mathbb{Z} @>>> 0.
\end{CD}
$$
Let us call the three vertical maps, from left to right respectively $f$, $g$ and $h$. By the Snake Lemma, I can extend the diagram above to one that looks like
\begin{CD}
 @. 0 @>>>0  @>>>0 @. \\
@. @VVV @VVV @VV V @. \\
0 @>>> \ker f @>>> \ker g @>>> \ker h @>>> 0 \\
@. @VVV @VVV @VV V @. \\
0 @>>> \mathbb{Z}^2 @>>> \mathbb{Z}^4 @>>> \mathbb{Z}^2 @>>> 0 \\
@. @VVV @VVV @VV V @. \\
0 @>>> \mathbb{Z} \oplus \Bbb{Z}/3\Bbb{Z} @>>> G @>>> \mathbb{Z}\oplus \mathbb{Z}3\mathbb{Z} @>>> 0\\
@. @VVV @VVV @VV V @. \\
 @. 0 @>>>0  @>>>0 @. \\
\end{CD}


Question 1: Since $\ker f = \ker h = \Bbb{Z}$, and $\Bbb{Z}$ is projective I know that the top non-zero row splits, and so $\ker g \cong \Bbb{Z}^2$. Can I say that $\ker f \hookrightarrow \ker g$ is inclusion into the first factor, and $\ker g\to \ker h$ is projection onto the second? 


If this is true, then I can present $G$ as the cokernel of the relations matrix
$$\left(\begin{array}{cc}  0 & a \\ 3 & b \\ 0 & 0 \\ 0 & 3  \end{array}\right)$$
for some integers $a,b\in\Bbb{Z}.$ This comes from analyzing the far top right and top left squares, and of course the assumption that question 1 is true.


Question 2: How can I simplify this matrix to give me nice information on what $G$ should be?


Edit 1: From the statement of the splitting lemma on pg. 147 of Hatcher, it looks as if I can basically arrange so that what I want in question 1 is true.
 A: Jim's and Pedro's answers are, of course, ok. I'm trying to do the calculation based on the idea you started with.
Question 1. Yes, you can assume that the first mapping is the inclusion to the former summand and the second is the projection on the latter. This is basically what splitting means. If
$$0\to A'\xrightarrow{f} A\xrightarrow{g}A''\to0$$
is a split short exact sequence then $A=\operatorname{im}f\oplus\operatorname{im}s$, where $s$ is the splitting homomorphism.
However, I'm not sure that you have the right idea about the set of possible homomorphisms in the central column from $\operatorname{ker}g\to\Bbb{Z}^4$. To remedy that let me describe the following
Lemma/Observation. Assume that we have a commutative diagram with split short exact rows.
$$\require{AMScd}
\begin{CD}
0 @>>> P_1' @>>> P_1 @>>> P_1'' @>>> 0 \\
@. @VVV @VVV @VV V @. \\
0 @>>> P_0' @>>> P_0 @>>> P_0'' @>>> 0.
\end{CD}
$$
Assume that the left column mapping is $f':P_1'\to P_0'$ and that the right column mapping is $f'':P_1''\to P_0''$. After identifying the modules in the middle as direct sums of the ones on the sides, the center column mapping then must be of the form
$$
f(x',x'')=(f'(x')+g(x''),f''(x'')),
$$
where $g:P_1''\to P_0'$ is an arbitrary homomorphifsm.
Sketch of a proof. Commutativity of the left square implies that for all $x'\in P_1'$ we have $f(x',0)=f\circ i_1 (x')=i_2\circ f'(x')=(f'(x'),0)$. Similarly commutativity of the right square gives that $f(0,x'')=(y,f''(x''))$, but leaves the component $y$ undetermined, because that get annihilated in the projection $P_0\to P_0''$ no matter what it is. The claim follows.
So as a $2\times2$ matrix the center column mapping looks like (acting from the left on the column vector $(x',x'')^T$)
$\pmatrix{f'&g\cr 0&f''\cr}$. The degree of freedom given to us in the choice of $g$ is crucial in building up the theory. You may have seen it exploited in the proof of long exact homology sequences, because this is needed in the construction of "compatible" projective resolutions for modules in a short exact sequence (leading up to a short exact sequence of chain complexes et cetera).
Anyway, this tells us that the choices for your key mapping $\ker g\cong\Bbb{Z}^2\to\Bbb{Z}^4$ in the middle column are given by matrices of the form (again acting from the left)
$$
M=\left(\begin{array}{cc}0&a\\3&b\\0&0\\0&3\end{array}\right).
$$
Question 2. How do you get the cokernel from this? You may recall that the structure of a quotient of two free modules $F_1/F_2$ over a PID (here $\Bbb{Z}$) is calculated using the so called stacked bases theorem (That's what they were called when I was in grad school. IIRC I have seen some people on our site refer to these as aligned bases). You can find a basis
of $F_1$, say $f_1,f_2,\ldots,f_n$ and coefficients (aka invariant factors)
$d_1\mid d_2\mid \cdots\mid d_n$ such that $d_if_i,i=1,2,\ldots,n$, form a basis of $F_2$. Furthermore, the invariant factors can be calculated from the Smith normal form of a matrix relating any bases of $F_1$ and $F_2$.
So in our case we are to put the matrix $M$ into Smith normal form, and check what alternatives there are. Undoubtedly you also remember how the invariant factors can be gotten from the GCDs of the $k\times k$ minors of that matrix.
Let's take stock. The GCD of $1\times1$ minors of $M$ is
$$
g_1=\gcd(3,a,b).
$$
The GCD of $2\times2$ minors of $N$ is
$$
g_2=\gcd(9,3a).
$$
There are no larger minors (or they vanish, if your prefer to tag two all zero columns to $M$ and think of it that way). The relation to invariant factors is (up to a unit multiplier)
$$
d_1=g_1,\qquad d_1d_2=g_2,\qquad d_1d_2d_3=g_3,\ldots.
$$
We have the following cases


*

*$g_1=1$, $g_2=3$. This occurs whenever $3\nmid a$. This leads to $d_1=1,d_2=3$ and
$$G\cong (\Bbb{Z}/3\Bbb{Z})\oplus\Bbb{Z}^2.$$

*$g_1=1$, $g_2=9$. This occurs whenever $3\mid a$ and $3\nmid b$. This yields $d_1=1,d_2=9$ and
$$G\cong (\Bbb{Z}/9\Bbb{Z})\oplus\Bbb{Z}^2.$$

*$g_1=3$, $g_2=9$. This occurs whenever $3\mid a,b$. In this case we have $d_1=d_2=3$ and
$$G\cong (\Bbb{Z}/3\Bbb{Z})\oplus (\Bbb{Z}/3\Bbb{Z})\oplus\Bbb{Z}^2.$$

A: It is clear that $G$ is finitely generated and as noted above it has free rank two. It suffices to determine what $\tau(G)$ (the torsion part of $G$) can be. Now $\tau(G)={\rm Tor}(G,\Bbb Q/\Bbb Z)$ which is left exact so we get an exact sequence $$0\longrightarrow \Bbb Z_3\longrightarrow \tau(G)\stackrel{f}\longrightarrow \Bbb Z_3\stackrel{g}\longrightarrow \Bbb Q/\Bbb Z\longrightarrow  (\Bbb Q/\Bbb Z)^2\longrightarrow \Bbb Q/\Bbb Z\longrightarrow 0 $$ 
since the torsion part of any group dies when tensoring with the divisible group $\Bbb Q/\Bbb Z$, and the free part contributes as many copies as its rank.
Since $\Bbb Z_3$ is simple, truncating this (i.e. inserting ${\rm im}(f)\longrightarrow 0$ at the end) means $\tau(G)$ fits into an exact sequence of the form $$0\longrightarrow \Bbb Z_3 \longrightarrow \tau (G) \longrightarrow  0$$ or $$ 0 \longrightarrow  \Bbb Z_3 \longrightarrow \tau(G) \longrightarrow \Bbb Z_3 \longrightarrow 0$$
which gives $\tau(G)$ either $\Bbb Z_3,\Bbb Z_9, \Bbb Z_3^2$.  
A: Note that $G$ is finitely generated.  In general, this sort of problem can be solved using the following procedure:
1. Find the free rank.
Since $\mathbb{Q}$ is flat over $\mathbb{Z}$, we can tensor with $\mathbb{Q}$ to get an exact sequence
$$
0 \;\to\; \mathbb{Q} \;\to\; G\otimes \mathbb{Q} \;\to\; \mathbb{Q} \;\to\; 0.
$$
It follows that $G\otimes\mathbb{Q} \cong \mathbb{Q}^2$, so $G$ has free rank $2$. That is, $G\cong \mathbb{Z}^2 \oplus A$, where $A$ is a  finitely generated abelian torsion group.
2. Find the number of factors associated to each prime.
You can get bounds on the number of factors associated to each prime using the functors $\mathrm{Hom}(\mathbb{Z}/p,-)$ and $- \otimes \mathbb{Z}/p$.  In this case, applying $\mathrm{Hom}(\mathbb{Z}/p,-)$ for $p\ne 3$ gives an exact sequence
$$
0 \;\to\; 0 \;\to\; \mathrm{Hom}(\mathbb{Z}/p,G) \;\to\; 0.
$$
Then $\mathrm{Hom}(\mathbb{Z}/p,G) = 0$ for $p\ne 3$, so all the torsion factors for $G$ are associated to the prime $3$.  We could apply the functor $\mathrm{Hom}(\mathbb{Z}/3,-)$ to show that there are either one or two such factors, but it's faster in this case to skip ahead to the next step.
3. Find the possible sizes for each factor.
This involves applying functors of the form $\mathrm{Hom}(\mathbb{Z}/p^n,-)$ for $n\geq 2$, keeping in mind that
$$
\mathrm{Hom}(\mathbb{Z}/p^n, E\oplus F) \;\cong\; \mathrm{Hom}(\mathbb{Z}/p^n, E) \oplus \mathrm{Hom}(\mathbb{Z}/p^n, F)
$$
and
$$
\mathrm{Hom}(\mathbb{Z}/p^n, \mathbb{Z}/p^m) \cong \mathbb{Z}/p^{\min(m,n)}.
$$
In this case, applying the functor $\mathrm{Hom}(\mathbb{Z}/27,-)$ gives an exact sequence
$$
0 \;\to\; \mathbb{Z}/3 \;\to\; \mathrm{Hom}(\mathbb{Z}/27,G) \;\to\; \mathbb{Z}/3.
$$
Then $\mathrm{Hom}(\mathbb{Z}/27,G)$ is either $\mathbb{Z}/3$, $\mathbb{Z}/3\oplus\mathbb{Z}/3$, or $\mathbb{Z}/9$.  It follows that $G$ is one of
$$
\mathbb{Z}^2 \oplus \mathbb{Z}/3,\qquad \mathbb{Z}^2\oplus (\mathbb{Z}/3)^2,\qquad \mathbb{Z}^2 \oplus \mathbb{Z}/9.
$$
It's easy to check that all three of these are possible.  In particular, the sequences
$$
0 \;\to\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\xrightarrow{\begin{bmatrix}0 & 0 \\ 3 & 0 \\ 0 & 1\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/3 \;\xrightarrow{\begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\to\; 0
$$
and
$$
0 \;\to\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\xrightarrow{\begin{bmatrix}1 & 0 \\ 0 & 0 \\ 0 & 1 \\ 0 & 0\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/3 \oplus \mathbb{Z}/3 \;\xrightarrow{\begin{bmatrix}0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\to\; 0
$$
and
$$
0 \;\to\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\xrightarrow{\begin{bmatrix}1 & 0 \\ 0 & 0 \\ 0 & 3\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}/9 \;\xrightarrow{\begin{bmatrix}0 & 1 & 0 \\ 0 & 0 & 1\end{bmatrix}}\; \mathbb{Z} \oplus \mathbb{Z}/3 \;\to\; 0
$$
are all exact.
