I would like to understand the fact that the Cartesian product of finitely generated integral monoids is also a finitely generated monoid.
$\textbf{Definition:}$ A monoid is a set of vectors in Q and is defined under addition. When it only contains integer vectors, then it is called an integral monoid.
Let $M_1, M_2, \cdots, M_k$ be finitely generated integral monoids. Then, my goal is to investigate $M_1 \times M_2 \times \cdots \times M_k$.
The proof goes as follows. For the sake of simplicity, let us assume $k=2$. Let ${r}^1_1, {r}^1_2, \cdots {r}^1_n$ and ${r}^2_1, {r}^2_2, \cdots {r}^2_n$ correspond the finite set of vectors used to generate $M_1$ and $M_2$, respectively. Then, the following vectors can be used to generate $M_1 \times M_2$.
$ \begin{pmatrix} {r}^1_1 \\ 0 \end{pmatrix} , \cdots, \begin{pmatrix} {r}^1_n \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ {r}^2_1 \end{pmatrix} , \cdots, \begin{pmatrix} 0 \\ {r}^2_n \end{pmatrix} $
Could someone explain to me how these vectors are used to generate $M_1 \times M_2$ and provide a small example if possible?
Take any $\begin{pmatrix} r^1 \\ r^2\end{pmatrix} \in M_1\times M_2$. Since $M_1$ is generated by $r_1^1,\dots,r_{n_1}^1$ and $M_2$ is generated by $r_1^2,\dots,r_{n_2}^2$, we may write \begin{align} r^1 &= k_1^1 r_1^1 + \cdots + k_{n_1}^1 r_{n_1}^1 \\ r^2 &= k_1^2 r_1^2 + \cdots + k_{n_2}^2 r_{n_2}^2 \end{align} for some integers $k_i^1,k_j^2$ for $i=1,\dots,n_1$ and $j=1,\dots,n_2$.
Hence we have \begin{align} \begin{pmatrix} r^1 \\ r^2\end{pmatrix} &= \begin{pmatrix} k_1^1 r_1^1 + \cdots + k_{n_1}^1 r_{n_1}^1+0+0+\dots+0+0 \\ 0+0+\dots+0+0+k_1^2 r_1^2 + \cdots + k_{n_2}^2 r_{n_2}^2 \end{pmatrix} \\ &= k_1^1 \begin{pmatrix} r_1^1 \\ 0 \end{pmatrix} +\cdots+ k_{n_1}^1 \begin{pmatrix} r_{n_1}^1 \\ 0 \end{pmatrix} + k_1^2 \begin{pmatrix} 0 \\ r_1^2 \end{pmatrix} +\cdots+ k_{n_2}^2 \begin{pmatrix} 0 \\ r_{n_2}^2 \end{pmatrix}. \end{align}
This shows that $\begin{pmatrix} r_1^1 \\ 0 \end{pmatrix},\dots,\begin{pmatrix} r_{n_1}^1 \\ 0 \end{pmatrix},\begin{pmatrix} 0 \\ r_1^2 \end{pmatrix},\dots,\begin{pmatrix} 0 \\ r_{n_2}^2 \end{pmatrix}$ generate $M_1\times M_2$.