# Z modules spanned by row space of matrix invariant under matrix multiplication

I have met this strange looking problem on which I have no idea, from my course on Abstract Algebra dealing with modules:

Let $v_1,...,v_k \in \mathbb{Z}^n$ row vectors of length n over $\mathbb{Z}$

and we denote the subgroup of $\mathbb{Z}^n$ generated by these vectors by $(v_1,...,v_k)= \mathbb{Z}v_1 + ... + \mathbb{Z}v_k$. Now we define the following matrix: $A \in M_{k \times n}(\mathbb{Z})$ the matrix whose ith row is the vector $v_i$, and we are now given a matrix $g \in GL_k(\mathbb{Z})$. We denote by $w_1,...,w_k$ the rows of the matrix $gA$, we are asked to show that $(v_1,...,v_k) = (w_1,...,w_k)$ i.e. the subgroups spanned by the rows of A and gA over $\mathbb{Z}$ are equal.

I know Abelian groups can be thought of as $\mathbb{Z}$ modules but I really do not know how to proceed, I certainly need help to solve this and thank all helpers

For $1 \le i \le k$, we have $w_i = \sum_{j=1}^k g_{ij}v_j$. So each vector $w_i$ is an integral linear combination of the vectors $v_j$, and hence $(w_1,\ldots,w_k) \le (v_1,\ldots,v_k)$.
If $B \in M_{k \times n}({\mathbb Z})$ denotes the matrix whose rows are the $w_i$, then $B = gA$, so $A = g^{-1}B$ and we get the reverse inclusion.