Two problems about Structure Theorem for finitely generated modules over PIDs 1) Let $A$ be a real 4 by 4 matrix. Supose $i,-i$ are the eigenvalues of $A$. Show that there exists an invertible matrix $P$ such that $PAP^{-1}$ is either
$$\begin{pmatrix}
0&-1&0&0\\
1&0&0&0\\
0&1&0&-1\\
0&0&1&0
\end{pmatrix}, 
\begin{pmatrix}
0&-1&0&0\\
1&0&0&0\\
0&0&0&-1\\
0&0&1&0
\end{pmatrix}.$$
2) Let 
$A=
\begin{pmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{pmatrix} 
$. Find an integer $r>0$ and positive integers $1<d_1\mid d_2\mid\cdots\mid d_s$ such that $\mathbb{Z}^3/A\mathbb{Z}^3$ is isomorphic to $\mathbb{Z}/d_1\mathbb{Z} \times \cdots \times \mathbb{Z}/d_s\mathbb{Z} \times \mathbb{Z}^r$.
I think both problems have something to do with the Structure Theorem for finitely generated modules over PIDs, but I am not familiar with that, would someone please help. Actually I don't even understand what is meant by $\mathbb{Z}^3/A\mathbb{Z}^3$...
 A: 1) The matrix $A$ has the characteristic polynomial $(X^2+1)^2$. Then its minimal polynomial can be $X^2+1$ or $(X^2+1)^2$. 
If the minimal polynomial of $A$ is $X^2+1$, then its characteristic matrix is equivalent to the canonical diagonal matrix having $1,1,X^2+1,X^2+1$ on the main diagonal. This corresponds to the decomposition of the $\mathbb R[X]$-module $\mathbb R^4$ given by $$\mathbb R[X]/(X^2+1)\oplus\mathbb R[X]/(X^2+1).$$ 
In this case your matrix is similar to 
\begin{pmatrix}
0&-1&0&0\\
1&0&0&0\\
0&0&0&-1\\
0&0&1&0
\end{pmatrix}
which is a matrix made by two (identical) companion matrices associated to the polynomial $X^2+1.$
On the other side, if the minimal polynomial of $A$ is $(X^2+1)^2$, then its characteristic matrix is equivalent to the canonical diagonal matrix having $1,1,1,(X^2+1)^2$ on the main diagonal. This corresponds to the decomposition of the $\mathbb R[X]$-module $\mathbb R^4$ given by $\mathbb R[X]/((X^2+1)^2)$. In this case your matrix is similar to 
\begin{pmatrix}
0&0&0&-1\\
1&0&0&0\\
0&1&0&-2\\
0&0&1&0
\end{pmatrix}
which is the companion matrix associated to the polynomial $(X^2+1)^2$.
As you can see this is not the given matrix, so you need to work more. What you have to do now is to show that this matrix and the given one are similar and to prove this use the following result: two matrices are similar iff their characteristic matrices are equivalent. This means that you have to consider the characteristic matrix of the given matrix and to show that it has the same canonical diagonal form as the matrix above.
2) I don't know if the first question has something to do with the structure theorem of modules over a PID, but the second definitely has via the Smith Normal Form. Here $A\mathbb Z^3$ denotes the $\mathbb Z$-submodule of $\mathbb Z^3$ generated by the rows (or columns) of $A$ and coincides to the $\mathbb Z$-submodule of $\mathbb Z^3$ generated by the rows (or columns) of its SNF. Since the SNF of $A$ is 
\begin{pmatrix}
1&0&0\\
0&3&0\\
0&0&0
\end{pmatrix}
we get that $\mathbb{Z}^3/A\mathbb{Z}^3$ is isomorphic to $\mathbb Z/3\mathbb Z\oplus\mathbb Z$.
