Building a Basis from Single-Entry Matrices
Every real \(m\times n\) matrix is an array of \(mn\) real entries. A useful way to understand the space of all such matrices is to isolate one entry at a time: make one chosen entry equal to \(1\) and set every other entry equal to \(0\). These simple matrices can be combined to construct any matrix, and the coefficient of each one records exactly one entry of the result.
Let \(m,n\in\mathbb{N}\). The set \(M_{m\times n}(\mathbb{R})\) consists of all \(m\times n\) matrices with real entries, with addition and scalar multiplication performed entry by entry. For \(1\le i\le m\) and \(1\le j\le n\), define \(E_{ij}\) to be the matrix whose entry in row \(i\), column \(j\) is \(1\), and whose other entries are \(0\). The first index identifies the row; the second identifies the column.
For example, the single-entry matrices in \(M_{2\times 3}(\mathbb{R})\) are
A basis is an ordered list of vectors that is linearly independent and spans the space: spanning means every vector in the space is a linear combination of the list, and linear independence means that only the all-zero choice of coefficients gives the zero vector. Here the vectors are matrices, and their linear combinations use ordinary matrix addition and scalar multiplication.
Proof. First, let \(\mathbf{A}=[a_{ij}]\) be any matrix in \(M_{m\times n}(\mathbb{R})\). In the sum \(\sum_{i=1}^{m}\sum_{j=1}^{n}a_{ij}E_{ij}\), the matrix \(a_{ij}E_{ij}\) has entry \(a_{ij}\) in position \((i,j)\) and zero in every other position. Therefore the entry in row \(r\), column \(s\) of the whole sum is \(a_{rs}\): only the term \(a_{rs}E_{rs}\) contributes to that position. Every entry of the sum agrees with the corresponding entry of \(\mathbf{A}\), so \(\mathbf{A}=\sum_{i=1}^{m}\sum_{j=1}^{n}a_{ij}E_{ij}\). Thus the list spans the space.
Next, suppose \(\sum_{i=1}^{m}\sum_{j=1}^{n}c_{ij}E_{ij}=\mathbf{O}\), where \(\mathbf{O}\) is the zero matrix. At position \((r,s)\), the left-hand side has entry \(c_{rs}\), because \(E_{rs}\) is the only matrix in the sum that has a nonzero entry at that position. The right-hand side has entry \(0\), so \(c_{rs}=0\). This holds for every allowed pair \((r,s)\), and hence every coefficient is zero. The list is linearly independent. Since it both spans and is linearly independent, it is a basis. \(\square\)
Writing a Matrix in the Natural Basis
The theorem gives an entry-by-entry expansion. If \(\mathbf{A}=[a_{ij}]\), the coefficient on \(E_{ij}\) is \(a_{ij}\), so the expansion places each entry back in its own position. The list order matters when recording coordinates: throughout this tutorial, we use row-major order, listing all positions in row 1 from left to right, then all positions in row 2, and continuing through row \(m\).
This convention gives a direct conversion in either direction. To go from a matrix to its coordinate vector, read its entries row by row and place them in a column. To go from a coordinate vector back to a matrix, place the entries in the same order into successive rows. This definition is specific to the ordered basis \(\mathcal{E}\); changing the order of the basis matrices changes the order of the coordinates.
Worked Example: Expanding a \(2\times 3\) Matrix
Write \(\mathbf{A}=\begin{bmatrix}2&-1&0\\3&4&1\end{bmatrix}\) as a linear combination of the single-entry matrices, and give its coordinate vector in \(\mathcal{E}\).
Match each entry to the matrix unit in the same position. The first row contributes \(2E_{11}-E_{12}+0E_{13}\), and the second row contributes \(3E_{21}+4E_{22}+E_{23}\). Thus
Reading the entries row by row gives the coordinate vector \([\mathbf{A}]_{\mathcal{E}}=(2,-1,0,3,4,1)^{\top}\). To check the expansion, put the six contributions into their respective positions:
The zero coefficient on \(E_{13}\) is included to make clear that its position is still part of the coordinate list.
Reconstructing Matrices from Coordinates
A coordinate vector is useful only if its ordering is kept consistent with the basis ordering. For row-major coordinates, the first \(n\) entries fill the first row of the matrix, the next \(n\) fill the second row, and so on. This is not an extra calculation: it follows from the fact that each coefficient multiplies exactly one matrix unit.
Worked Example: Reconstructing a Matrix
Find the matrix whose coordinate vector in the row-major basis of \(M_{2\times 3}(\mathbb{R})\) is \((5,0,-2,1,3,4)^{\top}\), and verify the result.
The first three coordinates belong to \(E_{11},E_{12},E_{13}\), so they form the first row. The final three belong to \(E_{21},E_{22},E_{23}\), so they form the second row. The matrix is therefore
Expanding using the coordinates gives \(\mathbf{B}=5E_{11}+0E_{12}-2E_{13}+E_{21}+3E_{22}+4E_{23}\). The first row of this sum is \((5,0,-2)\), since \(5E_{11}\), \(0E_{12}\), and \(-2E_{13}\) place those entries in columns 1, 2, and 3. The second row is \((1,3,4)\), since \(E_{21}\), \(3E_{22}\), and \(4E_{23}\) place those entries in the corresponding second-row positions. Thus the expansion gives exactly \(\begin{bmatrix}5&0&-2\\1&3&4\end{bmatrix}\), and reading this matrix row by row recovers \((5,0,-2,1,3,4)^{\top}\), as required.
Proof. The expansion follows because, for each position \((r,s)\), exactly one term in the double sum, namely \(a_{rs}E_{rs}\), contributes a nonzero entry there, and its contribution is \(a_{rs}\). The coordinate formula follows from the stated ordering of \(\mathcal{E}\): the coefficient on \(E_{11}\) comes first, the coefficient on \(E_{12}\) comes second, and the coefficients continue across each row before moving to the next. Therefore the coefficients are \(a_{11},a_{12},\ldots,a_{mn}\) in row-major order. \(\square\)
The argument also shows why the expansion has no ambiguity. If two different coefficient lists produced the same matrix, subtracting one expansion from the other would give a linear combination of the \(E_{ij}\) equal to \(\mathbf{O}\). The independence proof shows that every coefficient in this difference must be zero. Hence each position determines exactly its own coefficient.
Coordinates and Matrix Operations
Because the coordinates are just the entries in a fixed order, matrix addition and scalar multiplication act entry by entry on coordinate vectors as well. For matrices \(\mathbf{A},\mathbf{B}\in M_{m\times n}(\mathbb{R})\) and \(c\in\mathbb{R}\), the entry in position \((i,j)\) of \(\mathbf{A}+\mathbf{B}\) is \(a_{ij}+b_{ij}\), and the entry in position \((i,j)\) of \(c\mathbf{A}\) is \(ca_{ij}\). The corresponding coordinate positions therefore add or scale in exactly the same way.
Worked Example: Coordinates of a Matrix Combination
Let \(\mathbf{A}=\begin{bmatrix}1&2\\3&4\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}-1&0\\2&1\end{bmatrix}\). Compute \(2\mathbf{A}-3\mathbf{B}\) using coordinates, then check by matrix arithmetic.
For the row-major basis \(\mathcal{E}=(E_{11},E_{12},E_{21},E_{22})\), the coordinate vectors are \([\mathbf{A}]_{\mathcal{E}}=(1,2,3,4)^{\top}\) and \([\mathbf{B}]_{\mathcal{E}}=(-1,0,2,1)^{\top}\). Scale each vector, then subtract coordinate by coordinate:
Reshape these four coordinates row by row to obtain \(\begin{bmatrix}5&4\\0&5\end{bmatrix}\). Direct matrix arithmetic confirms the result:
The matrix entries read row by row are \((5,4,0,5)^{\top}\), which checks the coordinate calculation.
Common Pitfall: Mixing Up the Index Order
In an \(m\times n\) matrix, \(E_{ij}\) has its \(1\) in row \(i\), column \(j\), not row \(j\), column \(i\). Also, row-major coordinates list all columns of a row before moving to the next row. Confusing either convention can produce a valid-looking but incorrectly placed matrix.
For example, in \(M_{2\times 3}(\mathbb{R})\), the mistaken claim that the coordinate vector \((1,2,3,4,5,6)^{\top}\) represents \(\begin{bmatrix}1&3&5\\2&4&6\end{bmatrix}\) uses column-major order. Under the convention used here, the first three coordinates must fill row 1, so the correct matrix is \(\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}\). Checking its row-major coordinate vector gives \((1,2,3,4,5,6)^{\top}\), as required. The mistaken matrix instead has row-major coordinate vector \((1,3,5,2,4,6)^{\top}\).
A second common error is to use \(n\) for both indices without checking the matrix shape. For a rectangular matrix, the valid indices are \(1\le i\le m\) and \(1\le j\le n\); a position such as \((3,1)\) is allowed when \(m\ge3\), even if \(n=2\). The row and column bounds are independent.
Why the Natural Basis Is Useful
The single-entry basis turns a matrix space into a familiar coordinate setting without changing the matrices themselves. Each basis element isolates one location, so a question about a linear combination can be checked position by position. This makes the basis especially useful when defining or studying linear maps on matrix spaces: one can first determine what the map does to each \(E_{ij}\), then use the expansion \(\mathbf{A}=\sum_{i,j}a_{ij}E_{ij}\) to express its action on any matrix.
For example, if a rule \(T\) is linear and its values \(T(E_{ij})\) are known, then the definition of linearity gives \(T(\mathbf{A})=T(\sum_{i,j}a_{ij}E_{ij})=\sum_{i,j}a_{ij}T(E_{ij})\). This conclusion uses the basis expansion and the defining properties of a linear map: it preserves sums and scalar multiples. The individual matrix units are therefore not only a way to name coordinates; they are also a compact collection of test inputs for linear behavior on the whole matrix space.
Check Your Understanding
Use the row-major ordering throughout, and make each answer precise about the matrix dimensions.
- Write \(\begin{bmatrix}0&-2\\5&1\\3&0\end{bmatrix}\) as a linear combination of the matrices \(E_{ij}\).
- Give the row-major coordinate vector of \(\begin{bmatrix}4&0&-1\\2&7&3\end{bmatrix}\) in \(M_{2\times 3}(\mathbb{R})\).
- Reconstruct the \(2\times 2\) matrix whose coordinate vector is \((3,-1,0,6)^{\top}\) in the natural basis.
- Explain why the single-entry matrices span \(M_{m\times n}(\mathbb{R})\) by examining an arbitrary entry \((r,s)\).
- For what reason must all coefficients in \(\sum_{i=1}^{m}\sum_{j=1}^{n}c_{ij}E_{ij}=\mathbf{O}\) be zero?