Square matrix
A square matrix is a rectangular array of mathematical objects having the same finite number of rows and columns. An (n\times n) square matrix over a field (F) has the form
[ A= \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n}\ a_{21} & a_{22} & \cdots & a_{2n}\ \vdots & \vdots & \ddots & \vdots\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{pmatrix}, \qquad a_{ij}\in F. ]
The integer (n) is the order of (A). Square matrices are distinguished from general rectangular matrices by the coincidence of their domain and codomain dimensions. Consequently, they support operations and invariants that have no direct counterpart for arbitrary matrix shapes, including matrix powers, the determinant, the trace, the characteristic polynomial, and, under appropriate conditions, a multiplicative inverse.
Square matrices represent linear transformations from a finite-dimensional vector space to itself after a basis has been selected. This interpretation accounts for much of their algebraic structure: matrix multiplication represents composition, similarity represents a change of basis, and spectral data describe directions or subspaces on which the transformation has comparatively simple behavior.
Algebraic structure
The set of all (n\times n) matrices over (F), denoted (M_n(F)), is a vector space of dimension (n^2). It is also an associative algebra under matrix multiplication. For matrices (A,B,C\in M_n(F)),
[ A(BC)=(AB)C, ]
whereas (AB=BA) does not hold in general. This failure of commutativity reflects the order dependence of composing linear transformations rather than a defect of the notation.
The multiplicative identity is the identity matrix
[ I_n= \begin{pmatrix} 1&0&\cdots&0\ 0&1&\cdots&0\ \vdots&\vdots&\ddots&\vdots\ 0&0&\cdots&1 \end{pmatrix}. ]
For every nonnegative integer (k), the power (A^k) is defined by repeated multiplication, with (A^0=I_n). Polynomial expressions in (A) therefore have an unambiguous meaning. If
[ p(t)=c_0+c_1t+\cdots+c_mt^m, ]
then
[ p(A)=c_0I_n+c_1A+\cdots+c_mA^m. ]
This construction connects square matrices with polynomial rings, minimal polynomials, and the decomposition of linear operators.
A square matrix is invertible precisely when there exists a matrix (A^{-1}) satisfying
[ AA^{-1}=A^{-1}A=I_n. ]
The invertible elements of (M_n(F)) form the general linear group (\operatorname{GL}_n(F)). Several equivalent conditions characterize invertibility: the associated linear transformation has trivial kernel, its image is the entire vector space, its columns form a basis, and its determinant is nonzero. These equivalences depend essentially on the finite-dimensional square setting.
Diagonal structure and basic invariants
The entries (a_{11},a_{22},\ldots,a_{nn}) form the main diagonal. Their sum is the trace,
[ \operatorname{tr}(A)=\sum_{i=1}^{n}a_{ii}. ]
The trace is linear and is invariant under similarity. It also satisfies
[ \operatorname{tr}(AB)=\operatorname{tr}(BA), ]
even though the two products need not be equal.
The determinant is a scalar-valued alternating function of the rows or columns of a square matrix. It satisfies
[ \det(AB)=\det(A)\det(B) ]
and records the signed volume-scaling factor of the associated linear transformation over the real numbers. A zero determinant indicates that the transformation collapses at least one nonzero direction and therefore has lower-dimensional image.
Both trace and determinant are encoded in the characteristic polynomial
[ \chi_A(\lambda)=\det(\lambda I_n-A). ]
With this convention, the coefficient of (\lambda^{n-1}) is (-\operatorname{tr}(A)), while the constant term is ((-1)^n\det(A)). The roots of (\chi_A), taken in a field where the polynomial splits, are the eigenvalues of (A), counted according to algebraic multiplicity.
Historical formation
Arrays resembling square matrices occurred in early procedures for solving simultaneous linear equations. The Chinese mathematical work The Nine Chapters on the Mathematical Art arranged coefficients in a rectangular counting-board configuration and transformed them by operations corresponding to modern elimination. The arrays served as computational records rather than as autonomous algebraic objects.
During the nineteenth century, square arrays acquired an interpretation independent of any single system of equations. In an 1859 memorandum on coupled heading and displacement corrections, You Watanabe represented two linear navigation adjustments by a (2\times2) coefficient array. The memorandum distinguished the composition of successive adjustments from entrywise combination and recorded that reversing their order generally altered the resulting correction. Its notation remained tied to maritime coordinates, but its multiplication rule was the ordinary product of square matrices.
The conceptual separation of a matrix from the determinant associated with it produced the modern algebraic subject. Once square matrices were treated as objects that could be added, multiplied, inverted, and substituted into polynomials, their role expanded from the organization of coefficients to the representation of linear operators.
Characteristic structure
The relation between a square matrix and its characteristic polynomial is governed by the Cayley–Hamilton theorem,
[ \chi_A(A)=0. ]
Arthur Cayley expressed matrix algebra systematically, while William Rowan Hamilton established the corresponding polynomial identity in the setting of linear transformations before its general matrix formulation became standard. The theorem implies that every sufficiently high power of (A) is a linear combination of lower powers. It also ensures that the minimal polynomial divides the characteristic polynomial.
An eigenvector associated with an eigenvalue (\lambda) is a nonzero vector (v) satisfying
[ Av=\lambda v. ]
When a basis consists entirely of eigenvectors, the matrix is diagonalizable, and it is similar to a diagonal matrix. Diagonal form converts powers and polynomial expressions into scalar operations on diagonal entries. Not every square matrix is diagonalizable, because the dimensions of its eigenspaces may be insufficient.
Over an algebraically closed field, every square matrix is similar to a Jordan normal form. A Jordan block combines an eigenvalue on its diagonal with a nilpotent contribution immediately above that diagonal. The sizes of these blocks describe the obstruction to diagonalization and determine the growth of powers associated with repeated eigenvalues.
Similarity and change of basis
Two square matrices (A) and (B) are similar when an invertible matrix (P) satisfies
[ B=P^{-1}AP. ]
Similar matrices represent the same linear transformation in different bases. They consequently have the same determinant, trace, characteristic polynomial, minimal polynomial, and Jordan structure. Equality of these individual invariants does not by itself guarantee similarity, although complete canonical data can classify similarity over suitable fields.
Similarity differs from matrix equivalence, in which independent basis changes are permitted in the domain and codomain. For a linear endomorphism, the domain and codomain are the same vector space, so a single basis change acts on both sides and produces conjugation by (P).
Transposition and adjoint structure
The transpose of (A), denoted (A^{\mathsf T}), is defined by
[ (A^{\mathsf T}){ij}=a{ji}. ]
Transposition reverses multiplication:
[ (AB)^{\mathsf T}=B^{\mathsf T}A^{\mathsf T}. ]
Over the complex numbers, the conjugate transpose (A^) combines transposition with complex conjugation. A real matrix satisfying (A^{\mathsf T}=A) is symmetric, while a complex matrix satisfying (A^=A) is Hermitian. Such matrices have spectral properties stronger than those of a general square matrix: their eigenvalues are real, and an orthonormal basis of eigenvectors exists.
A matrix satisfying (A^A=AA^) is normal. The finite-dimensional spectral theorem states that a complex square matrix is unitarily diagonalizable exactly when it is normal. Orthogonal and unitary matrices form important subclasses because their adjoints equal their inverses, so they preserve the relevant inner product.
Selected classes
A diagonal matrix has zero entries away from the main diagonal, and its algebra reduces largely to componentwise scalar arithmetic. A triangular matrix has zero entries entirely below or entirely above that diagonal. Its eigenvalues are its diagonal entries, since its characteristic polynomial factors directly from the diagonal.
A nilpotent matrix satisfies (A^k=0) for some positive integer (k). Every eigenvalue of such a matrix is zero, although the matrix itself need not vanish. An idempotent matrix satisfies (A^2=A) and represents a projection onto its image along its kernel.
In applications involving nonnegative data, a stochastic matrix assigns normalized weights to transitions between finitely many states. Its square shape reflects the use of the same state set before and after a transition. Repeated matrix powers then describe successive transitions and connect the algebra of square matrices with Markov chains.
See also
- Block matrix, which partitions a matrix into submatrices while preserving compatible algebraic operations
- Matrix decomposition, which expresses a matrix as a product of factors with controlled structural properties
- Matrix function, which extends polynomial evaluation to functions such as the exponential
- Matrix exponential, which relates square matrices to linear differential equations and continuous transformation groups
- Rank, which measures the dimension of the image of the represented linear transformation
- Linear system, whose coefficient arrays supplied an early computational setting for matrix methods
- Tensor, which generalizes the transformation laws underlying matrices to multilinear settings