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?
 A: Once you have determined $a$ and $b$, you already know what $c$ and $d$ should be. It's imposed on you. Hence, the dimension of the subspace, which can be thought of as the number of independent variables in this case, is $2$. You can also prove this rigorously by showing that 
$$B=\left\{\begin{bmatrix}1 & 0\\1 & 1\\\end{bmatrix},\begin{bmatrix}0 & 1\\
1 & 0\\\end{bmatrix}\right\}$$
is a basis for this subspace, i.e. $S$ is spanned by those two matrices and they are linearly independent.
A: 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$.
A: $S$ is $2$ dimensional.   $M_{2×2}\cong\mathbb F^4$, where $\mathbb F$ is the field you are working over. 
A basis for $S$ is $\{\begin {pmatrix} 1&0\\1&1\end{pmatrix},\begin{pmatrix}1&1\\2&1\end{pmatrix}\}$.
