Doing a little self-study, and I'm given a submodule of $\mathbb{Z}^3$ generated by $f_1=(1,0,-1)$, $f_2=(2,-3,1)$, $f_3=(0,3,1)$ and $f_4=(3,1,5)$.
How do I find a base of the submodule? I put them in a matrix and reduced $ \begin{pmatrix} 1 & 2 & 0 & 3 \\ 0 & -3 & 3 & 1 \\ -1 & 1 & 1 & 5\end{pmatrix} \sim \begin{pmatrix} 1 & 2 & 0 & 3 \\ 0 & -3 & 3 & 1 \\ 0 & 0 & 4 & 9\end{pmatrix}. $ Does this mean I just take $\{f_1,f_2,f_3\}$ as a base for the submodule? What's the general way to do these computations?