# Find basis for set of matrices

The set $M_{mn}$ of all m×n matrices forms a vector space, with addition and scalar multiplication just being the usual operations of addition and scalar multiplication of matrices, and with the zero vector being the zero matrix. What is the dimension of $M_{mn}$? You should justify your result by describing a basis, which you must show to be linearly independent and to span$M_{mn}$

I was having trouble, so I tried to understand it by using 2x2 matrices. All 2x2 matrices are linear combinations of the following 4 matrices;

$M_{mn} = span\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)$

Google gave me conflicting information on the next step. Some results said that I can just write them as vectors;

$M_{mn} = span\{(1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1)\}$

Writing those as rows of a matrix, this becomes $I^4$, which I think spans $M_{2×2}$. So... $M_{2×2}$ covers $R^4$?

But a couple of results said that I am not allowed to write the matrices like this (at least not without some kind of proof, which I don't recall covering in lectures).

1. Is there a name for the vectors/matrices with all zeroes and a single 1?

2. By looking at my 2×2 working, I think for n×m matrices I should get $I^{n\cdot m}$. Does this mean the dimension for $M_{mn}$ is simply $R^{m\cdot n}$? If so, do I need to do anything special to prove this?

3. What could go wrong with writing the matrices as vectors (like above)? Is there a way to avoid that problem, or avoid using this approach altogether?

Yes, there is no need to "flatten" the matrices and turn them into row vectors. Let us denote by $E_{ij}$ the matrix whose $(i,j)$-th entry is $1$ and all other entries are zero. For the $2 \times 2$ case we have the matrices $E_{11},E_{12},E_{21},E_{22}$. We want to show that they form a basis for $M_{2 \times 2}(\mathbb{F})$. To do this, we need to show two things:

1. The set $\{ E_{11}, E_{12}, E_{21}, E_{22} \}$ is spanning. That is, every matrix $A \in M_{2 \times 2}(\mathbb{F})$ can be written as a linear combination of the $E_{ij}$'s. So let $$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in M_{2 \times 2}(\mathbb{F})$$ and note that

$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} = 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} \\ = a E_{11} + b E_{12} + cE_{21} + dE_{22}.$$

1. The set $\{ E_{11}, E_{12}, E_{21}, E_{22} \}$ is linearly independent. So assume that

$$a E_{11} + b E_{12} + c E_{21} + d E_{22} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} = 0_{2 \times 2}.$$ But this immediately implies that $a = b = c = d = 0_{\mathbb{F}}$.

The proof for the $m \times n$ case is the same and the dimension of $M_{m \times n}(\mathbb{F})$ will be $m \cdot n$.

• I understand how you've shown that they're spanning, and linearly independent. But I don't understand how you found the dimension of $M_{m×n}$ from this. – KookieMonster Feb 5 '17 at 2:14
• Repeat the argument for $M_{m \times n}(\mathbb{F})$. There will be $m \cdot n$ matrices $E_{11}, \dots, E_{1n}, E_{21}, \dots, E_{2n}, \dots, E_{m1}, \dots, E_{mn}$ that will span the space and will be linearly independent. – levap Feb 5 '17 at 2:15
• Ahhh, so the dimension is the number of elements in the span. Does that also mean that $M_{m×n}$ will be in $R^{m\cdot n}$? – KookieMonster Feb 5 '17 at 2:17
• If there are $k$ vectors that are both linearly independent and spanning then the dimension of the space is $k$. And no, matrices and row/column vectors are different entities. It is true that $M_{m \times n}(\mathbb{R})$ and $\mathbb{R}^{m \cdot n}$ have the same dimension and so they are isomorphic vector spaces but they are not the same. – levap Feb 5 '17 at 2:19
• I understand mostly. I don't fully understand about isomorphism etc, but we haven't covered it yet, so yeah. Thank you very much for your help :) – KookieMonster Feb 5 '17 at 2:38