Let S and T be the subspaces of M_2(R) generated by the matrices \lbrace A_1,A_2,A_3\rbrace and
\lbrace B_1,B_2\rbrace respectively, where

A_1 = \begin{bmatrix}1&1\\0&0\end{bmatrix}, A_2=\begin{bmatrix}1&1\\1&0\end{bmatrix}, A_3= \begin{bmatrix}1&1\\1&1\end{bmatrix}
and
B_1 = \begin{bmatrix}1&0\\1&0\end{bmatrix}, B_2=\begin{bmatrix}1&1\\2&0\end{bmatrix}

Determine dim(s) and dim(T).

---------------------

Now, the problem I have with this is that, I know how to find a basis (and hence a dimension) for vector spaces over real-number fields (i.e. \mathbb{R}^n), by stacking the spanning vectors and reducing the matrix to echelon form, etc. But here we have matrices. How can I stack them?