Matrices as Vectors
A matrix is often introduced as a rectangular array used to store numbers or represent a linear system. It can also be treated as a single vector-like object. To do that, we fix its number of rows and columns, then define addition and scalar multiplication by applying the corresponding real-number operation to each entry. With these operations, matrices of that fixed size satisfy the vector space axioms.
Throughout, let \(m,n\in\mathbb{N}\). The set of all \(m\times n\) real matrices is written \(\mathbb{R}^{m\times n}\). If \(\mathbf{A}\in\mathbb{R}^{m\times n}\), write its entry in row \(i\), column \(j\) as \(a_{ij}\), where \(1\le i\le m\) and \(1\le j\le n\). The dimensions are fixed: matrices of different sizes are not elements of the same \(\mathbb{R}^{m\times n}\).
These operations preserve the fixed size: each position \((i,j)\) in the output comes from that same position in the input matrices. Addition therefore requires matching dimensions, while multiplication by a real scalar does not change the dimensions. The zero matrix also has a specified size; for instance, \(\mathbf{O}_{2\times3}\) and \(\mathbf{O}_{3\times2}\) are different matrices.
Why the Vector Space Axioms Hold
A real vector space is a set with an addition and a real scalar multiplication satisfying the usual rules: addition is closed, associative, and commutative; there is an additive identity and every element has an additive inverse; scalar multiplication distributes over vector addition and scalar addition, is associative with real multiplication, and has identity scalar \(1\). For matrices, each rule can be checked at one entry at a time. The reason this works is that the real numbers already satisfy the corresponding arithmetic rules.
Proof. Let \(\mathbf{A},\mathbf{B},\mathbf{C}\in\mathbb{R}^{m\times n}\), with entries \(a_{ij},b_{ij},c_{ij}\), and let \(r,s\in\mathbb{R}\). The entries of \(\mathbf{A}+\mathbf{B}\) are real numbers, so \(\mathbf{A}+\mathbf{B}\in\mathbb{R}^{m\times n}\); likewise, every entry \(ra_{ij}\) is real, so \(r\mathbf{A}\in\mathbb{R}^{m\times n}\). At each position \((i,j)\), the real-number laws give \((\mathbf{A}+\mathbf{B})_{ij}=a_{ij}+b_{ij}=b_{ij}+a_{ij}=(\mathbf{B}+\mathbf{A})_{ij}\), and \(((\mathbf{A}+\mathbf{B})+\mathbf{C})_{ij}=(a_{ij}+b_{ij})+c_{ij}=a_{ij}+(b_{ij}+c_{ij})=(\mathbf{A}+(\mathbf{B}+\mathbf{C}))_{ij}\). The matrix \(\mathbf{O}_{m\times n}\) is an additive identity because \((\mathbf{A}+\mathbf{O}_{m\times n})_{ij}=a_{ij}+0=a_{ij}\), and the matrix with entries \(-a_{ij}\) is an additive inverse because \(a_{ij}+(-a_{ij})=0\). For scalar rules, entrywise calculation gives \((r(\mathbf{A}+\mathbf{B}))_{ij}=r(a_{ij}+b_{ij})=ra_{ij}+rb_{ij}=(r\mathbf{A}+r\mathbf{B})_{ij}\), \(((r+s)\mathbf{A})_{ij}=(r+s)a_{ij}=ra_{ij}+sa_{ij}=(r\mathbf{A}+s\mathbf{A})_{ij}\), \((r(s\mathbf{A}))_{ij}=r(sa_{ij})=(rs)a_{ij}=((rs)\mathbf{A})_{ij}\), and \((1\mathbf{A})_{ij}=1a_{ij}=a_{ij}\). Since each required equality holds at every entry, the matrices on its two sides are equal. Thus all the vector space axioms hold. \(\square\)
The proof uses no special property of a particular number of rows or columns. Fixing \(m\) and \(n\) makes every operation well-defined on one set; the entrywise real-number laws then establish the axioms for that set.
Calculating Entrywise Operations
Worked Example: Addition, a Scalar Multiple, and the Zero Matrix
Let \(\mathbf{A}=\begin{bmatrix}1&-2\\3&0\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}4&1\\-1&5\end{bmatrix}\). Find \(\mathbf{A}+\mathbf{B}\), \(2\mathbf{A}\), and \(\mathbf{A}+\mathbf{O}_{2\times2}\).
Add corresponding entries to obtain \(\mathbf{A}+\mathbf{B}=\begin{bmatrix}1+4&-2+1\\3+(-1)&0+5\end{bmatrix}=\begin{bmatrix}5&-1\\2&5\end{bmatrix}\). For scalar multiplication, multiply every entry of \(\mathbf{A}\) by \(2\): \(2\mathbf{A}=\begin{bmatrix}2(1)&2(-2)\\2(3)&2(0)\end{bmatrix}=\begin{bmatrix}2&-4\\6&0\end{bmatrix}\). Finally, \(\mathbf{A}+\mathbf{O}_{2\times2}=\begin{bmatrix}1+0&-2+0\\3+0&0+0\end{bmatrix}=\begin{bmatrix}1&-2\\3&0\end{bmatrix}=\mathbf{A}\).
Check: In the sum, the four entries are \(5,-1,2,5\), exactly the sums of the four matching entries. In \(2\mathbf{A}\), the entries \(2,-4,6,0\) are twice the entries \(1,-2,3,0\). Adding a zero in each position leaves each entry unchanged.
A linear combination of matrices is formed in the same way as a linear combination of vectors: multiply each matrix by its scalar, then add the results. All matrices in the expression must have the same size so that each addition is defined.
Proof. Scalar multiplication and addition each preserve the number of rows and columns, so \(r\mathbf{A}+s\mathbf{B}\) belongs to \(\mathbb{R}^{m\times n}\). By the definitions of the operations, its entry at \((i,j)\) is \((r\mathbf{A}+s\mathbf{B})_{ij}=(r\mathbf{A})_{ij}+(s\mathbf{B})_{ij}=ra_{ij}+sb_{ij}\). This holds for every allowed \(i,j\), proving the claim. \(\square\)
Worked Example: A Linear Combination of Two \(2\times3\) Matrices
For \(\mathbf{A}=\begin{bmatrix}1&0&-2\\3&1&4\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}-1&2&1\\0&-2&5\end{bmatrix}\), calculate \(3\mathbf{A}-2\mathbf{B}\).
First multiply each matrix by its scalar: \(3\mathbf{A}=\begin{bmatrix}3&0&-6\\9&3&12\end{bmatrix}\) and \(2\mathbf{B}=\begin{bmatrix}-2&4&2\\0&-4&10\end{bmatrix}\). Subtract corresponding entries: \[ 3\mathbf{A}-2\mathbf{B} =\begin{bmatrix}3-(-2)&0-4&-6-2\\9-0&3-(-4)&12-10\end{bmatrix} =\begin{bmatrix}5&-4&-8\\9&7&2\end{bmatrix}. \]
Check: The entry formula gives \(3a_{ij}-2b_{ij}\). In row 1 it yields \(3-2(-1)=5\), \(3(0)-2(2)=-4\), and \(3(-2)-2(1)=-8\). In row 2 it yields \(3(3)-2(0)=9\), \(3(1)-2(-2)=7\), and \(3(4)-2(5)=2\), matching all six entries.
The Zero Matrix and Additive Inverses
For a matrix space, the additive identity is not a single number but a matrix of the same size as its members. Its entries must all be zero. The additive inverse of a matrix is obtained by negating each entry; adding the original and the inverse then gives zero in every position.
Proof. At each position, \((\mathbf{A}+\mathbf{O}_{m\times n})_{ij}=a_{ij}+0=a_{ij}\), so \(\mathbf{O}_{m\times n}\) is an additive identity. Also, \((\mathbf{A}+(-\mathbf{A}))_{ij}=a_{ij}+(-a_{ij})=0\), so \(-\mathbf{A}\) is an additive inverse. These are the identity and inverse for the entrywise addition because each entry must satisfy the corresponding real-number equation: if \(z_{ij}\) satisfies \(a_{ij}+z_{ij}=a_{ij}\), then \(z_{ij}=0\); if \(a_{ij}+y_{ij}=0\), then \(y_{ij}=-a_{ij}\). Finally, \((0\mathbf{A})_{ij}=0a_{ij}=0\) and \((r\mathbf{O}_{m\times n})_{ij}=r\cdot0=0\). Each equality holds at every position, proving all the stated identities. \(\square\)
Worked Example: Solving for an Unknown Matrix
Find \(\mathbf{X}\in\mathbb{R}^{2\times2}\) such that \(3\mathbf{X}+\mathbf{A}=\mathbf{O}_{2\times2}\), where \(\mathbf{A}=\begin{bmatrix}3&-6\\9&0\end{bmatrix}\).
Write \(\mathbf{X}=\begin{bmatrix}x_{11}&x_{12}\\x_{21}&x_{22}\end{bmatrix}\). Matching entries in the equation gives \(3x_{11}+3=0\), \(3x_{12}-6=0\), \(3x_{21}+9=0\), and \(3x_{22}+0=0\). Solving these four real equations gives \(x_{11}=-1\), \(x_{12}=2\), \(x_{21}=-3\), and \(x_{22}=0\). Therefore, \[ \mathbf{X}=\begin{bmatrix}-1&2\\-3&0\end{bmatrix}. \]
Check: \(3\mathbf{X}=\begin{bmatrix}-3&6\\-9&0\end{bmatrix}\), so \(3\mathbf{X}+\mathbf{A}=\begin{bmatrix}-3+3&6-6\\-9+9&0+0\end{bmatrix}=\begin{bmatrix}0&0\\0&0\end{bmatrix}=\mathbf{O}_{2\times2}\). Thus the proposed matrix satisfies the original equation.
Common Pitfalls
Do not add a scalar to a matrix as though it were a matrix. For \(\mathbf{C}=\begin{bmatrix}1&0\\-2&3\end{bmatrix}\), the calculation \(\mathbf{C}+2=\begin{bmatrix}3&2\\0&5\end{bmatrix}\) is not an instance of the defined matrix addition: \(2\) is a real number, not a \(2\times2\) matrix. If the intention is to add \(2\) to every entry, that is a different operation and has not been defined here. Scalar multiplication is defined, but it gives \(2\mathbf{C}=\begin{bmatrix}2&0\\-4&6\end{bmatrix}\), not the incorrect array above. If the intention is to add the zero matrix, then \(\mathbf{C}+\mathbf{O}_{2\times2}=\mathbf{C}\).
Check dimensions before adding. The expression \(\begin{bmatrix}1&2\end{bmatrix}+\begin{bmatrix}3\\4\end{bmatrix}\) is undefined under entrywise addition: the first matrix has size \(1\times2\), while the second has size \(2\times1\). Having the same number of entries is not enough; corresponding entries must occupy the same row and column positions in matrices of matching dimensions.
Finally, entrywise addition and scalar multiplication are not matrix multiplication. For example, \(2\mathbf{A}\) means multiply every entry of \(\mathbf{A}\) by \(2\), while a product of two matrices is a separate operation with different dimension conditions and entry formulas. The vector space structure here uses only the two operations defined at the start.
Check Your Understanding
Use the entrywise definitions to answer each question. When you calculate a matrix, verify its entries against the defining rule.
- For \(\mathbf{A}=\begin{bmatrix}2&-1\\0&3\end{bmatrix}\), find \(-\mathbf{A}\) and check that \(\mathbf{A}+(-\mathbf{A})=\mathbf{O}_{2\times2}\).
- Calculate \(2\begin{bmatrix}1&0&-1\\2&3&4\end{bmatrix}+\begin{bmatrix}0&5&2\\-1&1&0\end{bmatrix}\).
- What are the dimensions of the additive identity for \(\mathbb{R}^{3\times2}\)? State all its entries.
- Explain why \(\begin{bmatrix}1&2\end{bmatrix}+\begin{bmatrix}1\\2\end{bmatrix}\) is not defined by entrywise matrix addition.
- For \(\mathbf{A}\in\mathbb{R}^{m\times n}\), explain from the entries why \(0\mathbf{A}=\mathbf{O}_{m\times n}\).