Find a basis of a subspace spanned by matrices $G = \langle \begin{bmatrix}1&1\\1&1\\ \end{bmatrix}, \begin{bmatrix}1&1\\1&0\\ \end{bmatrix}, \begin{bmatrix}2&-3\\1&1\\ \end{bmatrix},\begin{bmatrix}4&-1\\3&2\\ \end{bmatrix}$
First I write all the matrices as vectors:
$M_1 = \begin{bmatrix}1\\1\\1\\1 \end{bmatrix}$
$M_2 = \begin{bmatrix}1\\1\\1\\0 \end{bmatrix}$
$M_3 = \begin{bmatrix}2\\-3\\1\\1 \end{bmatrix}$
$M_4 = \begin{bmatrix}4\\-1\\3\\2 \end{bmatrix}$
Then I found the rref:
$$\begin{bmatrix}1 & 1 & 1 & 1\\1 & 1 & 1 & 0\\2 & -3 & 1 & 1\\4 & -1 & 3 & 2 \end{bmatrix} \rightarrow (...) \rightarrow \begin{bmatrix}1 & 0 & \frac{4}{5} & 0\\0 & 1 & \frac{1}{5} & 0\\0 & 0 & 0 & 1\\0 & 0 & 0 & 0 \end{bmatrix}$$
The basis I get is
$$(\begin{bmatrix}1 &0\\4/5&0 \end{bmatrix},\begin{bmatrix}0 &1\\\frac{1}{5}&0 \end{bmatrix}),\begin{bmatrix}0 &0\\0&1 \end{bmatrix}$$
Is this correct? It doesn't even come close to the solution in my book which is
$$(\begin{bmatrix}1 &1\\1&1 \end{bmatrix},\begin{bmatrix}1 &1\\1&0 \end{bmatrix}),\begin{bmatrix}2 &-3\\1&1 \end{bmatrix}$$

Your solution isn’t wrong per se. There’s an infinite number of them. It looks like you were meant to pick out a subset of the original four matrices that form a basis, which you can do by assembling those same flattened vectors into as columns instead of rows. After row-reduction, you can pick out the original vectors that correspond to pivot columns in the reduced matrix.
