How to find a basis for $2\times 2$ matrix

Solution 1:

An arbitrary element of $W$ is $$ A=\begin{pmatrix} a & a \\a & b\end{pmatrix}=a\begin{pmatrix} 1 & 1 \\1 & 0\end{pmatrix}+b\begin{pmatrix} 0 & 0 \\0 & 1\end{pmatrix} $$ So a basis of $W$ is $\{\begin{pmatrix} 1 & 1 \\1 & 0\end{pmatrix}, \begin{pmatrix} 0 & 0 \\0 & 1\end{pmatrix}\}$

Solution 2:

Hint: Every $2\times 2$ matrix may be written as $$ \begin{bmatrix} a & b\\ c& d \end{bmatrix} = a\begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} + b\begin{bmatrix} 0 & 1\\ 0 & 0 \end{bmatrix} + c\begin{bmatrix} 0 & 0\\ 1 & 0 \end{bmatrix} +d\begin{bmatrix} 0 & 0\\ 0 & 1 \end{bmatrix} $$ This shows that $$ \left\{ \begin{bmatrix} 1 & 0\\ 0 & 0 \end{bmatrix} ,\begin{bmatrix} 0 & 1\\ 0 & 0 \end{bmatrix} ,\begin{bmatrix} 0 & 0\\ 1 & 0 \end{bmatrix} ,\begin{bmatrix} 0 & 0\\ 0 & 1 \end{bmatrix} \right\} $$ is a basis for the vector space $M_2$ of all $2\times 2$ matrices.

Can you construct a similar argument for your subspace $W$?