Suggestions for computing $\mathbb{Z}[i]^3/K$ where $K=\langle(1,2,1), (0,0,5), (1,-i,6)\rangle$. 
Let $D$ be the ring $\mathbb{Z}[i]$ and $M=D^3$ the free $D$-module of rank $3$. Let $K$ be the submodule generated by $(1,2,1), (0,0,5), (1,-i,6)$. Prove that $M/K$ is finite, and determine its order.

I think my approach is naive and that I'm oversimplifying the problem. If I am incorrect, how can I find $M/K$?
The triples $(1,2,1), (0,0,5), (1,-i,6)$ are linearly independent, so wouldn't $K=M(1,2,1)+M(0,0,5)+M(1,-i,6)$ be equal to $M$? So that $M/K=0$? 
May I have a hint on how to proceed?
 A: Your answer is incorrect, and it is because the situation for modules is more complicated than that for vector spaces.  For vector spaces, what you say is true by dimension considerations.  If $V$ is a $3$-dimensional vector space, and $W$ is a $3$-dimensional subspace, then $V/W$ is $0$-dimensional so $V/W = 0$.  For modules, things are not so simple, mainly due to the existence of torsion modules.  For instance, consider $M = \mathbb{Z}$ and $K = 2 \mathbb{Z} \leq M$ as $\mathbb{Z}$-modules.  Both are free of rank $1$, but $M/K = \mathbb{Z}/2\mathbb{Z} \neq 0$.
First, some general theory.  Given a free module $M$ with rank $n < \infty$ over a PID $R$, every submodule $N \leq M$ is also free of finite rank.  Moreover, there is a basis $y_1, \ldots, y_n$ of $M$ and scalars $a_1, \ldots, a_m \in R$ such that $a_1 \mid \cdots \mid a_m$ and $a_1 y_1, \ldots, a_m y_m$ is a basis of $N$.  Then
\begin{align*}
\frac{M}{N} = \frac{y_1 R \oplus \cdots \oplus y_m R \oplus \cdots \oplus y_n R}{a_1 y_1 R \oplus \cdots \oplus a_m y_m R} \cong \frac{R}{a_1 R} \oplus \cdots \oplus \frac{R}{a_m R} \oplus R^{n-m} \, .
\end{align*}
Furthermore, these scalars $a_i$ can be computed from the Smith normal form of a matrix.
Now to this particular problem.  First note that $\mathbb{Z}[i]$ is a PID, so the result above applies.  To find the scalars $a_i$ as above, we consider the matrix whose columns are the generators of $K$.
$$
\begin{pmatrix}
1 & 0 & 1\\
2 & 0 & -i\\
1 & 5 & 6
\end{pmatrix}
$$
To compute the Smith normal form of this matrix, we simply apply elementary row and column operations to obtain a diagonal matrix.  For instance, by adding multiples of the first row to the second and third rows, we obtain the matrix
$$
\begin{pmatrix}
1 & 0 & 1\\
0 & 0 & -2-i\\
0 & 5 & 5\\
\end{pmatrix} \, .
$$
Try to finish the computation yourself.  In the end, I get the diagonal matrix
$$
\begin{pmatrix}
1 & 0 & 0\\
0 & 2+i & 0\\
0 & 0 & 5
\end{pmatrix} \, .
$$
Then
$$
\frac{M}{K} \cong \frac{\mathbb{Z}[i] \oplus \mathbb{Z}[i] \oplus \mathbb{Z}[i]}{\mathbb{Z}[i] \oplus (2+i) \mathbb{Z}[i] \oplus 5 \mathbb{Z}[i]} \cong \frac{\mathbb{Z}[i]}{(2+i)\mathbb{Z}[i]} \oplus \frac{\mathbb{Z}[i]}{5\mathbb{Z}[i]}
$$
so the problem reduces to finding the number of elements in these two quotient modules.  Since $5 = (2+i)(2-i)$, you can use the Chinese Remainder Theorem and the answers here and here to find the answer.
A: Make a matrix of the three given triples with $(1,2,1)$ in the first column. The gcd is $1$. 
Use the row operations to make the first column $(1,0,0)$, then use column operations to make the first row $(1,0,0)$. Now determine the gcd of the smaller matrix elements with first row and column removed. 
Use row and column operations to bring the element with smallest gcd to the place $a_{2,2}$. 
Using a row operation make the element in $a_{3,2}$ to be $0$. Then use column operation to make the element in $a_{2,3}$ to be $0$. You get a diagonal matrix $a$ divides $b$ divides $c$. 
Divide $\mathbb Z[i]$ by the ideal $(a)$ then divide $\mathbb Z[i]$ by the ideal $(b)$. Then divide $\mathbb Z[i]$ by the ideal $(c)$. The direct sum is the answer. 
See Vander Waarden Algebra volume 2 pp1-3
