Mathematics · Linear Algebra
Matrix (Linear Algebra)
Reference entry · last updated September 11, 2026
Matrix denotes a rectangular array of entries from a field \(F\), and the coordinate representation of a linear map between finite-dimensional vector spaces once bases are fixed [1, 2].
1. First principles and definitions
An \(m \times n\) matrix over a field \(F\) is an array with \(m\) rows and \(n\) columns whose entries lie in \(F\). The entry in row \(i\) and column \(j\) is written \(a_{ij}\). The matrix is square when \(m = n\) and rectangular when \(m \neq n\) [1].
The same array represents a linear map \(T \colon V \to W\) after bases of \(V\) and \(W\) are chosen. Axler defines the matrix \(M(T)\) so that the \(k\)th column of \(M(T)\) is \(T\) applied to the \(k\)th standard basis vector. Example 3.32 in that text is a map \(T \colon F^2 \to F^3\) [2].
Addition is defined only for matrices of the same size. The product \(AB\) is defined if and only if the number of columns of \(A\) equals the number of rows of \(B\). That product represents composition of the corresponding linear maps. In general \(AB \neq BA\) [1].
2. Square matrices, rank, and invertibility
The \(n \times n\) identity matrix \(I\) satisfies \(AI = A\) and \(IA = A\) whenever the products are defined. A square matrix \(A\) is invertible if and only if \(\det(A) \neq 0\). The determinant is a function of square matrices [1].
The rank of a matrix is the dimension of its column space, which equals the dimension of its row space. A square matrix is invertible if and only if it has full rank (rank \(n\)) [1].
3. Eigenvalues and decompositions
The eigenvalues of a square matrix \(A\) are the roots of the characteristic polynomial \(\det(\lambda I - A)\) [1].
The singular value decomposition (SVD) is the general factorization that applies to rectangular matrices as well as square ones. Axler develops SVD in §7E. This page does not restate those formulas [2].
4. Computing and storage
The product \(AB\) is the algebraic operation that represents composition of linear maps [1].
A dense \(m \times n\) matrix is stored as a one-dimensional array in row-major order or column-major order. The dense matrix-matrix product is the kernel libraries call GEMM. The dense matrix-vector product is GEMV.
Row-major versus column-major layout, and the names GEMM and GEMV, are computing conventions. They are not theorems in the sources cited on this page.
5. Applied examples
- An embedding table \(W_E\) stores one vector per vocabulary index. Selecting an index returns one row (or column) of that matrix. See Embeddings.
- A fully connected layer computes \(Wx + b\): a matrix times a vector, plus a bias. See Neural Networks and Deep Neural Networks.
- In the Transformer, queries, keys, and values are obtained from learned projection matrices applied to the input [3]. See Attention and Transformer Architecture.
6. Disambiguation
This entry is the linear-algebra object. It is not the film series and not a decision grid. A confusion matrix is a contingency table of predicted versus actual class labels.
See also
References
- ↑ Wikipedia, "Matrix (mathematics)." https://en.wikipedia.org/wiki/Matrix_(mathematics)
- ↑ Sheldon Axler, Linear Algebra Done Right, 4th ed., 16 August 2026. Free full text: https://linear.axler.net/LADR4e.pdf. Hub: https://linear.axler.net/. §3C (matrices of linear maps); §7E (singular value decomposition).
- ↑ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin, "Attention Is All You Need," Advances in Neural Information Processing Systems, 2017. Free full text: https://arxiv.org/abs/1706.03762