Let S and T be the subspaces of $\displaystyle M_2(R)$ generated by the matrices $\displaystyle \lbrace A_1,A_2,A_3\rbrace$ and

$\displaystyle \lbrace B_1,B_2\rbrace$ respectively, where

$\displaystyle 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

$\displaystyle 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. $\displaystyle \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?