# Finding a basis for a set of $2\times2$ matrices

Find a basis for $M_{2\times2}$ containing the matrices $$\begin{pmatrix} 1 & 1 \\ 2 & 3 \end{pmatrix}$$ and $$\begin{pmatrix} 1 & 1 \\ 3 & 2 \end{pmatrix}$$

I know that every $2\times2$ matrix $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ can be written as:

$$a\begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} + b \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix} + c \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} + d \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix}$$

so those matrices are a basis for the vector space of $2\times2$ matrices, but how do I apply this to specific matrices? I know how to find a basis for a set of vectors, but matrices confuse me.

• Could you find a basis of $\Bbb R^4$ containing $(1,1,2,3)$ and $(1,1,3,2)$? – Omnomnomnom Mar 13 '17 at 13:03
• @Omnomnomnom Would I row reduce $\bigl( \begin{smallmatrix} 1 & 1 & 2 & 3 \\ 1 & 1 & 3 & 2 \end{smallmatrix} \bigr)$ to get $\bigl( \begin{smallmatrix} 1 & 1 & 0 & 5 \\ 0 & 0 & 1 & -1 \end{smallmatrix} \bigr)$ so that the basis is {(0,1,1,0), (-5,1,1,0)}? – AmaC Mar 13 '17 at 13:11
• that is not a basis of $\Bbb R^4$. That's one of the tricky parts here. – Omnomnomnom Mar 13 '17 at 13:17
• Oh I see that now... I'm still pretty confused on how to solve my problem then.. – AmaC Mar 13 '17 at 13:18
• The other tricky part is seeing that my question is pretty much the same as the one you were given – Omnomnomnom Mar 13 '17 at 13:19

Here's a systematic approach: to begin, find a basis for $\Bbb R^4$ containing the vectors $(1,1,2,3)$ and $(1,1,3,2)$. Following the method that I outline here, we find that $\{(1,1,2,3),(1,1,3,2),(1,0,0,0),(0,1,0,0)\}$ is a basis for $\Bbb R^4$. Correspondingly, $$\left\{\pmatrix{1&1\\2&3}, \pmatrix{1&1\\3&2}, \pmatrix{1&0\\0&0}, \pmatrix{0&1\\0&0} \right\}$$ is a basis for $M_{2 \times 2}$

The two matrices are linearly independent, so they are a basis for the two dimensional vector space spanned by them.

If you want a basis for $M_{2\times2}$ add two linearly independent matrices that are linearly independent from them. As an example you can chose:

$$\begin{pmatrix} 0 & 0 \\ 2 & 3 \end{pmatrix} \qquad \begin{pmatrix} 3 & 2 \\ 0 & 0 \end{pmatrix}$$

• but the question asks that you extend this to a basis of $M_{2\times 2}$ – Omnomnomnom Mar 13 '17 at 13:14
• @Emilio Novati What does this tell me about the basis of these matrices? – AmaC Mar 13 '17 at 13:15
• @Omnomnomnom: I see , and I add to my answer. – Emilio Novati Mar 13 '17 at 13:27
• @EmilioNovati I don't think your suggestion works; the last matrix would be a linear combination of the other ones (in the given order: $M_4 = M_2-M_1+M_3)$ – StackTD Mar 13 '17 at 13:43
• @StackTD: Right! I edit. – Emilio Novati Mar 13 '17 at 13:50

You can go with more trial & error-like approaches, or go for a more systematic approach. If you can easily add two linearly independent matrices "by inspection", then you are done. This is doable in your case (see Emilio Novati's answer) but can get hard(er) in a more general case.

Knowing the standard basis, you could look at: $$\left\{ \begin{pmatrix} 1 & 1 \\ 2 & 3 \end{pmatrix}, \begin{pmatrix} 1 & 1 \\ 3 & 2 \end{pmatrix}, \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}, \begin{pmatrix} 0 & 0 \\ 0 & 1 \end{pmatrix} \right\}$$ Because the last 4 matrices form a basis for $M_{2 \times 2}$, this set clearly spans $M_{2 \times 2}$. But since $M_{2 \times 2}$ is 4-dimensional, this set cannot be linearly independent. Work from left to right and omit any matrix which can be written as a linear combination of the matrices before; i.e. deleting the linearly dependent matrices to end up with a basis for $M_{2 \times 2}$ containing the given two matrices.

This can be done in a more systematic way by entering the matrices in columns, identifying the matrix $\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)$ with the column vector $(a,b,c,d)^T$ and then row reducing this matrix; the linearly independent columns (and thus corresponding matrices) will be the pivot columns. This approach is explained in Omnomnomnom's answer as well.

Alternatively, you can check this answer for another systematic approach. I'll leave out the details here, but identifying the matrix $\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right)$ with the vector $(a,b,c,d) \in \mathbb{R}^4$, this comes down to finding a basis for the null space of the matrix (WolframAlpha): $$\begin{pmatrix} 1 & 1 & 2 & 3 \\ 1 & 1 & 3 & 2 \end{pmatrix}$$ So a basis would also be: $$\left\{ \begin{pmatrix} 1 & 1 \\ 2 & 3 \end{pmatrix}, \begin{pmatrix} 1 & 1 \\ 3 & 2 \end{pmatrix}, \begin{pmatrix} -5 & 0 \\ 1 & 1 \end{pmatrix}, \begin{pmatrix} -1 & 1 \\ 0 & 0 \end{pmatrix} \right\}$$

• if I put the matrices into columns of a larger matrix, I get $\bigl( \begin{smallmatrix} 1&1&1&0&0&0\\ 1&1&0&1&0&0\\2&3&0&0&1&0\\3&2&0&0&0&1\end{smallmatrix} \bigr)$ which row reduces to $\bigl( \begin{smallmatrix} 1&1&1&0&0&0\\ 0&1&-2&0&1&0\\0&0&1&-1&0&0\\0&0&0&-5&1&1\end{smallmatrix} \bigr)$. From here, I am wondering where you got the last 2 vectors in your answer for the basis. – AmaC Mar 13 '17 at 20:42
• @AmaC that is the method I described before (see also Omnomnomnom's answer); note that you can further reduce to clearly identify the pivot colums. The two matrices in the last part of my answer are the result of a different method. I descibe it in more detail in another answer (see link). – StackTD Mar 13 '17 at 21:24
• And if you were wondering why they are / can be different; a basis is not unique so extending your two matrices to a complete basis can also be done in multiple ways (an infinite number of ways, in fact). – StackTD Mar 13 '17 at 21:25