How to construct a basis of a submodule? We know that any submodule of a free module over a p.i.d. is free. By using proof of this fact, I want to construct a basis of the submodule $N$ of $M=\mathbb Z^4$, where $N$ is defined by equations $3x-3y+2z-4u=0$ and $2x+3z=0$. How to construct a basis of this submodule?
 A: We have an exact sequence
$$0 \rightarrow N \rightarrow M \xrightarrow{f} \mathbb{Z}^2 \rightarrow 0,$$ 
where $f(x,y,z,u)=(3x-3y+2z-4u, 2x+3z)$ (it is easy to see that $f$ is surjective).  Since this sequence splits (because $\mathbb{Z}^2$ is projective) , we know $N \oplus \mathbb{Z}^2 \cong M$, and hence the rank of $N$ must be 2.  Notice that $N=\ker(f)$.
As alluded to in the comments, this really boils down to finding a basis for the kernel of $f$.  I won't go through all of the steps, because I found it a bit tedious.  But I will tell you what to do.  Reduce the matrix for $f$ via row and column operations (by this I mean adding multiples of a row/column to another row/column, swapping rows/columns, or scaling a row/column by a unit (i.e. $1$ or $-1$)) until you get a matrix that is in reduced row echelon form, recording each column operation you do in the order you did them (the row operations don't change the kernel, so you needn't record those).  
Of course, it is easy to find a basis of the kernel of this resulting matrix: call the basis elements $b_1$ and $b_2$ (we know there will be two of them, by our reasoning above).  Then, apply the column operations in reverse order to $b_1, b_2$ to get two new vectors $e_1, e_2$; these are your basis vectors.  To be clear, what I mean by "apply the column operations in reverse order" is this: performing a column operation on a matrix is done by multiplying the matrix on the right by some square matrix $E$ (I'll leave it to you to figure out which matrices perform which column operations--it is not too hard to figure out).  So, in performing all of your column operations, you multiplied your matrix on the right by a product $E_1 \cdots E_n$.  Now, just apply the matrix $E_1 \cdots E_n$ to $b_1$ and $b_2$ to find $e_1$ and $e_2$.
What is going on here is that you are changing the basis of $\mathbb{Z}^4$ to something that makes the kernel of $f$ easy to see, then rewriting the kernel you found in terms of the old basis.
The answer I got was $e_1=(9,13,6,0), e_2=(12,16,8,1)$; of course, your answer may be different if you reduce your matrix differently.
