Finding the dimension of subspace $S=\{ \left[\begin{smallmatrix} a & b\\ c & d\\ \end{smallmatrix}\right] \mid c = a + b, d=a \}.$ 
Let the subspace $S$ from $M_{2\times2}$: $$S=\left\{ \begin{bmatrix}
a & b\\
c & d\\
\end{bmatrix} \mid c = a + b\textrm{ and }d=a \right\}.$$ What is the dimension of $S$?

According to the answer key, $\dim (S)=2$. Why is it not $\dim(S)=2\times2=4$? What am I missing?

The subspace $S$ consist of matrices of the form
$
\begin{pmatrix}
  a & b \\
 a+b& a \\
\end{pmatrix}
$. Every such matrix can be written as a linear combination
$$
\begin{pmatrix}
  a & b \\
 a+b& a \\
\end{pmatrix}=
a\begin{pmatrix}
  1 & 0 \\
  1 & 1 \\
\end{pmatrix}+
b\begin{pmatrix}
  0 & 1 \\
  1 & 0 \\
\end{pmatrix}.
$$
If you also check that the matrices
$\begin{pmatrix}
  1 & 0 \\
  1 & 1 \\
\end{pmatrix}$, $\begin{pmatrix}
  0 & 1 \\
  1 & 0 \\
\end{pmatrix}$ are linearly independent, you get that this is a basis for $S$.
