# Basis that contains a basis for a subspace

I have this exercise and I want to know if my answer is correct. The exercise is:

Consider the linear space $\mathbb{R}^{2\times2}$ of $2\times2$ matrices with real entries. Consider $W$ contained in this space:

$$W = \{[a_{i,j}] \in \mathbb{R}^{2\times2}\mid a_{1,1} + a_{2,2} = 0\}$$

Calculate a basis of $\mathbb{R}^{2\times2}$ that contains a basis of $W$

So my doubt is in the question. Do they simply want a basis for $W$? Because that's easy

$\left\{\begin{pmatrix} 1 & 0 \\0 & -1\end{pmatrix}, \begin{pmatrix} 0 & 1 \\0 & 0\end{pmatrix}, \begin{pmatrix} 0 & 0\\ 1 & 0 \end{pmatrix}\right\}$

But my doubt is if this is really what they want because they refer a basis of $\mathbb{R}^{2\times2}$ and for that we should have an extra fourth matrix, right?

Can someone clarify this for me?

• No basis of $\mathbb{R}^{2\times2}$ can contain $W$, but it can contain a basis of $W$. – egreg Apr 24 '16 at 15:40

You seem to be missing some words:

Calculate a basis of $\mathbb{R}^{2\times2}$ that contains a basis of $W$

is the correct wording.

You have computed correctly a basis for $W$; now a general result is that

if $\{v_1,\dots,v_m\}$ is a linearly independent set in the vector space $V$ and $v\in V$ with $v\notin\operatorname{Span}\{v_1,\dots,v_m\}$, then the set $\{v_1,\dots,v_m,v\}$ is linearly independent.

So you can just find a matrix not in $W$, which is easy, and add it to the set you found. The resulting set has four elements and is linearly independent, so it is a basis for $\mathbb{R}^{2\times2}$ (because this space has dimension $4$).

More generally, the exchange lemma says that if you have a linearly independent set $\{v_1,\dots,v_m\}$ and a basis $\{w_1,\dots,w_n\}$ of a vector space, you can replace $m$ vectors in the basis with $v_1,\dots,v_m$ so that the resulting set is again a basis.

Use $\left(\begin{array}{cc}1&0\\0&0\end{array}\right)$ to complete a set of 4 linearly independent matrices in $\Bbb R^{2\times2}$.