In mathematics, a matrix (pl.: matrices) is a rectangular array or table of numbers, symbols, or expressions, with elements or entries arranged in rows and columns, which is used to represent a mathematical object or property of such an object.
For example, is a matrix with two rows and three columns. This is often referred to as a "two-by-three matrix", a " matrix", or a matrix of dimension .
Matrices are commonly related to linear algebra. Notable exceptions include incidence matrices and adjacency matrices in graph theory. This article focuses on matrices related to linear algebra, and, unless otherwise specified, all matrices represent linear maps or may be viewed as such.
Square matrices, matrices with the same number of rows and columns, play a major role in matrix theory. Square matrices of a given dimension form a noncommutative ring, which is one of the most common examples of a noncommutative ring. The determinant of a square matrix is a number associated with the matrix, which is fundamental for the study of a square matrix; for example, a square matrix is invertible if and only if it has a nonzero determinant and the eigenvalues of a square matrix are the roots of a polynomial determinant.
In geometry, matrices are widely used for specifying and representing geometric transformations (for example rotations) and coordinate changes. In numerical analysis, many computational problems are solved by reducing them to a matrix computation, and this often involves computing with matrices of huge dimensions. Matrices are used in most areas of mathematics and scientific fields, either directly, or through their use in geometry and numerical analysis.
Matrix theory is the branch of mathematics that focuses on the study of matrices. It was initially a sub-branch of linear algebra, but soon grew to include subjects related to graph theory, algebra, combinatorics and statistics.
Definition
A matrix is a rectangular array of numbers (or other mathematical objects), called the entries of the matrix. Matrices are subject to standard operations such as addition and multiplication. Most commonly, a matrix over a field F is a rectangular array of elements of F. A real matrix and a complex matrix are matrices whose entries are respectively real numbers or complex numbers. More general types of entries are discussed below. For instance, this is a real matrix:
The numbers, symbols, or expressions in the matrix are called its entries or its elements. The horizontal and vertical lines of entries in a matrix are called rows and columns, respectively.
Size
The size of a matrix is defined by the number of rows and columns it contains. There is no limit to the number of rows and columns, that a matrix (in the usual sense) can have as long as they are positive integers. A matrix with rows and columns is called an matrix, or -by- matrix, where and are called its dimensions. For example, the matrix above is a matrix.
Matrices with a single row are called row matrices, and those with a single column are called column matrices. When vectors are involved, the terms row vector and column vector are commonly used instead. A matrix with the same number of rows and columns is called a square matrix. A matrix with an infinite number of rows or columns (or both) is called an infinite matrix. In some contexts, such as computer algebra programs, it is useful to consider a matrix with no rows or no columns, called an empty matrix.
Name| | Size | Example | Description |
---|---|---|---|
Row matrix | 1 × n | A matrix with one row, sometimes used to represent a vector | |
Column matrix | n × 1 | A matrix with one column, sometimes used to represent a vector | |
Square matrix | n × n | A matrix with the same number of rows and columns, sometimes used to represent a linear transformation from a vector space to itself, such as reflection, rotation, or shearing. |
Notation
The specifics of symbolic matrix notation vary widely, with some prevailing trends. Matrices are commonly written in square brackets or parentheses, so that an matrix is represented as This may be abbreviated by writing only a single generic term, possibly along with indices, as in or in the case that .
Matrices are usually symbolized using upper-case letters (such as in the examples above), while the corresponding lower-case letters, with two subscript indices (e.g., , or ), represent the entries. In addition to using upper-case letters to symbolize matrices, many authors use a special typographical style, commonly boldface Roman (non-italic), to further distinguish matrices from other mathematical objects. An alternative notation involves the use of a double-underline with the variable name, with or without boldface style, as in .
The entry in the i-th row and j-th column of a matrix A is sometimes referred to as the or entry of the matrix, and commonly denoted by or . Alternative notations for that entry are and . For example, the entry of the following matrix is 5 (also denoted , , or ):
Sometimes, the entries of a matrix can be defined by a formula such as . For example, each of the entries of the following matrix is determined by the formula .
In this case, the matrix itself is sometimes defined by that formula, within square brackets or double parentheses. For example, the matrix above is defined as or . If matrix size is , the above-mentioned formula is valid for any and any . This can be specified separately or indicated using as a subscript. For instance, the matrix above is , and can be defined as or .
Some programming languages utilize doubly subscripted arrays (or arrays of arrays) to represent an m-by-n matrix. Some programming languages start the numbering of array indexes at zero, in which case the entries of an m-by-n matrix are indexed by and . This article follows the more common convention in mathematical writing where enumeration starts from 1.
The set of all m-by-n real matrices is often denoted or The set of all m-by-n matrices over another field, or over a ring R, is similarly denoted or If m = n, such as in the case of square matrices, one does not repeat the dimension: or Often, , or , is used in place of
Basic operations
Several basic operations can be applied to matrices. Some, such as transposition and submatrix do not depend on the nature of the entries. Others, such as matrix addition, scalar multiplication, matrix multiplication, and row operations involve operations on matrix entries and therefore require that matrix entries are numbers or belong to a field or a ring.
In this section, it is supposed that matrix entries belong to a fixed ring, which is typically a field of numbers.
Addition, scalar multiplication, subtraction and transposition
- Addition
The sum A + B of two m×n matrices A and B is calculated entrywise: For example,
- Scalar multiplication
The product cA of a number c (also called a scalar in this context) and a matrix A is computed by multiplying every entry of A by c: This operation is called scalar multiplication, but its result is not named "scalar product" to avoid confusion, since "scalar product" is often used as a synonym for "inner product". For example:
- Subtraction
The subtraction of two m×n matrices is defined by composing matrix addition with scalar multiplication by –1:
- Transposition
The transpose of an m×n matrix A is the n×m matrix AT (also denoted Atr or tA) formed by turning rows into columns and vice versa: For example:
Familiar properties of numbers extend to these operations on matrices: for example, addition is commutative, that is, the matrix sum does not depend on the order of the summands: A + B = B + A. The transpose is compatible with addition and scalar multiplication, as expressed by (cA)T = c(AT) and (A + B)T = AT + BT. Finally, (AT)T = A.
Matrix multiplication
Multiplication of two matrices is defined if and only if the number of columns of the left matrix is the same as the number of rows of the right matrix. If A is an m×n matrix and B is an n×p matrix, then their matrix product AB is the m×p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B:
where 1 ≤ i ≤ m and 1 ≤ j ≤ p. For example, the underlined entry 2340 in the product is calculated as (2 × 1000) + (3 × 100) + (4 × 10) = 2340:
Matrix multiplication satisfies the rules (AB)C = A(BC) (associativity), and (A + B)C = AC + BC as well as C(A + B) = CA + CB (left and right distributivity), whenever the size of the matrices is such that the various products are defined. The product AB may be defined without BA being defined, namely if A and B are m×n and n×k matrices, respectively, and m ≠ k. Even if both products are defined, they generally need not be equal, that is:
In other words, matrix multiplication is not commutative, in marked contrast to (rational, real, or complex) numbers, whose product is independent of the order of the factors. An example of two matrices not commuting with each other is:
whereas
Besides the ordinary matrix multiplication just described, other less frequently used operations on matrices that can be considered forms of multiplication also exist, such as the Hadamard product and the Kronecker product. They arise in solving matrix equations such as the Sylvester equation.
Row operations
There are three types of row operations:
- row addition, that is adding a row to another.
- row multiplication, that is multiplying all entries of a row by a non-zero constant;
- row switching, that is interchanging two rows of a matrix;
These operations are used in several ways, including solving linear equations and finding matrix inverses.
Submatrix
A submatrix of a matrix is a matrix obtained by deleting any collection of rows and/or columns. For example, from the following 3-by-4 matrix, we can construct a 2-by-3 submatrix by removing row 3 and column 2:
The minors and cofactors of a matrix are found by computing the determinant of certain submatrices.
A principal submatrix is a square submatrix obtained by removing certain rows and columns. The definition varies from author to author. According to some authors, a principal submatrix is a submatrix in which the set of row indices that remain is the same as the set of column indices that remain. Other authors define a principal submatrix as one in which the first k rows and columns, for some number k, are the ones that remain; this type of submatrix has also been called a leading principal submatrix.
Linear equations
Matrices can be used to compactly write and work with multiple linear equations, that is, systems of linear equations. For example, if A is an m×n matrix, x designates a column vector (that is, n×1-matrix) of n variables x1, x2, ..., xn, and b is an m×1-column vector, then the matrix equation
is equivalent to the system of linear equations
Using matrices, this can be solved more compactly than would be possible by writing out all the equations separately. If n = m and the equations are independent, then this can be done by writing
where A−1 is the inverse matrix of A. If A has no inverse, solutions—if any—can be found using its generalized inverse.
Linear transformations
Matrices and matrix multiplication reveal their essential features when related to linear transformations, also known as linear maps. A real m-by-n matrix A gives rise to a linear transformation mapping each vector x in to the (matrix) product Ax, which is a vector in Conversely, each linear transformation arises from a unique m-by-n matrix A: explicitly, the (i, j)-entry of A is the ith coordinate of f (ej), where ej = (0, ..., 0, 1, 0, ..., 0) is the unit vector with 1 in the jth position and 0 elsewhere. The matrix A is said to represent the linear map f, and A is called the transformation matrix of f.
For example, the 2×2 matrix
can be viewed as the transform of the unit square into a parallelogram with vertices at (0, 0), (a, b), (a + c, b + d), and (c, d). The parallelogram pictured at the right is obtained by multiplying A with each of the column vectors , and in turn. These vectors define the vertices of the unit square.
The following table shows several 2×2 real matrices with the associated linear maps of
The blue original is mapped to the green grid and shapes. The origin (0, 0) is marked with a black point.
Horizontal shear with m = 1.25. | Reflection through the vertical axis | Squeeze mapping with r = 3/2 | Scaling by a factor of 3/2 | Rotation by π/6 = 30° |
Under the 1-to-1 correspondence between matrices and linear maps, matrix multiplication corresponds to composition of maps: if a k-by-m matrix B represents another linear map , then the composition g ∘ f is represented by BA since
The last equality follows from the above-mentioned associativity of matrix multiplication.
The rank of a matrix A is the maximum number of linearly independent row vectors of the matrix, which is the same as the maximum number of linearly independent column vectors. Equivalently it is the dimension of the image of the linear map represented by A. The rank–nullity theorem states that the dimension of the kernel of a matrix plus the rank equals the number of columns of the matrix.
Square matrix
A square matrix is a matrix with the same number of rows and columns. An n-by-n matrix is known as a square matrix of order n. Any two square matrices of the same order can be added and multiplied. The entries aii form the main diagonal of a square matrix. They lie on the imaginary line that runs from the top left corner to the bottom right corner of the matrix.
Main types
Name Example with n = 3 Diagonal matrix Lower triangular matrix Upper triangular matrix
Diagonal and triangular matrix
If all entries of A below the main diagonal are zero, A is called an upper triangular matrix. Similarly, if all entries of A above the main diagonal are zero, A is called a lower triangular matrix. If all entries outside the main diagonal are zero, A is called a diagonal matrix.
Identity matrix
The identity matrix In of size n is the n-by-n matrix in which all the elements on the main diagonal are equal to 1 and all other elements are equal to 0, for example, It is a square matrix of order n, and also a special kind of diagonal matrix. It is called an identity matrix because multiplication with it leaves a matrix unchanged: for any m-by-n matrix A.
A nonzero scalar multiple of an identity matrix is called a scalar matrix. If the matrix entries come from a field, the scalar matrices form a group, under matrix multiplication, that is isomorphic to the multiplicative group of nonzero elements of the field.
Symmetric or skew-symmetric matrix
A square matrix A that is equal to its transpose, that is, A = AT, is a symmetric matrix. If instead, A is equal to the negative of its transpose, that is, A = −AT, then A is a skew-symmetric matrix. In complex matrices, symmetry is often replaced by the concept of Hermitian matrices, which satisfies A∗ = A, where the star or asterisk denotes the conjugate transpose of the matrix, that is, the transpose of the complex conjugate of A.
By the spectral theorem, real symmetric matrices and complex Hermitian matrices have an eigenbasis; that is, every vector is expressible as a linear combination of eigenvectors. In both cases, all eigenvalues are real. This theorem can be generalized to infinite-dimensional situations related to matrices with infinitely many rows and columns, see below.
Invertible matrix and its inverse
A square matrix A is called invertible or non-singular if there exists a matrix B such that where In is the n×n identity matrix with 1s on the main diagonal and 0s elsewhere. If B exists, it is unique and is called the inverse matrix of A, denoted A−1.
There are many algorithms for testing whether a square marix is invertible, and, if it is, computing its inverse. One of the oldest, which is still in common use is Gaussian elimination.
Definite matrix
Positive definite matrix | Indefinite matrix |
---|---|
Points such that (Ellipse) | Points such that (Hyperbola) |
A symmetric real matrix A is called positive-definite if the associated quadratic form has a positive value for every nonzero vector x in If f (x) only yields negative values then A is negative-definite; if f does produce both negative and positive values then A is indefinite. If the quadratic form f yields only non-negative values (positive or zero), the symmetric matrix is called positive-semidefinite (or if only non-positive values, then negative-semidefinite); hence the matrix is indefinite precisely when it is neither positive-semidefinite nor negative-semidefinite.
A symmetric matrix is positive-definite if and only if all its eigenvalues are positive, that is, the matrix is positive-semidefinite and it is invertible. The table at the right shows two possibilities for 2-by-2 matrices.
Allowing as input two different vectors instead yields the bilinear form associated to A:
In the case of complex matrices, the same terminology and result apply, with symmetric matrix, quadratic form, bilinear form, and transpose xT replaced respectively by Hermitian matrix, Hermitian form, sesquilinear form, and conjugate transpose xH.
Orthogonal matrix
An orthogonal matrix is a square matrix with real entries whose columns and rows are orthogonal unit vectors (that is, orthonormal vectors). Equivalently, a matrix A is orthogonal if its transpose is equal to its inverse:
which entails
where In is the identity matrix of size n.
An orthogonal matrix A is necessarily invertible (with inverse A−1 = AT), unitary (A−1 = A*), and normal (A*A = AA*). The determinant of any orthogonal matrix is either +1 or −1. A special orthogonal matrix is an orthogonal matrix with determinant +1. As a linear transformation, every orthogonal matrix with determinant +1 is a pure rotation without reflection, i.e., the transformation preserves the orientation of the transformed structure, while every orthogonal matrix with determinant -1 reverses the orientation, i.e., is a composition of a pure reflection and a (possibly null) rotation. The identity matrices have determinant 1 and are pure rotations by an angle zero.
The complex analog of an orthogonal matrix is a unitary matrix.
Main operations
Trace
The trace, tr(A) of a square matrix A is the sum of its diagonal entries. While matrix multiplication is not commutative as mentioned above, the trace of the product of two matrices is independent of the order of the factors:
This is immediate from the definition of matrix multiplication:
It follows that the trace of the product of more than two matrices is independent of cyclic permutations of the matrices, however, this does not in general apply for arbitrary permutations (for example, tr(ABC) ≠ tr(BAC), in general). Also, the trace of a matrix is equal to that of its transpose, that is,
Determinant
The determinant of a square matrix A (denoted det(A) or |A|) is a number encoding certain properties of the matrix. A matrix is invertible if and only if its determinant is nonzero. Its absolute value equals the area (in ) or volume (in ) of the image of the unit square (or cube), while its sign corresponds to the orientation of the corresponding linear map: the determinant is positive if and only if the orientation is preserved.
The determinant of 2-by-2 matrices is given by
The determinant of 3-by-3 matrices involves 6 terms (rule of Sarrus). The more lengthy Leibniz formula generalizes these two formulae to all dimensions.
The determinant of a product of square matrices equals the product of their determinants: or using alternate notation: Adding a multiple of any row to another row, or a multiple of any column to another column does not change the determinant. Interchanging two rows or two columns affects the determinant by multiplying it by −1. Using these operations, any matrix can be transformed to a lower (or upper) triangular matrix, and for such matrices, the determinant equals the product of the entries on the main diagonal; this provides a method to calculate the determinant of any matrix. Finally, the Laplace expansion expresses the determinant in terms of minors, that is, determinants of smaller matrices. This expansion can be used for a recursive definition of determinants (taking as starting case the determinant of a 1-by-1 matrix, which is its unique entry, or even the determinant of a 0-by-0 matrix, which is 1), that can be seen to be equivalent to the Leibniz formula. Determinants can be used to solve linear systems using Cramer's rule, where the division of the determinants of two related square matrices equates to the value of each of the system's variables.
Eigenvalues and eigenvectors
A number and a non-zero vector v satisfying
are called an eigenvalue and an eigenvector of A, respectively. The number λ is an eigenvalue of an n×n-matrix A if and only if (A − λIn) is not invertible, which is equivalent to
The polynomial pA in an indeterminate X given by evaluation of the determinant det(X In − A) is called the characteristic polynomial of A. It is a monic polynomial of degree n. Therefore the polynomial equation pA(λ) = 0 has at most n different solutions, that is, eigenvalues of the matrix. They may be complex even if the entries of A are real. According to the Cayley–Hamilton theorem, pA(A) = 0, that is, the result of substituting the matrix itself into its characteristic polynomial yields the zero matrix.
Computational aspects
Matrix calculations can be often performed with different techniques. Many problems can be solved by both direct algorithms and iterative approaches. For example, the eigenvectors of a square matrix can be obtained by finding a sequence of vectors xn converging to an eigenvector when n tends to infinity.
To choose the most appropriate algorithm for each specific problem, it is important to determine both the effectiveness and precision of all the available algorithms. The domain studying these matters is called numerical linear algebra. As with other numerical situations, two main aspects are the complexity of algorithms and their numerical stability.
Determining the complexity of an algorithm means finding upper bounds or estimates of how many elementary operations such as additions and multiplications of scalars are necessary to perform some algorithm, for example, multiplication of matrices. Calculating the matrix product of two n-by-n matrices using the definition given above needs n3 multiplications, since for any of the n2 entries of the product, n multiplications are necessary. The Strassen algorithm outperforms this "naive" algorithm; it needs only n2.807 multiplications. A refined approach also incorporates specific features of the computing devices.
In many practical situations, additional information about the matrices involved is known. An important case is sparse matrices, that is, matrices most of whose entries are zero. There are specifically adapted algorithms for, say, solving linear systems Ax = b for sparse matrices A, such as the conjugate gradient method.
An algorithm is, roughly speaking, numerically stable if little deviations in the input values do not lead to big deviations in the result. For example, calculating the inverse of a matrix via Laplace expansion (adj(A) denotes the adjugate matrix of A) may lead to significant rounding errors if the determinant of the matrix is very small. The norm of a matrix can be used to capture the conditioning of linear algebraic problems, such as computing a matrix's inverse.
Most computer programming languages support arrays but are not designed with built-in commands for matrices. Instead, available external libraries provide matrix operations on arrays, in nearly all currently used programming languages. Matrix manipulation was among the earliest numerical applications of computers. The original Dartmouth BASIC had built-in commands for matrix arithmetic on arrays from its second edition implementation in 1964. As early as the 1970s, some engineering desktop computers such as the HP 9830 had ROM cartridges to add BASIC commands for matrices. Some computer languages such as APL were designed to manipulate matrices, and various mathematical programs can be used to aid computing with matrices. As of 2023, most computers have some form of built-in matrix operations at a low level implementing the standard BLAS specification, upon which most higher-level matrix and linear algebra libraries (e.g., EISPACK, LINPACK, LAPACK) rely. While most of these libraries require a professional level of coding, LAPACK can be accessed by higher-level (and user-friendly) bindings such as NumPy/SciPy, R, GNU Octave, MATLAB.
Decomposition
There are several methods to render matrices into a more easily accessible form. They are generally referred to as matrix decomposition or matrix factorization techniques. The interest of all these techniques is that they preserve certain properties of the matrices in question, such as determinant, rank, or inverse, so that these quantities can be calculated after applying the transformation, or that certain matrix operations are algorithmically easier to carry out for some types of matrices.
The LU decomposition factors matrices as a product of lower (L) and an upper triangular matrices (U). Once this decomposition is calculated, linear systems can be solved more efficiently, by a simple technique called forward and back substitution. Likewise, inverses of triangular matrices are algorithmically easier to calculate. The Gaussian elimination is a similar algorithm; it transforms any matrix to row echelon form. Both methods proceed by multiplying the matrix by suitable elementary matrices, which correspond to permuting rows or columns and adding multiples of one row to another row. Singular value decomposition expresses any matrix A as a product UDV∗, where U and V are unitary matrices and D is a diagonal matrix.
The eigendecomposition or diagonalization expresses A as a product VDV−1, where D is a diagonal matrix and V is a suitable invertible matrix. If A can be written in this form, it is called diagonalizable. More generally, and applicable to all matrices, the Jordan decomposition transforms a matrix into Jordan normal form, that is to say matrices whose only nonzero entries are the eigenvalues λ1 to λn of A, placed on the main diagonal and possibly entries equal to one directly above the main diagonal, as shown at the right. Given the eigendecomposition, the nth power of A (that is, n-fold iterated matrix multiplication) can be calculated via and the power of a diagonal matrix can be calculated by taking the corresponding powers of the diagonal entries, which is much easier than doing the exponentiation for A instead. This can be used to compute the matrix exponential eA, a need frequently arising in solving linear differential equations, matrix logarithms and square roots of matrices. To avoid numerically ill-conditioned situations, further algorithms such as the Schur decomposition can be employed.
Abstract algebraic aspects and generalizations
Matrices can be generalized in different ways. Abstract algebra uses matrices with entries in more general fields or even rings, while linear algebra codifies properties of matrices in the notion of linear maps. It is possible to consider matrices with infinitely many columns and rows. Another extension is tensors, which can be seen as higher-dimensional arrays of numbers, as opposed to vectors, which can often be realized as sequences of numbers, while matrices are rectangular or two-dimensional arrays of numbers. Matrices, subject to certain requirements tend to form groups known as matrix groups. Similarly under certain conditions matrices form rings known as matrix rings. Though the product of matrices is not in general commutative certain matrices form fields known as matrix fields. In general, matrices and their multiplication also form a category, the category of matrices.
Matrices with more general entries
This article focuses on matrices whose entries are real or complex numbers. However, matrices can be considered with much more general types of entries than real or complex numbers. As a first step of generalization, any field, that is, a set where addition, subtraction, multiplication, and division operations are defined and well-behaved, may be used instead of or for example rational numbers or finite fields. For example, coding theory makes use of matrices over finite fields. Wherever eigenvalues are considered, as these are roots of a polynomial they may exist only in a larger field than that of the entries of the matrix; for instance, they may be complex in the case of a matrix with real entries. The possibility to reinterpret the entries of a matrix as elements of a larger field (for example, to view a real matrix as a complex matrix whose entries happen to be all real) then allows considering each square matrix to possess a full set of eigenvalues. Alternatively one can consider only matrices with entries in an algebraically closed field, such as from the outset.
More generally, matrices with entries in a ring R are widely used in mathematics. Rings are a more general notion than fields in that a division operation need not exist. The very same addition and multiplication operations of matrices extend to this setting, too. The set M(n, R) (also denoted Mn(R)) of all square n-by-n matrices over R is a ring called matrix ring, isomorphic to the endomorphism ring of the left R-module Rn. If the ring R is commutative, that is, its multiplication is commutative, then the ring M(n, R) is also an associative algebra over R. The determinant of square matrices over a commutative ring R can still be defined using the Leibniz formula; such a matrix is invertible if and only if its determinant is invertible in R, generalizing the situation over a field F, where every nonzero element is invertible. Matrices over superrings are called supermatrices.
Matrices do not always have all their entries in the same ring – or even in any ring at all. One special but common case is block matrices, which may be considered as matrices whose entries themselves are matrices. The entries need not be square matrices, and thus need not be members of any ring; but their sizes must fulfill certain compatibility conditions.
Relationship to linear maps
Linear maps are equivalent to m-by-n matrices, as described above. More generally, any linear map f : V → W between finite-dimensional vector spaces can be described by a matrix A = (aij), after choosing bases v1, ..., vn of V, and w1, ..., wm of W (so n is the dimension of V and m is the dimension of W), which is such that
In other words, column j of A expresses the image of vj in terms of the basis vectors wi of W; thus this relation uniquely determines the entries of the matrix A. The matrix depends on the choice of the bases: different choices of bases give rise to different, but equivalent matrices. Many of the above concrete notions can be reinterpreted in this light, for example, the transpose matrix AT describes the transpose of the linear map given by A, concerning the dual bases.
These properties can be restated more naturally: the category of matrices with entries in a field with multiplication as composition is equivalent to the category of finite-dimensional vector spaces and linear maps over this field.
More generally, the set of m×n matrices can be used to represent the R-linear maps between the free modules Rm and Rn for an arbitrary ring R with unity. When n = m composition of these maps is possible, and this gives rise to the matrix ring of n×n matrices representing the endomorphism ring of Rn.
Matrix groups
A group is a mathematical structure consisting of a set of objects together with a binary operation, that is, an operation combining any two objects to a third, subject to certain requirements. A group in which the objects are matrices and the group operation is matrix multiplication is called a matrix group. Since a group of every element must be invertible, the most general matrix groups are the groups of all invertible matrices of a given size, called the general linear groups.
Any property of matrices that is preserved under matrix products and inverses can be used to define further matrix groups. For example, matrices with a given size and with a determinant of 1 form a subgroup of (that is, a smaller group contained in) their general linear group, called a special linear group.Orthogonal matrices, determined by the condition form the orthogonal group. Every orthogonal matrix has determinant 1 or −1. Orthogonal matrices with determinant 1 form a subgroup called special orthogonal group.
Every finite group is isomorphic to a matrix group, as one can see by considering the regular representation of the symmetric group. General groups can be studied using matrix groups, which are comparatively well understood, using representation theory.
Infinite matrices
It is also possible to consider matrices with infinitely many rows and/or columns even though, being infinite objects, one cannot write down such matrices explicitly. All that matters is that for every element in the set indexing rows, and every element in the set indexing columns, there is a well-defined entry (these index sets need not even be subsets of the natural numbers). The basic operations of addition, subtraction, scalar multiplication, and transposition can still be defined without problem; however, matrix multiplication may involve infinite summations to define the resulting entries, and these are not defined in general.
If R is any ring with unity, then the ring of endomorphisms of as a right R module is isomorphic to the ring of column finite matrices whose entries are indexed by , and whose columns each contain only finitely many nonzero entries. The endomorphisms of M considered as a left R module result in an analogous object, the row finite matrices whose rows each only have finitely many nonzero entries.
If infinite matrices are used to describe linear maps, then only those matrices can be used all of whose columns have but a finite number of nonzero entries, for the following reason. For a matrix A to describe a linear map f : V → W, bases for both spaces must have been chosen; recall that by definition this means that every vector in the space can be written uniquely as a (finite) linear combination of basis vectors, so that written as a (column) vector ve of coefficients, only finitely many entries vI are nonzero. Now the columns of A describe the images by f of individual basis vectors of V in the basis of W, which is only meaningful if these columns have only finitely many nonzero entries. There is no restriction on the rows of A however: in the product A · v there are only finitely many nonzero coefficients of v involved, so every one of its entries, even if it is given as an infinite sum of products, involves only finitely many nonzero terms and is therefore well defined. Moreover, this amounts to forming a linear combination of the columns of A that effectively involves only finitely many of them, whence the result has only finitely many nonzero entries because each of those columns does. Products of two matrices of the given type are well defined (provided that the column-index and row-index sets match), are of the same type, and correspond to the composition of linear maps.
If R is a normed ring, then the condition of row or column finiteness can be relaxed. With the norm in place, absolutely convergent series can be used instead of finite sums. For example, the matrices whose column sums are convergent sequences form a ring. Analogously, the matrices whose row sums are convergent series also form a ring.
Infinite matrices can also be used to describe operators on Hilbert spaces, where convergence and continuity questions arise, which again results in certain constraints that must be imposed. However, the explicit point of view of matrices tends to obfuscate the matter, and the abstract and more powerful tools of functional analysis can be used instead.
Empty matrix
An empty matrix is a matrix in which the number of rows or columns (or both) is zero. Empty matrices help to deal with maps involving the zero vector space. For example, if A is a 3-by-0 matrix and B is a 0-by-3 matrix, then AB is the 3-by-3 zero matrix corresponding to the null map from a 3-dimensional space V to itself, while BA is a 0-by-0 matrix. There is no common notation for empty matrices, but most computer algebra systems allow creating and computing with them. The determinant of the 0-by-0 matrix is 1 as follows regarding the empty product occurring in the Leibniz formula for the determinant as 1. This value is also consistent with the fact that the identity map from any finite-dimensional space to itself has determinant 1, a fact that is often used as a part of the characterization of determinants.
Applications
There are numerous applications of matrices, both in mathematics and other sciences. Some of them merely take advantage of the compact representation of a set of numbers in a matrix. For example, in game theory and economics, the payoff matrix encodes the payoff for two players, depending on which out of a given (finite) set of strategies the players choose.Text mining and automated thesaurus compilation makes use of document-term matrices such as tf-idf to track frequencies of certain words in several documents.
Complex numbers can be represented by particular real 2-by-2 matrices via
under which addition and multiplication of complex numbers and matrices correspond to each other. For example, 2-by-2 rotation matrices represent the multiplication with some complex number of absolute value 1, as above. A similar interpretation is possible for quaternions and Clifford algebras in general.
Early encryption techniques such as the Hill cipher also used matrices. However, due to the linear nature of matrices, these codes are comparatively easy to break.Computer graphics uses matrices to represent objects; to calculate transformations of objects using affine rotation matrices to accomplish tasks such as projecting a three-dimensional object onto a two-dimensional screen, corresponding to a theoretical camera observation; and to apply image convolutions such as sharpening, blurring, edge detection, and more. Matrices over a polynomial ring are important in the study of control theory.
Chemistry makes use of matrices in various ways, particularly since the use of quantum theory to discuss molecular bonding and spectroscopy. Examples are the overlap matrix and the Fock matrix used in solving the Roothaan equations to obtain the molecular orbitals of the Hartree–Fock method.
Graph theory
The adjacency matrix of a finite graph is a basic notion of graph theory. It records which vertices of the graph are connected by an edge. Matrices containing just two different values (1 and 0 meaning for example "yes" and "no", respectively) are called logical matrices. The distance (or cost) matrix contains information about the distances of the edges. These concepts can be applied to websites connected by hyperlinks or cities connected by roads etc., in which case (unless the connection network is extremely dense) the matrices tend to be sparse, that is, contain few nonzero entries. Therefore, specifically tailored matrix algorithms can be used in network theory.
Analysis and geometry
The Hessian matrix of a differentiable function consists of the second derivatives of ƒ concerning the several coordinate directions, that is,
It encodes information about the local growth behavior of the function: given a critical point x = (x1, ..., xn), that is, a point where the first partial derivatives of ƒ vanish, the function has a local minimum if the Hessian matrix is positive definite. Quadratic programming can be used to find global minima or maxima of quadratic functions closely related to the ones attached to matrices (see above).
Another matrix frequently used in geometrical situations is the Jacobi matrix of a differentiable map If f1, ..., fm denote the components of f, then the Jacobi matrix is defined as
If n > m, and if the rank of the Jacobi matrix attains its maximal value m, f is locally invertible at that point, by the implicit function theorem.
Partial differential equations can be classified by considering the matrix of coefficients of the highest-order differential operators of the equation. For elliptic partial differential equations this matrix is positive definite, which has a decisive influence on the set of possible solutions of the equation in question.
The finite element method is an important numerical method to solve partial differential equations, widely applied in simulating complex physical systems. It attempts to approximate the solution to some equation by piecewise linear functions, where the pieces are chosen concerning a sufficiently fine grid, which in turn can be recast as a matrix equation.
Probability theory and statistics
Stochastic matrices are square matrices whose rows are probability vectors, that is, whose entries are non-negative and sum up to one. Stochastic matrices are used to define Markov chains with finitely many states. A row of the stochastic matrix gives the probability distribution for the next position of some particle currently in the state that corresponds to the row. Properties of the Markov chain-like absorbing states, that is, states that any particle attains eventually, can be read off the eigenvectors of the transition matrices.
Statistics also makes use of matrices in many different forms.Descriptive statistics is concerned with describing data sets, which can often be represented as data matrices, which may then be subjected to dimensionality reduction techniques. The covariance matrix encodes the mutual variance of several random variables. Another technique using matrices are linear least squares, a method that approximates a finite set of pairs (x1, y1), (x2, y2), ..., (xN, yN), by a linear function
which can be formulated in terms of matrices, related to the singular value decomposition of matrices.
Random matrices are matrices whose entries are random numbers, subject to suitable probability distributions, such as matrix normal distribution. Beyond probability theory, they are applied in domains ranging from number theory to physics.
Symmetries and transformations in physics
Linear transformations and the associated symmetries play a key role in modern physics. For example, elementary particles in quantum field theory are classified as representations of the Lorentz group of special relativity and, more specifically, by their behavior under the spin group. Concrete representations involving the Pauli matrices and more general gamma matrices are an integral part of the physical description of fermions, which behave as spinors. For the three lightest quarks, there is a group-theoretical representation involving the special unitary group SU(3); for their calculations, physicists use a convenient matrix representation known as the Gell-Mann matrices, which are also used for the SU(3) gauge group that forms the basis of the modern description of strong nuclear interactions, quantum chromodynamics. The Cabibbo–Kobayashi–Maskawa matrix, in turn, expresses the fact that the basic quark states that are important for weak interactions are not the same as, but linearly related to the basic quark states that define particles with specific and distinct masses.
Linear combinations of quantum states
The first model of quantum mechanics (Heisenberg, 1925) represented the theory's operators by infinite-dimensional matrices acting on quantum states. This is also referred to as matrix mechanics. One particular example is the density matrix that characterizes the "mixed" state of a quantum system as a linear combination of elementary, "pure" eigenstates.
Another matrix serves as a key tool for describing the scattering experiments that form the cornerstone of experimental particle physics: Collision reactions such as occur in particle accelerators, where non-interacting particles head towards each other and collide in a small interaction zone, with a new set of non-interacting particles as the result, can be described as the scalar product of outgoing particle states and a linear combination of ingoing particle states. The linear combination is given by a matrix known as the S-matrix, which encodes all information about the possible interactions between particles.
Normal modes
A general application of matrices in physics is the description of linearly coupled harmonic systems. The equations of motion of such systems can be described in matrix form, with a mass matrix multiplying a generalized velocity to give the kinetic term, and a force matrix multiplying a displacement vector to characterize the interactions. The best way to obtain solutions is to determine the system's eigenvectors, its normal modes, by diagonalizing the matrix equation. Techniques like this are crucial when it comes to the internal dynamics of molecules: the internal vibrations of systems consisting of mutually bound component atoms. They are also needed for describing mechanical vibrations, and oscillations in electrical circuits.
Geometrical optics
Geometrical optics provides further matrix applications. In this approximative theory, the wave nature of light is neglected. The result is a model in which light rays are indeed geometrical rays. If the deflection of light rays by optical elements is small, the action of a lens or reflective element on a given light ray can be expressed as multiplication of a two-component vector with a two-by-two matrix called ray transfer matrix analysis: the vector's components are the light ray's slope and its distance from the optical axis, while the matrix encodes the properties of the optical element. There are two kinds of matrices, viz. a refraction matrix describing the refraction at a lens surface, and a translation matrix, describing the translation of the plane of reference to the next refracting surface, where another refraction matrix applies. The optical system, consisting of a combination of lenses and/or reflective elements, is simply described by the matrix resulting from the product of the components' matrices.
Electronics
Traditional mesh analysis and nodal analysis in electronics lead to a system of linear equations that can be described with a matrix.
The behavior of many electronic components can be described using matrices. Let A be a 2-dimensional vector with the component's input voltage v1 and input current I1 as its elements, and let B be a 2-dimensional vector with the component's output voltage v2 and output current I2 as its elements. Then the behavior of the electronic component can be described by B = H · A, where H is a 2 x 2 matrix containing one impedance element (h12), one admittance element (h21), and two dimensionless elements (h11 and h22). Calculating a circuit now reduces to multiplying matrices.
History
Matrices have a long history of application in solving linear equations but they were known as arrays until the 1800s. The Chinese text The Nine Chapters on the Mathematical Art written in the 10th–2nd century BCE is the first example of the use of array methods to solve simultaneous equations, including the concept of determinants. In 1545 Italian mathematician Gerolamo Cardano introduced the method to Europe when he published Ars Magna. The Japanese mathematician Seki used the same array methods to solve simultaneous equations in 1683. The Dutch mathematician Jan de Witt represented transformations using arrays in his 1659 book Elements of Curves (1659). Between 1700 and 1710 Gottfried Wilhelm Leibniz publicized the use of arrays for recording information or solutions and experimented with over 50 different systems of arrays.Cramer presented his rule in 1750.
The term "matrix" (Latin for "womb", "dam" (non-human female animal kept for breeding), "source", "origin", "list", and "register", are derived from mater—mother) was coined by James Joseph Sylvester in 1850, who understood a matrix as an object giving rise to several determinants today called minors, that is to say, determinants of smaller matrices that derive from the original one by removing columns and rows. In an 1851 paper, Sylvester explains:
I have in previous papers defined a "Matrix" as a rectangular array of terms, out of which different systems of determinants may be engendered from the womb of a common parent.
Arthur Cayley published a treatise on geometric transformations using matrices that were not rotated versions of the coefficients being investigated as had previously been done. Instead, he defined operations such as addition, subtraction, multiplication, and division as transformations of those matrices and showed the associative and distributive properties held. Cayley investigated and demonstrated the non-commutative property of matrix multiplication as well as the commutative property of matrix addition. Early matrix theory had limited the use of arrays almost exclusively to determinants and Arthur Cayley's abstract matrix operations were revolutionary. He was instrumental in proposing a matrix concept independent of equation systems. In 1858 Cayley published his A memoir on the theory of matrices in which he proposed and demonstrated the Cayley–Hamilton theorem.
The English mathematician Cuthbert Edmund Cullis was the first to use modern bracket notation for matrices in 1913 and he simultaneously demonstrated the first significant use of the notation A = [ai,j] to represent a matrix where ai,j refers to the ith row and the jth column.
The modern study of determinants sprang from several sources.Number-theoretical problems led Gauss to relate coefficients of quadratic forms, that is, expressions such as x2 + xy − 2y2, and linear maps in three dimensions to matrices. Eisenstein further developed these notions, including the remark that, in modern parlance, matrix products are non-commutative. Cauchy was the first to prove general statements about determinants, using as the definition of the determinant of a matrix A = [ai, j] the following: replace the powers ak
j by ajk in the polynomial
- ,
where denotes the product of the indicated terms. He also showed, in 1829, that the eigenvalues of symmetric matrices are real.Jacobi studied "functional determinants"—later called Jacobi determinants by Sylvester—which can be used to describe geometric transformations at a local (or infinitesimal) level, see above. Kronecker's Vorlesungen über die Theorie der Determinanten and Weierstrass' Zur Determinantentheorie, both published in 1903, first treated determinants axiomatically, as opposed to previous more concrete approaches such as the mentioned formula of Cauchy. At that point, determinants were firmly established.
Many theorems were first established for small matrices only, for example, the Cayley–Hamilton theorem was proved for 2×2 matrices by Cayley in the aforementioned memoir, and by Hamilton for 4×4 matrices. Frobenius, working on bilinear forms, generalized the theorem to all dimensions (1898). Also at the end of the 19th century, the Gauss–Jordan elimination (generalizing a special case now known as Gauss elimination) was established by Wilhelm Jordan. In the early 20th century, matrices attained a central role in linear algebra, partially due to their use in the classification of the hypercomplex number systems of the previous century.
The inception of matrix mechanics by Heisenberg, Born and Jordan led to studying matrices with infinitely many rows and columns. Later, von Neumann carried out the mathematical formulation of quantum mechanics, by further developing functional analytic notions such as linear operators on Hilbert spaces, which, very roughly speaking, correspond to Euclidean space, but with an infinity of independent directions.
Other historical usages of the word "matrix" in mathematics
The word has been used in unusual ways by at least two authors of historical importance.
Bertrand Russell and Alfred North Whitehead in their Principia Mathematica (1910–1913) use the word "matrix" in the context of their axiom of reducibility. They proposed this axiom as a means to reduce any function to one of lower type, successively, so that at the "bottom" (0 order) the function is identical to its extension:
Let us give the name of matrix to any function, of however many variables, that does not involve any apparent variables. Then, any possible function other than a matrix derives from a matrix using generalization, that is, by considering the proposition that the function in question is true with all possible values or with some value of one of the arguments, the other argument or arguments remaining undetermined.
For example, a function Φ(x, y) of two variables x and y can be reduced to a collection of functions of a single variable, for example, y, by "considering" the function for all possible values of "individuals" ai substituted in place of a variable x. And then the resulting collection of functions of the single variable y, that is, ∀ai: Φ(ai, y), can be reduced to a "matrix" of values by "considering" the function for all possible values of "individuals" bi substituted in place of variable y:
Alfred Tarski in his 1946 Introduction to Logic used the word "matrix" synonymously with the notion of truth table as used in mathematical logic.
See also
- List of named matrices
- Algebraic multiplicity – Multiplicity of an eigenvalue as a root of the characteristic polynomial
- Geometric multiplicity – Dimension of the eigenspace associated with an eigenvalue
- Gram–Schmidt process – Orthonormalization of a set of vectors
- Irregular matrix
- Matrix calculus – Specialized notation for multivariable calculus
- Matrix function – Function that maps matrices to matrices
- Matrix multiplication algorithm
- Tensor — A generalization of matrices with any number of indices
- Bohemian matrices – Set of matrices
- Category of matrices — The algebraic structure formed by matrices and their multiplication
Notes
- However, in the case of adjacency matrices, matrix multiplication or a variant of it allows the simultaneous computation of the number of paths between any two vertices, and of the shortest length of a path between two vertices.
- Lang 2002
- Fraleigh (1976, p. 209)
- Nering (1970, p. 37)
- Weisstein, Eric W. "Matrix". mathworld.wolfram.com. Retrieved 2020-08-19.
- Oualline 2003, Ch. 5
- Pop; Furdui (2017). Square Matrices of Order 2. Springer International Publishing. ISBN 978-3-319-54938-5.
- Brown 1991, Definition I.2.1 (addition), Definition I.2.4 (scalar multiplication), and Definition I.2.33 (transpose)
- Brown 1991, Theorem I.2.6
- "How to Multiply Matrices". www.mathsisfun.com. Retrieved 2020-08-19.
- Brown 1991, Definition I.2.20
- Brown 1991, Theorem I.2.24
- Horn & Johnson 1985, Ch. 4 and 5
- Bronson (1970, p. 16)
- Kreyszig (1972, p. 220)
- Protter & Morrey (1970, p. 869)
- Kreyszig (1972, pp. 241, 244)
- Schneider, Hans; Barker, George Phillip (2012), Matrices and Linear Algebra, Dover Books on Mathematics, Courier Dover Corporation, p. 251, ISBN 978-0-486-13930-2.
- Perlis, Sam (1991), Theory of Matrices, Dover books on advanced mathematics, Courier Dover Corporation, p. 103, ISBN 978-0-486-66810-9.
- Anton, Howard (2010), Elementary Linear Algebra (10th ed.), John Wiley & Sons, p. 414, ISBN 978-0-470-45821-1.
- Horn, Roger A.; Johnson, Charles R. (2012), Matrix Analysis (2nd ed.), Cambridge University Press, p. 17, ISBN 978-0-521-83940-2.
- Brown 1991, I.2.21 and 22
- Greub 1975, Section III.2
- Brown 1991, Definition II.3.3
- Greub 1975, Section III.1
- Brown 1991, Theorem II.3.22
- Horn & Johnson 1985, Theorem 2.5.6
- Brown 1991, Definition I.2.28
- Brown 1991, Definition I.5.13
- Horn & Johnson 1985, Chapter 7
- Horn & Johnson 1985, Theorem 7.2.1
- Horn & Johnson 1985, Example 4.0.6, p. 169
- "Matrix | mathematics". Encyclopedia Britannica. Retrieved 2020-08-19.
- Brown 1991, Definition III.2.1
- Brown 1991, Theorem III.2.12
- Brown 1991, Corollary III.2.16
- Mirsky 1990, Theorem 1.4.1
- Brown 1991, Theorem III.3.18
- Eigen means "own" in German and in Dutch.
- Brown 1991, Definition III.4.1
- Brown 1991, Definition III.4.9
- Brown 1991, Corollary III.4.10
- Householder 1975, Ch. 7
- Bau III & Trefethen 1997
- Golub & Van Loan 1996, Algorithm 1.3.1
- Golub & Van Loan 1996, Chapters 9 and 10, esp. section 10.2
- Golub & Van Loan 1996, Chapter 2.3
- Grcar, Joseph F. (2011-01-01). "John von Neumann's Analysis of Gaussian Elimination and the Origins of Modern Numerical Analysis". SIAM Review. 53 (4): 607–682. doi:10.1137/080734716. ISSN 0036-1445.
- For example, Mathematica, see Wolfram 2003, Ch. 3.7
- Press, Flannery & Teukolsky et al. 1992
- Stoer & Bulirsch 2002, Section 4.1
- Horn & Johnson 1985, Theorem 2.5.4
- Horn & Johnson 1985, Ch. 3.1, 3.2
- Arnold & Cooke 1992, Sections 14.5, 7, 8
- Bronson 1989, Ch. 15
- Coburn 1955, Ch. V
- Lang 2002, Chapter XIII
- Lang 2002, XVII.1, p. 643
- Lang 2002, Proposition XIII.4.16
- Reichl 2004, Section L.2
- Greub 1975, Section III.3
- Greub 1975, Section III.3.13
- Perrone (2024), pp. 99–100
- See any standard reference in a group.
- Additionally, the group must be closed in the general linear group.
- Baker 2003, Def. 1.30
- Baker 2003, Theorem 1.2
- Artin 1991, Chapter 4.5
- Rowen 2008, Example 19.2, p. 198
- See any reference in representation theory or group representation.
- See the item "Matrix" in Itõ, ed. 1987
- "Not much of matrix theory carries over to infinite-dimensional spaces, and what does is not so useful, but it sometimes helps." Halmos 1982, p. 23, Chapter 5
- "Empty Matrix: A matrix is empty if either its row or column dimension is zero", Glossary Archived 2009-04-29 at the Wayback Machine, O-Matrix v6 User Guide
- "A matrix having at least one dimension equal to zero is called an empty matrix", MATLAB Data Structures Archived 2009-12-28 at the Wayback Machine
- Fudenberg & Tirole 1983, Section 1.1.1
- Manning 1999, Section 15.3.4
- Ward 1997, Ch. 2.8
- Stinson 2005, Ch. 1.1.5 and 1.2.4
- Association for Computing Machinery 1979, Ch. 7
- Godsil & Royle 2004, Ch. 8.1
- Punnen 2002
- Lang 1987a, Ch. XVI.6
- Nocedal 2006, Ch. 16
- Lang 1987a, Ch. XVI.1
- Lang 1987a, Ch. XVI.5. For a more advanced, and more general statement see Lang 1969, Ch. VI.2
- Gilbarg & Trudinger 2001
- Šolin 2005, Ch. 2.5. See also stiffness method.
- Latouche & Ramaswami 1999
- Mehata & Srinivasan 1978, Ch. 2.8
- Healy, Michael (1986), Matrices for Statistics, Oxford University Press, ISBN 978-0-19-850702-4
- Krzanowski 1988, Ch. 2.2., p. 60
- Krzanowski 1988, Ch. 4.1
- Conrey 2007
- Zabrodin, Brezin & Kazakov et al. 2006
- Itzykson & Zuber 1980, Ch. 2
- see Burgess & Moore 2007, section 1.6.3. (SU(3)), section 2.4.3.2. (Kobayashi–Maskawa matrix)
- Schiff 1968, Ch. 6
- Bohm 2001, sections II.4 and II.8
- Weinberg 1995, Ch. 3
- Wherrett 1987, part II
- Riley, Hobson & Bence 1997, 7.17
- Guenther 1990, Ch. 5
- Shen, Crossley & Lun 1999 cited by Bretscher 2005, p. 1
- Discrete Mathematics 4th Ed. Dossey, Otto, Spense, Vanden Eynden, Published by Addison Wesley, October 10, 2001 ISBN 978-0-321-07912-1, p. 564-565
- Needham, Joseph; Wang Ling (1959). Science and Civilisation in China. Vol. III. Cambridge: Cambridge University Press. p. 117. ISBN 978-0-521-05801-8.
- Discrete Mathematics 4th Ed. Dossey, Otto, Spense, Vanden Eynden, Published by Addison Wesley, October 10, 2001 ISBN 978-0-321-07912-1, p. 564
- Merriam-Webster dictionary, Merriam-Webster, retrieved April 20, 2009
- Although many sources state that J. J. Sylvester coined the mathematical term "matrix" in 1848, Sylvester published nothing in 1848. (For proof that Sylvester published nothing in 1848, see J. J. Sylvester with H. F. Baker, ed., The Collected Mathematical Papers of James Joseph Sylvester (Cambridge, England: Cambridge University Press, 1904), vol. 1.) His earliest use of the term "matrix" occurs in 1850 in J. J. Sylvester (1850) "Additions to the articles in the September number of this journal, "On a new class of theorems," and on Pascal's theorem," The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 37: 363-370. From page 369: "For this purpose, we must commence, not with a square, but with an oblong arrangement of terms consisting, suppose, of m lines and n columns. This does not in itself represent a determinant, but is, as it were, a Matrix out of which we may form various systems of determinants ... "
- The Collected Mathematical Papers of James Joseph Sylvester: 1837–1853, Paper 37, p. 247
- Phil.Trans. 1858, vol.148, pp.17-37 Math. Papers II 475-496
- Dieudonné, ed. 1978, Vol. 1, Ch. III, p. 96
- Knobloch 1994
- Hawkins 1975
- Kronecker 1897
- Weierstrass 1915, pp. 271–286
- Bôcher 2004
- Mehra & Rechenberg 1987
- Whitehead, Alfred North; and Russell, Bertrand (1913) Principia Mathematica to *56, Cambridge at the University Press, Cambridge UK (republished 1962) cf page 162ff.
- Tarski, Alfred; (1946) Introduction to Logic and the Methodology of Deductive Sciences, Dover Publications, Inc, New York NY, ISBN 0-486-28462-X.
References
- Anton, Howard (1987), Elementary Linear Algebra (5th ed.), New York: Wiley, ISBN 0-471-84819-0
- Arnold, Vladimir I.; (1992), Ordinary differential equations, Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-3-540-54813-3
- Artin, Michael (1991), Algebra, Prentice Hall, ISBN 978-0-89871-510-1
- Association for Computing Machinery (1979), Computer Graphics, Tata McGraw–Hill, ISBN 978-0-07-059376-3
- Baker, Andrew J. (2003), Matrix Groups: An Introduction to Lie Group Theory, Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-1-85233-470-3
- Bau III, David; Trefethen, Lloyd N. (1997), Numerical linear algebra, Philadelphia, PA: Society for Industrial and Applied Mathematics, ISBN 978-0-89871-361-9
- Beauregard, Raymond A.; Fraleigh, John B. (1973), A First Course In Linear Algebra: with Optional Introduction to Groups, Rings, and Fields, Boston: Houghton Mifflin Co., ISBN 0-395-14017-X
- Bretscher, Otto (2005), Linear Algebra with Applications (3rd ed.), Prentice Hall
- Bronson, Richard (1970), Matrix Methods: An Introduction, New York: Academic Press, LCCN 70097490
- Bronson, Richard (1989), Schaum's outline of theory and problems of matrix operations, New York: McGraw–Hill, ISBN 978-0-07-007978-6
- Brown, William C. (1991), Matrices and vector spaces, New York, NY: Marcel Dekker, ISBN 978-0-8247-8419-5
- Coburn, Nathaniel (1955), Vector and tensor analysis, New York, NY: Macmillan, OCLC 1029828
- Conrey, J. Brian (2007), Ranks of elliptic curves and random matrix theory, Cambridge University Press, ISBN 978-0-521-69964-8
- Fraleigh, John B. (1976), A First Course In Abstract Algebra (2nd ed.), Reading: Addison-Wesley, ISBN 0-201-01984-1
- Fudenberg, Drew; Tirole, Jean (1983), Game Theory, MIT Press
- Gilbarg, David; Trudinger, Neil S. (2001), Elliptic partial differential equations of second order (2nd ed.), Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-3-540-41160-4
- Godsil, Chris; Royle, Gordon (2004), Algebraic Graph Theory, Graduate Texts in Mathematics, vol. 207, Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-0-387-95220-8
- Golub, Gene H.; Van Loan, Charles F. (1996), Matrix Computations (3rd ed.), Johns Hopkins, ISBN 978-0-8018-5414-9
- Greub, Werner Hildbert (1975), Linear algebra, Graduate Texts in Mathematics, Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-0-387-90110-7
- Halmos, Paul Richard (1982), A Hilbert space problem book, Graduate Texts in Mathematics, vol. 19 (2nd ed.), Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-0-387-90685-0, MR 0675952
- Horn, Roger A.; Johnson, Charles R. (1985), Matrix Analysis, Cambridge University Press, ISBN 978-0-521-38632-6
- Householder, Alston S. (1975), The theory of matrices in numerical analysis, New York, NY: Dover Publications, MR 0378371
- Kreyszig, Erwin (1972), Advanced Engineering Mathematics (3rd ed.), New York: Wiley, ISBN 0-471-50728-8.
- Krzanowski, Wojtek J. (1988), Principles of multivariate analysis, Oxford Statistical Science Series, vol. 3, The Clarendon Press Oxford University Press, ISBN 978-0-19-852211-9, MR 0969370
- Itô, Kiyosi, ed. (1987), Encyclopedic dictionary of mathematics. Vol. I-IV (2nd ed.), MIT Press, ISBN 978-0-262-09026-1, MR 0901762
- Lang, Serge (1969), Analysis II, Addison-Wesley
- Lang, Serge (1987a), Calculus of several variables (3rd ed.), Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-0-387-96405-8
- Lang, Serge (1987b), Linear algebra, Berlin, DE; New York, NY: Springer-Verlag, ISBN 978-0-387-96412-6
- Lang, Serge (2002), Algebra, Graduate Texts in Mathematics, vol. 211 (Revised third ed.), New York: Springer-Verlag, ISBN 978-0-387-95385-4, MR 1878556
- Latouche, Guy; Ramaswami, Vaidyanathan (1999), Introduction to matrix analytic methods in stochastic modeling (1st ed.), Philadelphia, PA: Society for Industrial and Applied Mathematics, ISBN 978-0-89871-425-8
- Manning, Christopher D.; Schütze, Hinrich (1999), Foundations of statistical natural language processing, MIT Press, ISBN 978-0-262-13360-9
- Mehata, K. M.; Srinivasan, S. K. (1978), Stochastic processes, New York, NY: McGraw–Hill, ISBN 978-0-07-096612-3
- Mirsky, Leonid (1990), An Introduction to Linear Algebra, Courier Dover Publications, ISBN 978-0-486-66434-7
- Nering, Evar D. (1970), Linear Algebra and Matrix Theory (2nd ed.), New York: Wiley, LCCN 76-91646
- Nocedal, Jorge; Wright, Stephen J. (2006), Numerical Optimization (2nd ed.), Berlin, DE; New York, NY: Springer-Verlag, p. 449, ISBN 978-0-387-30303-1
- Oualline, Steve (2003), Practical C++ programming, O'Reilly, ISBN 978-0-596-00419-4
- Perrone, Paolo (2024), Starting Category Theory, World Scientific, doi:10.1142/9789811286018_0005, ISBN 978-981-12-8600-1
- Press, William H.; Flannery, Brian P.; Teukolsky, Saul A.; Vetterling, William T. (1992), "LU Decomposition and Its Applications" (PDF), Numerical Recipes in FORTRAN: The Art of Scientific Computing (2nd ed.), Cambridge University Press, pp. 34–42, archived from the original on 2009-09-06
- Protter, Murray H.; Morrey, Charles B. Jr. (1970), College Calculus with Analytic Geometry (2nd ed.), Reading: Addison-Wesley, LCCN 76087042
- Punnen, Abraham P.; Gutin, Gregory (2002), The traveling salesman problem and its variations, Boston, MA: Kluwer Academic Publishers, ISBN 978-1-4020-0664-7
- Reichl, Linda E. (2004), The transition to chaos: conservative classical systems and quantum manifestations, Berlin, DE;
In mathematics a matrix pl matrices is a rectangular array or table of numbers symbols or expressions with elements or entries arranged in rows and columns which is used to represent a mathematical object or property of such an object An m n matrix the m rows are horizontal and the n columns are vertical Each element of a matrix is often denoted by a variable with two subscripts For example a2 1 represents the element at the second row and first column of the matrix For example 19 13205 6 displaystyle begin bmatrix 1 amp 9 amp 13 20 amp 5 amp 6 end bmatrix is a matrix with two rows and three columns This is often referred to as a two by three matrix a 2 3 displaystyle 2 times 3 matrix or a matrix of dimension 2 3 displaystyle 2 times 3 Matrices are commonly related to linear algebra Notable exceptions include incidence matrices and adjacency matrices in graph theory This article focuses on matrices related to linear algebra and unless otherwise specified all matrices represent linear maps or may be viewed as such Square matrices matrices with the same number of rows and columns play a major role in matrix theory Square matrices of a given dimension form a noncommutative ring which is one of the most common examples of a noncommutative ring The determinant of a square matrix is a number associated with the matrix which is fundamental for the study of a square matrix for example a square matrix is invertible if and only if it has a nonzero determinant and the eigenvalues of a square matrix are the roots of a polynomial determinant In geometry matrices are widely used for specifying and representing geometric transformations for example rotations and coordinate changes In numerical analysis many computational problems are solved by reducing them to a matrix computation and this often involves computing with matrices of huge dimensions Matrices are used in most areas of mathematics and scientific fields either directly or through their use in geometry and numerical analysis Matrix theory is the branch of mathematics that focuses on the study of matrices It was initially a sub branch of linear algebra but soon grew to include subjects related to graph theory algebra combinatorics and statistics DefinitionA matrix is a rectangular array of numbers or other mathematical objects called the entries of the matrix Matrices are subject to standard operations such as addition and multiplication Most commonly a matrix over a field F is a rectangular array of elements of F A real matrix and a complex matrix are matrices whose entries are respectively real numbers or complex numbers More general types of entries are discussed below For instance this is a real matrix A 1 30 620 45 59 7 6 2 displaystyle mathbf A begin bmatrix 1 3 amp 0 6 20 4 amp 5 5 9 7 amp 6 2 end bmatrix The numbers symbols or expressions in the matrix are called its entries or its elements The horizontal and vertical lines of entries in a matrix are called rows and columns respectively Size The size of a matrix is defined by the number of rows and columns it contains There is no limit to the number of rows and columns that a matrix in the usual sense can have as long as they are positive integers A matrix with m displaystyle m rows and n displaystyle n columns is called an m n displaystyle m times n matrix or m displaystyle m by n displaystyle n matrix where m displaystyle m and n displaystyle n are called its dimensions For example the matrix A displaystyle mathbf A above is a 3 2 displaystyle 3 times 2 matrix Matrices with a single row are called row matrices and those with a single column are called column matrices When vectors are involved the terms row vector and column vector are commonly used instead A matrix with the same number of rows and columns is called a square matrix A matrix with an infinite number of rows or columns or both is called an infinite matrix In some contexts such as computer algebra programs it is useful to consider a matrix with no rows or no columns called an empty matrix Overview of a matrix size Name Size Example DescriptionRow matrix 1 n 372 displaystyle begin bmatrix 3 amp 7 amp 2 end bmatrix A matrix with one row sometimes used to represent a vectorColumn matrix n 1 418 displaystyle begin bmatrix 4 1 8 end bmatrix A matrix with one column sometimes used to represent a vectorSquare matrix n n 91351117263 displaystyle begin bmatrix 9 amp 13 amp 5 1 amp 11 amp 7 2 amp 6 amp 3 end bmatrix A matrix with the same number of rows and columns sometimes used to represent a linear transformation from a vector space to itself such as reflection rotation or shearing NotationThe specifics of symbolic matrix notation vary widely with some prevailing trends Matrices are commonly written in square brackets or parentheses so that an m n displaystyle m times n matrix A displaystyle mathbf A is represented as A a11a12 a1na21a22 a2n am1am2 amn a11a12 a1na21a22 a2n am1am2 amn displaystyle mathbf A begin bmatrix a 11 amp a 12 amp cdots amp a 1n a 21 amp a 22 amp cdots amp a 2n vdots amp vdots amp ddots amp vdots a m1 amp a m2 amp cdots amp a mn end bmatrix begin pmatrix a 11 amp a 12 amp cdots amp a 1n a 21 amp a 22 amp cdots amp a 2n vdots amp vdots amp ddots amp vdots a m1 amp a m2 amp cdots amp a mn end pmatrix This may be abbreviated by writing only a single generic term possibly along with indices as in A aij aij or aij 1 i m 1 j n displaystyle mathbf A left a ij right quad left a ij right quad text or quad left a ij right 1 leq i leq m 1 leq j leq n or A ai j 1 i j n displaystyle mathbf A a i j 1 leq i j leq n in the case that n m displaystyle n m Matrices are usually symbolized using upper case letters such as A displaystyle mathbf A in the examples above while the corresponding lower case letters with two subscript indices e g a11 displaystyle a 11 or a1 1 displaystyle a 1 1 represent the entries In addition to using upper case letters to symbolize matrices many authors use a special typographical style commonly boldface Roman non italic to further distinguish matrices from other mathematical objects An alternative notation involves the use of a double underline with the variable name with or without boldface style as in A displaystyle underline underline A The entry in the i th row and j th column of a matrix A is sometimes referred to as the i j displaystyle i j or i j displaystyle i j entry of the matrix and commonly denoted by ai j displaystyle a i j or aij displaystyle a ij Alternative notations for that entry are A i j displaystyle mathbf A i j and Ai j displaystyle mathbf A i j For example the 1 3 displaystyle 1 3 entry of the following matrix A displaystyle mathbf A is 5 also denoted a13 displaystyle a 13 a1 3 displaystyle a 1 3 A 1 3 displaystyle mathbf A 1 3 or A1 3 displaystyle mathbf A 1 3 A 4 750 20118191 312 displaystyle mathbf A begin bmatrix 4 amp 7 amp color red 5 amp 0 2 amp 0 amp 11 amp 8 19 amp 1 amp 3 amp 12 end bmatrix Sometimes the entries of a matrix can be defined by a formula such as ai j f i j displaystyle a i j f i j For example each of the entries of the following matrix A displaystyle mathbf A is determined by the formula aij i j displaystyle a ij i j A 0 1 2 310 1 2210 1 displaystyle mathbf A begin bmatrix 0 amp 1 amp 2 amp 3 1 amp 0 amp 1 amp 2 2 amp 1 amp 0 amp 1 end bmatrix In this case the matrix itself is sometimes defined by that formula within square brackets or double parentheses For example the matrix above is defined as A i j displaystyle mathbf A i j or A i j displaystyle mathbf A i j If matrix size is m n displaystyle m times n the above mentioned formula f i j displaystyle f i j is valid for any i 1 m displaystyle i 1 dots m and any j 1 n displaystyle j 1 dots n This can be specified separately or indicated using m n displaystyle m times n as a subscript For instance the matrix A displaystyle mathbf A above is 3 4 displaystyle 3 times 4 and can be defined as A i j i 1 2 3 j 1 4 displaystyle mathbf A i j i 1 2 3 j 1 dots 4 or A i j 3 4 displaystyle mathbf A i j 3 times 4 Some programming languages utilize doubly subscripted arrays or arrays of arrays to represent an m by n matrix Some programming languages start the numbering of array indexes at zero in which case the entries of an m by n matrix are indexed by 0 i m 1 displaystyle 0 leq i leq m 1 and 0 j n 1 displaystyle 0 leq j leq n 1 This article follows the more common convention in mathematical writing where enumeration starts from 1 The set of all m by n real matrices is often denoted M m n displaystyle mathcal M m n or Mm n R displaystyle mathcal M m times n mathbb R The set of all m by n matrices over another field or over a ring R is similarly denoted M m n R displaystyle mathcal M m n R or Mm n R displaystyle mathcal M m times n R If m n such as in the case of square matrices one does not repeat the dimension M n R displaystyle mathcal M n R or Mn R displaystyle mathcal M n R Often M displaystyle M or Mat displaystyle operatorname Mat is used in place of M displaystyle mathcal M Basic operationsSeveral basic operations can be applied to matrices Some such as transposition and submatrix do not depend on the nature of the entries Others such as matrix addition scalar multiplication matrix multiplication and row operations involve operations on matrix entries and therefore require that matrix entries are numbers or belong to a field or a ring In this section it is supposed that matrix entries belong to a fixed ring which is typically a field of numbers Addition scalar multiplication subtraction and transposition Addition The sum A B of two m n matrices A and B is calculated entrywise A B i j Ai j Bi j 1 i m 1 j n displaystyle mathbf A mathbf B i j mathbf A i j mathbf B i j quad 1 leq i leq m quad 1 leq j leq n For example 131100 005750 1 03 01 51 70 50 0 136850 displaystyle begin bmatrix 1 amp 3 amp 1 1 amp 0 amp 0 end bmatrix begin bmatrix 0 amp 0 amp 5 7 amp 5 amp 0 end bmatrix begin bmatrix 1 0 amp 3 0 amp 1 5 1 7 amp 0 5 amp 0 0 end bmatrix begin bmatrix 1 amp 3 amp 6 8 amp 5 amp 0 end bmatrix Scalar multiplication The product cA of a number c also called a scalar in this context and a matrix A is computed by multiplying every entry of A by c cA i j c Ai j displaystyle c mathbf A i j c cdot mathbf A i j This operation is called scalar multiplication but its result is not named scalar product to avoid confusion since scalar product is often used as a synonym for inner product For example 2 18 34 25 2 12 82 32 42 22 5 216 68 410 displaystyle 2 cdot begin bmatrix 1 amp 8 amp 3 4 amp 2 amp 5 end bmatrix begin bmatrix 2 cdot 1 amp 2 cdot 8 amp 2 cdot 3 2 cdot 4 amp 2 cdot 2 amp 2 cdot 5 end bmatrix begin bmatrix 2 amp 16 amp 6 8 amp 4 amp 10 end bmatrix Subtraction The subtraction of two m n matrices is defined by composing matrix addition with scalar multiplication by 1 A B A 1 B displaystyle mathbf A mathbf B mathbf A 1 cdot mathbf B Transposition The transpose of an m n matrix A is the n m matrix AT also denoted Atr or tA formed by turning rows into columns and vice versa AT i j Aj i displaystyle left mathbf A rm T right i j mathbf A j i For example 1230 67 T 102 637 displaystyle begin bmatrix 1 amp 2 amp 3 0 amp 6 amp 7 end bmatrix mathrm T begin bmatrix 1 amp 0 2 amp 6 3 amp 7 end bmatrix Familiar properties of numbers extend to these operations on matrices for example addition is commutative that is the matrix sum does not depend on the order of the summands A B B A The transpose is compatible with addition and scalar multiplication as expressed by cA T c AT and A B T AT BT Finally AT T A Matrix multiplication Schematic depiction of the matrix product AB of two matrices A and B Multiplication of two matrices is defined if and only if the number of columns of the left matrix is the same as the number of rows of the right matrix If A is an m n matrix and B is an n p matrix then their matrix product AB is the m p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B AB i j ai 1b1 j ai 2b2 j ai nbn j r 1nai rbr j displaystyle mathbf AB i j a i 1 b 1 j a i 2 b 2 j cdots a i n b n j sum r 1 n a i r b r j where 1 i m and 1 j p For example the underlined entry 2340 in the product is calculated as 2 1000 3 100 4 10 2340 2 3 4 100 01000 1100 010 32340 01000 displaystyle begin aligned begin bmatrix underline 2 amp underline 3 amp underline 4 1 amp 0 amp 0 end bmatrix begin bmatrix 0 amp underline 1000 1 amp underline 100 0 amp underline 10 end bmatrix amp begin bmatrix 3 amp underline 2340 0 amp 1000 end bmatrix end aligned Matrix multiplication satisfies the rules AB C A BC associativity and A B C AC BC as well as C A B CA CB left and right distributivity whenever the size of the matrices is such that the various products are defined The product AB may be defined without BA being defined namely if A and B are m n and n k matrices respectively and m k Even if both products are defined they generally need not be equal that is AB BA displaystyle mathbf AB neq mathbf BA In other words matrix multiplication is not commutative in marked contrast to rational real or complex numbers whose product is independent of the order of the factors An example of two matrices not commuting with each other is 1234 0100 0103 displaystyle begin bmatrix 1 amp 2 3 amp 4 end bmatrix begin bmatrix 0 amp 1 0 amp 0 end bmatrix begin bmatrix 0 amp 1 0 amp 3 end bmatrix whereas 0100 1234 3400 displaystyle begin bmatrix 0 amp 1 0 amp 0 end bmatrix begin bmatrix 1 amp 2 3 amp 4 end bmatrix begin bmatrix 3 amp 4 0 amp 0 end bmatrix Besides the ordinary matrix multiplication just described other less frequently used operations on matrices that can be considered forms of multiplication also exist such as the Hadamard product and the Kronecker product They arise in solving matrix equations such as the Sylvester equation Row operations There are three types of row operations row addition that is adding a row to another row multiplication that is multiplying all entries of a row by a non zero constant row switching that is interchanging two rows of a matrix These operations are used in several ways including solving linear equations and finding matrix inverses Submatrix A submatrix of a matrix is a matrix obtained by deleting any collection of rows and or columns For example from the following 3 by 4 matrix we can construct a 2 by 3 submatrix by removing row 3 and column 2 A 123456789101112 134578 displaystyle mathbf A begin bmatrix 1 amp color red 2 amp 3 amp 4 5 amp color red 6 amp 7 amp 8 color red 9 amp color red 10 amp color red 11 amp color red 12 end bmatrix rightarrow begin bmatrix 1 amp 3 amp 4 5 amp 7 amp 8 end bmatrix The minors and cofactors of a matrix are found by computing the determinant of certain submatrices A principal submatrix is a square submatrix obtained by removing certain rows and columns The definition varies from author to author According to some authors a principal submatrix is a submatrix in which the set of row indices that remain is the same as the set of column indices that remain Other authors define a principal submatrix as one in which the first k rows and columns for some number k are the ones that remain this type of submatrix has also been called a leading principal submatrix Linear equationsMatrices can be used to compactly write and work with multiple linear equations that is systems of linear equations For example if A is an m n matrix x designates a column vector that is n 1 matrix of n variables x1 x2 xn and b is an m 1 column vector then the matrix equation Ax b displaystyle mathbf Ax mathbf b is equivalent to the system of linear equations a1 1x1 a1 2x2 a1 nxn b1 am 1x1 am 2x2 am nxn bm displaystyle begin aligned a 1 1 x 1 a 1 2 x 2 amp cdots a 1 n x n b 1 amp vdots a m 1 x 1 a m 2 x 2 amp cdots a m n x n b m end aligned Using matrices this can be solved more compactly than would be possible by writing out all the equations separately If n m and the equations are independent then this can be done by writing x A 1b displaystyle mathbf x mathbf A 1 mathbf b where A 1 is the inverse matrix of A If A has no inverse solutions if any can be found using its generalized inverse Linear transformationsThe vectors represented by a 2 by 2 matrix correspond to the sides of a unit square transformed into a parallelogram Matrices and matrix multiplication reveal their essential features when related to linear transformations also known as linear maps A real m by n matrix A gives rise to a linear transformation Rn Rm displaystyle mathbb R n to mathbb R m mapping each vector x in Rn displaystyle mathbb R n to the matrix product Ax which is a vector in Rm displaystyle mathbb R m Conversely each linear transformation f Rn Rm displaystyle f mathbb R n to mathbb R m arises from a unique m by n matrix A explicitly the i j entry of A is the i th coordinate of f ej where ej 0 0 1 0 0 is the unit vector with 1 in the j th position and 0 elsewhere The matrix A is said to represent the linear map f and A is called the transformation matrix of f For example the 2 2 matrix A acbd displaystyle mathbf A begin bmatrix a amp c b amp d end bmatrix can be viewed as the transform of the unit square into a parallelogram with vertices at 0 0 a b a c b d and c d The parallelogram pictured at the right is obtained by multiplying A with each of the column vectors 00 10 11 displaystyle begin bmatrix 0 0 end bmatrix begin bmatrix 1 0 end bmatrix begin bmatrix 1 1 end bmatrix and 01 displaystyle begin bmatrix 0 1 end bmatrix in turn These vectors define the vertices of the unit square The following table shows several 2 2 real matrices with the associated linear maps of R2 displaystyle mathbb R 2 The blue original is mapped to the green grid and shapes The origin 0 0 is marked with a black point Horizontal shear with m 1 25 Reflection through the vertical axis Squeeze mapping with r 3 2 Scaling by a factor of 3 2 Rotation by p 6 30 11 2501 displaystyle begin bmatrix 1 amp 1 25 0 amp 1 end bmatrix 1001 displaystyle begin bmatrix 1 amp 0 0 amp 1 end bmatrix 320023 displaystyle begin bmatrix frac 3 2 amp 0 0 amp frac 2 3 end bmatrix 320032 displaystyle begin bmatrix frac 3 2 amp 0 0 amp frac 3 2 end bmatrix cos p6 sin p6 sin p6 cos p6 displaystyle begin bmatrix cos left frac pi 6 right amp sin left frac pi 6 right sin left frac pi 6 right amp cos left frac pi 6 right end bmatrix Under the 1 to 1 correspondence between matrices and linear maps matrix multiplication corresponds to composition of maps if a k by m matrix B represents another linear map g Rm Rk displaystyle g mathbb R m to mathbb R k then the composition g f is represented by BA since g f x g f x g Ax B Ax BA x displaystyle g circ f mathbf x g f mathbf x g mathbf Ax mathbf B mathbf Ax mathbf BA mathbf x The last equality follows from the above mentioned associativity of matrix multiplication The rank of a matrix A is the maximum number of linearly independent row vectors of the matrix which is the same as the maximum number of linearly independent column vectors Equivalently it is the dimension of the image of the linear map represented by A The rank nullity theorem states that the dimension of the kernel of a matrix plus the rank equals the number of columns of the matrix Square matrixA square matrix is a matrix with the same number of rows and columns An n by n matrix is known as a square matrix of order n Any two square matrices of the same order can be added and multiplied The entries aii form the main diagonal of a square matrix They lie on the imaginary line that runs from the top left corner to the bottom right corner of the matrix Main types Name Example with n 3Diagonal matrix a11000a22000a33 displaystyle begin bmatrix a 11 amp 0 amp 0 0 amp a 22 amp 0 0 amp 0 amp a 33 end bmatrix Lower triangular matrix a1100a21a220a31a32a33 displaystyle begin bmatrix a 11 amp 0 amp 0 a 21 amp a 22 amp 0 a 31 amp a 32 amp a 33 end bmatrix Upper triangular matrix a11a12a130a22a2300a33 displaystyle begin bmatrix a 11 amp a 12 amp a 13 0 amp a 22 amp a 23 0 amp 0 amp a 33 end bmatrix Diagonal and triangular matrix If all entries of A below the main diagonal are zero A is called an upper triangular matrix Similarly if all entries of A above the main diagonal are zero A is called a lower triangular matrix If all entries outside the main diagonal are zero A is called a diagonal matrix Identity matrix The identity matrix In of size n is the n by n matrix in which all the elements on the main diagonal are equal to 1 and all other elements are equal to 0 for example I1 1 I2 1001 In 10 001 0 00 1 displaystyle begin aligned mathbf I 1 amp begin bmatrix 1 end bmatrix 4pt mathbf I 2 amp begin bmatrix 1 amp 0 0 amp 1 end bmatrix 4pt vdots amp 4pt mathbf I n amp begin bmatrix 1 amp 0 amp cdots amp 0 0 amp 1 amp cdots amp 0 vdots amp vdots amp ddots amp vdots 0 amp 0 amp cdots amp 1 end bmatrix end aligned It is a square matrix of order n and also a special kind of diagonal matrix It is called an identity matrix because multiplication with it leaves a matrix unchanged AIn ImA A displaystyle mathbf AI n mathbf I m mathbf A mathbf A for any m by n matrix A A nonzero scalar multiple of an identity matrix is called a scalar matrix If the matrix entries come from a field the scalar matrices form a group under matrix multiplication that is isomorphic to the multiplicative group of nonzero elements of the field Symmetric or skew symmetric matrix A square matrix A that is equal to its transpose that is A AT is a symmetric matrix If instead A is equal to the negative of its transpose that is A AT then A is a skew symmetric matrix In complex matrices symmetry is often replaced by the concept of Hermitian matrices which satisfies A A where the star or asterisk denotes the conjugate transpose of the matrix that is the transpose of the complex conjugate of A By the spectral theorem real symmetric matrices and complex Hermitian matrices have an eigenbasis that is every vector is expressible as a linear combination of eigenvectors In both cases all eigenvalues are real This theorem can be generalized to infinite dimensional situations related to matrices with infinitely many rows and columns see below Invertible matrix and its inverse A square matrix A is called invertible or non singular if there exists a matrix B such thatAB BA In displaystyle mathbf AB mathbf BA mathbf I n where In is the n n identity matrix with 1s on the main diagonal and 0s elsewhere If B exists it is unique and is called the inverse matrix of A denoted A 1 There are many algorithms for testing whether a square marix is invertible and if it is computing its inverse One of the oldest which is still in common use is Gaussian elimination Definite matrix Positive definite matrix Indefinite matrix 14001 displaystyle begin bmatrix frac 1 4 amp 0 0 amp 1 end bmatrix 1400 14 displaystyle begin bmatrix frac 1 4 amp 0 0 amp frac 1 4 end bmatrix Q x y 14x2 y2 displaystyle Q x y frac 1 4 x 2 y 2 Q x y 14x2 14y2 displaystyle Q x y frac 1 4 x 2 frac 1 4 y 2 Points such that Q x y 1 textstyle Q x y 1 Ellipse Points such that Q x y 1 textstyle Q x y 1 Hyperbola A symmetric real matrix A is called positive definite if the associated quadratic form f x xTAx displaystyle f mathbf x mathbf x rm T mathbf Ax has a positive value for every nonzero vector x in Rn displaystyle mathbb R n If f x only yields negative values then A is negative definite if f does produce both negative and positive values then A is indefinite If the quadratic form f yields only non negative values positive or zero the symmetric matrix is called positive semidefinite or if only non positive values then negative semidefinite hence the matrix is indefinite precisely when it is neither positive semidefinite nor negative semidefinite A symmetric matrix is positive definite if and only if all its eigenvalues are positive that is the matrix is positive semidefinite and it is invertible The table at the right shows two possibilities for 2 by 2 matrices Allowing as input two different vectors instead yields the bilinear form associated to A BA x y xTAy displaystyle B mathbf A mathbf x mathbf y mathbf x rm T mathbf Ay In the case of complex matrices the same terminology and result apply with symmetric matrix quadratic form bilinear form and transpose xT replaced respectively by Hermitian matrix Hermitian form sesquilinear form and conjugate transpose xH Orthogonal matrix An orthogonal matrix is a square matrix with real entries whose columns and rows are orthogonal unit vectors that is orthonormal vectors Equivalently a matrix A is orthogonal if its transpose is equal to its inverse AT A 1 displaystyle mathbf A mathrm T mathbf A 1 which entails ATA AAT In displaystyle mathbf A mathrm T mathbf A mathbf A mathbf A mathrm T mathbf I n where In is the identity matrix of size n An orthogonal matrix A is necessarily invertible with inverse A 1 AT unitary A 1 A and normal A A AA The determinant of any orthogonal matrix is either 1 or 1 A special orthogonal matrix is an orthogonal matrix with determinant 1 As a linear transformation every orthogonal matrix with determinant 1 is a pure rotation without reflection i e the transformation preserves the orientation of the transformed structure while every orthogonal matrix with determinant 1 reverses the orientation i e is a composition of a pure reflection and a possibly null rotation The identity matrices have determinant 1 and are pure rotations by an angle zero The complex analog of an orthogonal matrix is a unitary matrix Main operations Trace The trace tr A of a square matrix A is the sum of its diagonal entries While matrix multiplication is not commutative as mentioned above the trace of the product of two matrices is independent of the order of the factors tr AB tr BA displaystyle operatorname tr mathbf AB operatorname tr mathbf BA This is immediate from the definition of matrix multiplication tr AB i 1m j 1naijbji tr BA displaystyle operatorname tr mathbf AB sum i 1 m sum j 1 n a ij b ji operatorname tr mathbf BA It follows that the trace of the product of more than two matrices is independent of cyclic permutations of the matrices however this does not in general apply for arbitrary permutations for example tr ABC tr BAC in general Also the trace of a matrix is equal to that of its transpose that is tr A tr AT displaystyle operatorname tr mathbf A operatorname tr mathbf A rm T Determinant A linear transformation on R2 displaystyle mathbb R 2 given by the indicated matrix The determinant of this matrix is 1 as the area of the green parallelogram at the right is 1 but the map reverses the orientation since it turns the counterclockwise orientation of the vectors to a clockwise one The determinant of a square matrix A denoted det A or A is a number encoding certain properties of the matrix A matrix is invertible if and only if its determinant is nonzero Its absolute value equals the area in R2 displaystyle mathbb R 2 or volume in R3 displaystyle mathbb R 3 of the image of the unit square or cube while its sign corresponds to the orientation of the corresponding linear map the determinant is positive if and only if the orientation is preserved The determinant of 2 by 2 matrices is given by det abcd ad bc displaystyle det begin bmatrix a amp b c amp d end bmatrix ad bc The determinant of 3 by 3 matrices involves 6 terms rule of Sarrus The more lengthy Leibniz formula generalizes these two formulae to all dimensions The determinant of a product of square matrices equals the product of their determinants det AB det A det B displaystyle det mathbf AB det mathbf A cdot det mathbf B or using alternate notation AB A B displaystyle mathbf AB mathbf A cdot mathbf B Adding a multiple of any row to another row or a multiple of any column to another column does not change the determinant Interchanging two rows or two columns affects the determinant by multiplying it by 1 Using these operations any matrix can be transformed to a lower or upper triangular matrix and for such matrices the determinant equals the product of the entries on the main diagonal this provides a method to calculate the determinant of any matrix Finally the Laplace expansion expresses the determinant in terms of minors that is determinants of smaller matrices This expansion can be used for a recursive definition of determinants taking as starting case the determinant of a 1 by 1 matrix which is its unique entry or even the determinant of a 0 by 0 matrix which is 1 that can be seen to be equivalent to the Leibniz formula Determinants can be used to solve linear systems using Cramer s rule where the division of the determinants of two related square matrices equates to the value of each of the system s variables Eigenvalues and eigenvectors A number l textstyle lambda and a non zero vector v satisfying Av lv displaystyle mathbf A mathbf v lambda mathbf v are called an eigenvalue and an eigenvector of A respectively The number l is an eigenvalue of an n n matrix A if and only if A lIn is not invertible which is equivalent to det A lI 0 displaystyle det mathbf A lambda mathbf I 0 The polynomial pA in an indeterminate X given by evaluation of the determinant det X In A is called the characteristic polynomial of A It is a monic polynomial of degree n Therefore the polynomial equation pA l 0 has at most n different solutions that is eigenvalues of the matrix They may be complex even if the entries of A are real According to the Cayley Hamilton theorem pA A 0 that is the result of substituting the matrix itself into its characteristic polynomial yields the zero matrix Computational aspectsMatrix calculations can be often performed with different techniques Many problems can be solved by both direct algorithms and iterative approaches For example the eigenvectors of a square matrix can be obtained by finding a sequence of vectors xn converging to an eigenvector when n tends to infinity To choose the most appropriate algorithm for each specific problem it is important to determine both the effectiveness and precision of all the available algorithms The domain studying these matters is called numerical linear algebra As with other numerical situations two main aspects are the complexity of algorithms and their numerical stability Determining the complexity of an algorithm means finding upper bounds or estimates of how many elementary operations such as additions and multiplications of scalars are necessary to perform some algorithm for example multiplication of matrices Calculating the matrix product of two n by n matrices using the definition given above needs n3 multiplications since for any of the n2 entries of the product n multiplications are necessary The Strassen algorithm outperforms this naive algorithm it needs only n2 807 multiplications A refined approach also incorporates specific features of the computing devices In many practical situations additional information about the matrices involved is known An important case is sparse matrices that is matrices most of whose entries are zero There are specifically adapted algorithms for say solving linear systems Ax b for sparse matrices A such as the conjugate gradient method An algorithm is roughly speaking numerically stable if little deviations in the input values do not lead to big deviations in the result For example calculating the inverse of a matrix via Laplace expansion adj A denotes the adjugate matrix of A A 1 adj A det A displaystyle mathbf A 1 operatorname adj mathbf A det mathbf A may lead to significant rounding errors if the determinant of the matrix is very small The norm of a matrix can be used to capture the conditioning of linear algebraic problems such as computing a matrix s inverse Most computer programming languages support arrays but are not designed with built in commands for matrices Instead available external libraries provide matrix operations on arrays in nearly all currently used programming languages Matrix manipulation was among the earliest numerical applications of computers The original Dartmouth BASIC had built in commands for matrix arithmetic on arrays from its second edition implementation in 1964 As early as the 1970s some engineering desktop computers such as the HP 9830 had ROM cartridges to add BASIC commands for matrices Some computer languages such as APL were designed to manipulate matrices and various mathematical programs can be used to aid computing with matrices As of 2023 most computers have some form of built in matrix operations at a low level implementing the standard BLAS specification upon which most higher level matrix and linear algebra libraries e g EISPACK LINPACK LAPACK rely While most of these libraries require a professional level of coding LAPACK can be accessed by higher level and user friendly bindings such as NumPy SciPy R GNU Octave MATLAB DecompositionThere are several methods to render matrices into a more easily accessible form They are generally referred to as matrix decomposition or matrix factorization techniques The interest of all these techniques is that they preserve certain properties of the matrices in question such as determinant rank or inverse so that these quantities can be calculated after applying the transformation or that certain matrix operations are algorithmically easier to carry out for some types of matrices The LU decomposition factors matrices as a product of lower L and an upper triangular matrices U Once this decomposition is calculated linear systems can be solved more efficiently by a simple technique called forward and back substitution Likewise inverses of triangular matrices are algorithmically easier to calculate The Gaussian elimination is a similar algorithm it transforms any matrix to row echelon form Both methods proceed by multiplying the matrix by suitable elementary matrices which correspond to permuting rows or columns and adding multiples of one row to another row Singular value decomposition expresses any matrix A as a product UDV where U and V are unitary matrices and D is a diagonal matrix An example of a matrix in Jordan normal form The grey blocks are called Jordan blocks The eigendecomposition or diagonalization expresses A as a product VDV 1 where D is a diagonal matrix and V is a suitable invertible matrix If A can be written in this form it is called diagonalizable More generally and applicable to all matrices the Jordan decomposition transforms a matrix into Jordan normal form that is to say matrices whose only nonzero entries are the eigenvalues l1 to ln of A placed on the main diagonal and possibly entries equal to one directly above the main diagonal as shown at the right Given the eigendecomposition the n th power of A that is n fold iterated matrix multiplication can be calculated via An VDV 1 n VDV 1VDV 1 VDV 1 VDnV 1 displaystyle mathbf A n mathbf VDV 1 n mathbf VDV 1 mathbf VDV 1 ldots mathbf VDV 1 mathbf VD n mathbf V 1 and the power of a diagonal matrix can be calculated by taking the corresponding powers of the diagonal entries which is much easier than doing the exponentiation for A instead This can be used to compute the matrix exponential eA a need frequently arising in solving linear differential equations matrix logarithms and square roots of matrices To avoid numerically ill conditioned situations further algorithms such as the Schur decomposition can be employed Abstract algebraic aspects and generalizationsMatrices can be generalized in different ways Abstract algebra uses matrices with entries in more general fields or even rings while linear algebra codifies properties of matrices in the notion of linear maps It is possible to consider matrices with infinitely many columns and rows Another extension is tensors which can be seen as higher dimensional arrays of numbers as opposed to vectors which can often be realized as sequences of numbers while matrices are rectangular or two dimensional arrays of numbers Matrices subject to certain requirements tend to form groups known as matrix groups Similarly under certain conditions matrices form rings known as matrix rings Though the product of matrices is not in general commutative certain matrices form fields known as matrix fields In general matrices and their multiplication also form a category the category of matrices Matrices with more general entries This article focuses on matrices whose entries are real or complex numbers However matrices can be considered with much more general types of entries than real or complex numbers As a first step of generalization any field that is a set where addition subtraction multiplication and division operations are defined and well behaved may be used instead of R displaystyle mathbb R or C displaystyle mathbb C for example rational numbers or finite fields For example coding theory makes use of matrices over finite fields Wherever eigenvalues are considered as these are roots of a polynomial they may exist only in a larger field than that of the entries of the matrix for instance they may be complex in the case of a matrix with real entries The possibility to reinterpret the entries of a matrix as elements of a larger field for example to view a real matrix as a complex matrix whose entries happen to be all real then allows considering each square matrix to possess a full set of eigenvalues Alternatively one can consider only matrices with entries in an algebraically closed field such as C displaystyle mathbb C from the outset More generally matrices with entries in a ring R are widely used in mathematics Rings are a more general notion than fields in that a division operation need not exist The very same addition and multiplication operations of matrices extend to this setting too The set M n R also denoted Mn R of all square n by n matrices over R is a ring called matrix ring isomorphic to the endomorphism ring of the left R module Rn If the ring R is commutative that is its multiplication is commutative then the ring M n R is also an associative algebra over R The determinant of square matrices over a commutative ring R can still be defined using the Leibniz formula such a matrix is invertible if and only if its determinant is invertible in R generalizing the situation over a field F where every nonzero element is invertible Matrices over superrings are called supermatrices Matrices do not always have all their entries in the same ring or even in any ring at all One special but common case is block matrices which may be considered as matrices whose entries themselves are matrices The entries need not be square matrices and thus need not be members of any ring but their sizes must fulfill certain compatibility conditions Relationship to linear maps Linear maps Rn Rm displaystyle mathbb R n to mathbb R m are equivalent to m by n matrices as described above More generally any linear map f V W between finite dimensional vector spaces can be described by a matrix A aij after choosing bases v1 vn of V and w1 wm of W so n is the dimension of V and m is the dimension of W which is such that f vj i 1mai jwifor j 1 n displaystyle f mathbf v j sum i 1 m a i j mathbf w i qquad mbox for j 1 ldots n In other words column j of A expresses the image of vj in terms of the basis vectors wi of W thus this relation uniquely determines the entries of the matrix A The matrix depends on the choice of the bases different choices of bases give rise to different but equivalent matrices Many of the above concrete notions can be reinterpreted in this light for example the transpose matrix AT describes the transpose of the linear map given by A concerning the dual bases These properties can be restated more naturally the category of matrices with entries in a field k displaystyle k with multiplication as composition is equivalent to the category of finite dimensional vector spaces and linear maps over this field More generally the set of m n matrices can be used to represent the R linear maps between the free modules Rm and Rn for an arbitrary ring R with unity When n m composition of these maps is possible and this gives rise to the matrix ring of n n matrices representing the endomorphism ring of Rn Matrix groups A group is a mathematical structure consisting of a set of objects together with a binary operation that is an operation combining any two objects to a third subject to certain requirements A group in which the objects are matrices and the group operation is matrix multiplication is called a matrix group Since a group of every element must be invertible the most general matrix groups are the groups of all invertible matrices of a given size called the general linear groups Any property of matrices that is preserved under matrix products and inverses can be used to define further matrix groups For example matrices with a given size and with a determinant of 1 form a subgroup of that is a smaller group contained in their general linear group called a special linear group Orthogonal matrices determined by the condition MTM I displaystyle mathbf M rm T mathbf M mathbf I form the orthogonal group Every orthogonal matrix has determinant 1 or 1 Orthogonal matrices with determinant 1 form a subgroup called special orthogonal group Every finite group is isomorphic to a matrix group as one can see by considering the regular representation of the symmetric group General groups can be studied using matrix groups which are comparatively well understood using representation theory Infinite matrices It is also possible to consider matrices with infinitely many rows and or columns even though being infinite objects one cannot write down such matrices explicitly All that matters is that for every element in the set indexing rows and every element in the set indexing columns there is a well defined entry these index sets need not even be subsets of the natural numbers The basic operations of addition subtraction scalar multiplication and transposition can still be defined without problem however matrix multiplication may involve infinite summations to define the resulting entries and these are not defined in general If R is any ring with unity then the ring of endomorphisms of M i IR displaystyle M bigoplus i in I R as a right R module is isomorphic to the ring of column finite matrices CFMI R displaystyle mathrm CFM I R whose entries are indexed by I I displaystyle I times I and whose columns each contain only finitely many nonzero entries The endomorphisms of M considered as a left R module result in an analogous object the row finite matrices RFMI R displaystyle mathrm RFM I R whose rows each only have finitely many nonzero entries If infinite matrices are used to describe linear maps then only those matrices can be used all of whose columns have but a finite number of nonzero entries for the following reason For a matrix A to describe a linear map f V W bases for both spaces must have been chosen recall that by definition this means that every vector in the space can be written uniquely as a finite linear combination of basis vectors so that written as a column vector ve of coefficients only finitely many entries vI are nonzero Now the columns of A describe the images by f of individual basis vectors of V in the basis of W which is only meaningful if these columns have only finitely many nonzero entries There is no restriction on the rows of A however in the product A v there are only finitely many nonzero coefficients of v involved so every one of its entries even if it is given as an infinite sum of products involves only finitely many nonzero terms and is therefore well defined Moreover this amounts to forming a linear combination of the columns of A that effectively involves only finitely many of them whence the result has only finitely many nonzero entries because each of those columns does Products of two matrices of the given type are well defined provided that the column index and row index sets match are of the same type and correspond to the composition of linear maps If R is a normed ring then the condition of row or column finiteness can be relaxed With the norm in place absolutely convergent series can be used instead of finite sums For example the matrices whose column sums are convergent sequences form a ring Analogously the matrices whose row sums are convergent series also form a ring Infinite matrices can also be used to describe operators on Hilbert spaces where convergence and continuity questions arise which again results in certain constraints that must be imposed However the explicit point of view of matrices tends to obfuscate the matter and the abstract and more powerful tools of functional analysis can be used instead Empty matrix An empty matrix is a matrix in which the number of rows or columns or both is zero Empty matrices help to deal with maps involving the zero vector space For example if A is a 3 by 0 matrix and B is a 0 by 3 matrix then AB is the 3 by 3 zero matrix corresponding to the null map from a 3 dimensional space V to itself while BA is a 0 by 0 matrix There is no common notation for empty matrices but most computer algebra systems allow creating and computing with them The determinant of the 0 by 0 matrix is 1 as follows regarding the empty product occurring in the Leibniz formula for the determinant as 1 This value is also consistent with the fact that the identity map from any finite dimensional space to itself has determinant 1 a fact that is often used as a part of the characterization of determinants ApplicationsThere are numerous applications of matrices both in mathematics and other sciences Some of them merely take advantage of the compact representation of a set of numbers in a matrix For example in game theory and economics the payoff matrix encodes the payoff for two players depending on which out of a given finite set of strategies the players choose Text mining and automated thesaurus compilation makes use of document term matrices such as tf idf to track frequencies of certain words in several documents Complex numbers can be represented by particular real 2 by 2 matrices via a ib a bba displaystyle a ib leftrightarrow begin bmatrix a amp b b amp a end bmatrix under which addition and multiplication of complex numbers and matrices correspond to each other For example 2 by 2 rotation matrices represent the multiplication with some complex number of absolute value 1 as above A similar interpretation is possible for quaternions and Clifford algebras in general Early encryption techniques such as the Hill cipher also used matrices However due to the linear nature of matrices these codes are comparatively easy to break Computer graphics uses matrices to represent objects to calculate transformations of objects using affine rotation matrices to accomplish tasks such as projecting a three dimensional object onto a two dimensional screen corresponding to a theoretical camera observation and to apply image convolutions such as sharpening blurring edge detection and more Matrices over a polynomial ring are important in the study of control theory Chemistry makes use of matrices in various ways particularly since the use of quantum theory to discuss molecular bonding and spectroscopy Examples are the overlap matrix and the Fock matrix used in solving the Roothaan equations to obtain the molecular orbitals of the Hartree Fock method Graph theory An undirected graph with adjacency matrix 110101010 displaystyle begin bmatrix 1 amp 1 amp 0 1 amp 0 amp 1 0 amp 1 amp 0 end bmatrix The adjacency matrix of a finite graph is a basic notion of graph theory It records which vertices of the graph are connected by an edge Matrices containing just two different values 1 and 0 meaning for example yes and no respectively are called logical matrices The distance or cost matrix contains information about the distances of the edges These concepts can be applied to websites connected by hyperlinks or cities connected by roads etc in which case unless the connection network is extremely dense the matrices tend to be sparse that is contain few nonzero entries Therefore specifically tailored matrix algorithms can be used in network theory Analysis and geometry The Hessian matrix of a differentiable function f Rn R displaystyle f mathbb R n to mathbb R consists of the second derivatives of ƒ concerning the several coordinate directions that is H f 2f xi xj displaystyle H f left frac partial 2 f partial x i partial x j right At the saddle point x 0 y 0 red of the function f x y x2 y2 the Hessian matrix 200 2 displaystyle begin bmatrix 2 amp 0 0 amp 2 end bmatrix is indefinite It encodes information about the local growth behavior of the function given a critical point x x1 xn that is a point where the first partial derivatives f xi displaystyle partial f partial x i of ƒ vanish the function has a local minimum if the Hessian matrix is positive definite Quadratic programming can be used to find global minima or maxima of quadratic functions closely related to the ones attached to matrices see above Another matrix frequently used in geometrical situations is the Jacobi matrix of a differentiable map f Rn Rm displaystyle f mathbb R n to mathbb R m If f1 fm denote the components of f then the Jacobi matrix is defined as J f fi xj 1 i m 1 j n displaystyle J f left frac partial f i partial x j right 1 leq i leq m 1 leq j leq n If n gt m and if the rank of the Jacobi matrix attains its maximal value m f is locally invertible at that point by the implicit function theorem Partial differential equations can be classified by considering the matrix of coefficients of the highest order differential operators of the equation For elliptic partial differential equations this matrix is positive definite which has a decisive influence on the set of possible solutions of the equation in question The finite element method is an important numerical method to solve partial differential equations widely applied in simulating complex physical systems It attempts to approximate the solution to some equation by piecewise linear functions where the pieces are chosen concerning a sufficiently fine grid which in turn can be recast as a matrix equation Probability theory and statistics Two different Markov chains The chart depicts the number of particles of a total of 1000 in state 2 Both limiting values can be determined from the transition matrices which are given by 0 700 31 displaystyle begin bmatrix 0 7 amp 0 0 3 amp 1 end bmatrix red and 0 70 20 30 8 displaystyle begin bmatrix 0 7 amp 0 2 0 3 amp 0 8 end bmatrix black Stochastic matrices are square matrices whose rows are probability vectors that is whose entries are non negative and sum up to one Stochastic matrices are used to define Markov chains with finitely many states A row of the stochastic matrix gives the probability distribution for the next position of some particle currently in the state that corresponds to the row Properties of the Markov chain like absorbing states that is states that any particle attains eventually can be read off the eigenvectors of the transition matrices Statistics also makes use of matrices in many different forms Descriptive statistics is concerned with describing data sets which can often be represented as data matrices which may then be subjected to dimensionality reduction techniques The covariance matrix encodes the mutual variance of several random variables Another technique using matrices are linear least squares a method that approximates a finite set of pairs x1 y1 x2 y2 xN yN by a linear function yi axi b i 1 N displaystyle y i approx ax i b quad i 1 ldots N which can be formulated in terms of matrices related to the singular value decomposition of matrices Random matrices are matrices whose entries are random numbers subject to suitable probability distributions such as matrix normal distribution Beyond probability theory they are applied in domains ranging from number theory to physics Symmetries and transformations in physics Linear transformations and the associated symmetries play a key role in modern physics For example elementary particles in quantum field theory are classified as representations of the Lorentz group of special relativity and more specifically by their behavior under the spin group Concrete representations involving the Pauli matrices and more general gamma matrices are an integral part of the physical description of fermions which behave as spinors For the three lightest quarks there is a group theoretical representation involving the special unitary group SU 3 for their calculations physicists use a convenient matrix representation known as the Gell Mann matrices which are also used for the SU 3 gauge group that forms the basis of the modern description of strong nuclear interactions quantum chromodynamics The Cabibbo Kobayashi Maskawa matrix in turn expresses the fact that the basic quark states that are important for weak interactions are not the same as but linearly related to the basic quark states that define particles with specific and distinct masses Linear combinations of quantum states The first model of quantum mechanics Heisenberg 1925 represented the theory s operators by infinite dimensional matrices acting on quantum states This is also referred to as matrix mechanics One particular example is the density matrix that characterizes the mixed state of a quantum system as a linear combination of elementary pure eigenstates Another matrix serves as a key tool for describing the scattering experiments that form the cornerstone of experimental particle physics Collision reactions such as occur in particle accelerators where non interacting particles head towards each other and collide in a small interaction zone with a new set of non interacting particles as the result can be described as the scalar product of outgoing particle states and a linear combination of ingoing particle states The linear combination is given by a matrix known as the S matrix which encodes all information about the possible interactions between particles Normal modes A general application of matrices in physics is the description of linearly coupled harmonic systems The equations of motion of such systems can be described in matrix form with a mass matrix multiplying a generalized velocity to give the kinetic term and a force matrix multiplying a displacement vector to characterize the interactions The best way to obtain solutions is to determine the system s eigenvectors its normal modes by diagonalizing the matrix equation Techniques like this are crucial when it comes to the internal dynamics of molecules the internal vibrations of systems consisting of mutually bound component atoms They are also needed for describing mechanical vibrations and oscillations in electrical circuits Geometrical optics Geometrical optics provides further matrix applications In this approximative theory the wave nature of light is neglected The result is a model in which light rays are indeed geometrical rays If the deflection of light rays by optical elements is small the action of a lens or reflective element on a given light ray can be expressed as multiplication of a two component vector with a two by two matrix called ray transfer matrix analysis the vector s components are the light ray s slope and its distance from the optical axis while the matrix encodes the properties of the optical element There are two kinds of matrices viz a refraction matrix describing the refraction at a lens surface and a translation matrix describing the translation of the plane of reference to the next refracting surface where another refraction matrix applies The optical system consisting of a combination of lenses and or reflective elements is simply described by the matrix resulting from the product of the components matrices Electronics Traditional mesh analysis and nodal analysis in electronics lead to a system of linear equations that can be described with a matrix The behavior of many electronic components can be described using matrices Let A be a 2 dimensional vector with the component s input voltage v1 and input current I1 as its elements and let B be a 2 dimensional vector with the component s output voltage v2 and output current I2 as its elements Then the behavior of the electronic component can be described by B H A where H is a 2 x 2 matrix containing one impedance element h12 one admittance element h21 and two dimensionless elements h11 and h22 Calculating a circuit now reduces to multiplying matrices HistoryMatrices have a long history of application in solving linear equations but they were known as arrays until the 1800s The Chinese text The Nine Chapters on the Mathematical Art written in the 10th 2nd century BCE is the first example of the use of array methods to solve simultaneous equations including the concept of determinants In 1545 Italian mathematician Gerolamo Cardano introduced the method to Europe when he published Ars Magna The Japanese mathematician Seki used the same array methods to solve simultaneous equations in 1683 The Dutch mathematicianJan de Witt represented transformations using arrays in his 1659 book Elements of Curves 1659 Between 1700 and 1710 Gottfried Wilhelm Leibniz publicized the use of arrays for recording information or solutions and experimented with over 50 different systems of arrays Cramer presented his rule in 1750 The term matrix Latin for womb dam non human female animal kept for breeding source origin list and register are derived from mater mother was coined by James Joseph Sylvester in 1850 who understood a matrix as an object giving rise to several determinants today called minors that is to say determinants of smaller matrices that derive from the original one by removing columns and rows In an 1851 paper Sylvester explains I have in previous papers defined a Matrix as a rectangular array of terms out of which different systems of determinants may be engendered from the womb of a common parent Arthur Cayley published a treatise on geometric transformations using matrices that were not rotated versions of the coefficients being investigated as had previously been done Instead he defined operations such as addition subtraction multiplication and division as transformations of those matrices and showed the associative and distributive properties held Cayley investigated and demonstrated the non commutative property of matrix multiplication as well as the commutative property of matrix addition Early matrix theory had limited the use of arrays almost exclusively to determinants and Arthur Cayley s abstract matrix operations were revolutionary He was instrumental in proposing a matrix concept independent of equation systems In 1858 Cayley published his A memoir on the theory of matrices in which he proposed and demonstrated the Cayley Hamilton theorem The English mathematician Cuthbert Edmund Cullis was the first to use modern bracket notation for matrices in 1913 and he simultaneously demonstrated the first significant use of the notation A ai j to represent a matrix where ai j refers to the i th row and the j th column The modern study of determinants sprang from several sources Number theoretical problems led Gauss to relate coefficients of quadratic forms that is expressions such as x2 xy 2y2 and linear maps in three dimensions to matrices Eisenstein further developed these notions including the remark that in modern parlance matrix products are non commutative Cauchy was the first to prove general statements about determinants using as the definition of the determinant of a matrix A ai j the following replace the powers ak j by ajk in the polynomial a1a2 an i lt j aj ai displaystyle a 1 a 2 cdots a n prod i lt j a j a i where displaystyle textstyle prod denotes the product of the indicated terms He also showed in 1829 that the eigenvalues of symmetric matrices are real Jacobi studied functional determinants later called Jacobi determinants by Sylvester which can be used to describe geometric transformations at a local or infinitesimal level see above Kronecker s Vorlesungen uber die Theorie der Determinanten and Weierstrass Zur Determinantentheorie both published in 1903 first treated determinants axiomatically as opposed to previous more concrete approaches such as the mentioned formula of Cauchy At that point determinants were firmly established Many theorems were first established for small matrices only for example the Cayley Hamilton theorem was proved for 2 2 matrices by Cayley in the aforementioned memoir and by Hamilton for 4 4 matrices Frobenius working on bilinear forms generalized the theorem to all dimensions 1898 Also at the end of the 19th century the Gauss Jordan elimination generalizing a special case now known as Gauss elimination was established by Wilhelm Jordan In the early 20th century matrices attained a central role in linear algebra partially due to their use in the classification of the hypercomplex number systems of the previous century The inception of matrix mechanics by Heisenberg Born and Jordan led to studying matrices with infinitely many rows and columns Later von Neumann carried out the mathematical formulation of quantum mechanics by further developing functional analytic notions such as linear operators on Hilbert spaces which very roughly speaking correspond to Euclidean space but with an infinity of independent directions Other historical usages of the word matrix in mathematics The word has been used in unusual ways by at least two authors of historical importance Bertrand Russell and Alfred North Whitehead in their Principia Mathematica 1910 1913 use the word matrix in the context of their axiom of reducibility They proposed this axiom as a means to reduce any function to one of lower type successively so that at the bottom 0 order the function is identical to its extension Let us give the name of matrix to any function of however many variables that does not involve any apparent variables Then any possible function other than a matrix derives from a matrix using generalization that is by considering the proposition that the function in question is true with all possible values or with some value of one of the arguments the other argument or arguments remaining undetermined For example a function F x y of two variables x and y can be reduced to a collection of functions of a single variable for example y by considering the function for all possible values of individuals ai substituted in place of a variable x And then the resulting collection of functions of the single variable y that is ai F ai y can be reduced to a matrix of values by considering the function for all possible values of individuals bi substituted in place of variable y bj ai ϕ ai bj displaystyle forall b j forall a i phi a i b j Alfred Tarski in his 1946 Introduction to Logic used the word matrix synonymously with the notion of truth table as used in mathematical logic See alsoMathematics portalList of named matrices Algebraic multiplicity Multiplicity of an eigenvalue as a root of the characteristic polynomial Geometric multiplicity Dimension of the eigenspace associated with an eigenvalue Gram Schmidt process Orthonormalization of a set of vectors Irregular matrix Matrix calculus Specialized notation for multivariable calculus Matrix function Function that maps matrices to matricesPages displaying short descriptions of redirect targets Matrix multiplication algorithm Tensor A generalization of matrices with any number of indices Bohemian matrices Set of matrices Category of matrices The algebraic structure formed by matrices and their multiplicationNotesHowever in the case of adjacency matrices matrix multiplication or a variant of it allows the simultaneous computation of the number of paths between any two vertices and of the shortest length of a path between two vertices Lang 2002 Fraleigh 1976 p 209 Nering 1970 p 37 Weisstein Eric W Matrix mathworld wolfram com Retrieved 2020 08 19 Oualline 2003 Ch 5 Pop Furdui 2017 Square Matrices of Order 2 Springer International Publishing ISBN 978 3 319 54938 5 Brown 1991 Definition I 2 1 addition Definition I 2 4 scalar multiplication and Definition I 2 33 transpose Brown 1991 Theorem I 2 6 How to Multiply Matrices www mathsisfun com Retrieved 2020 08 19 Brown 1991 Definition I 2 20 Brown 1991 Theorem I 2 24 Horn amp Johnson 1985 Ch 4 and 5 Bronson 1970 p 16 Kreyszig 1972 p 220 Protter amp Morrey 1970 p 869 Kreyszig 1972 pp 241 244 Schneider Hans Barker George Phillip 2012 Matrices and Linear Algebra Dover Books on Mathematics Courier Dover Corporation p 251 ISBN 978 0 486 13930 2 Perlis Sam 1991 Theory of Matrices Dover books on advanced mathematics Courier Dover Corporation p 103 ISBN 978 0 486 66810 9 Anton Howard 2010 Elementary Linear Algebra 10th ed John Wiley amp Sons p 414 ISBN 978 0 470 45821 1 Horn Roger A Johnson Charles R 2012 Matrix Analysis 2nd ed Cambridge University Press p 17 ISBN 978 0 521 83940 2 Brown 1991 I 2 21 and 22 Greub 1975 Section III 2 Brown 1991 Definition II 3 3 Greub 1975 Section III 1 Brown 1991 Theorem II 3 22 Horn amp Johnson 1985 Theorem 2 5 6 Brown 1991 Definition I 2 28 Brown 1991 Definition I 5 13 Horn amp Johnson 1985 Chapter 7 Horn amp Johnson 1985 Theorem 7 2 1 Horn amp Johnson 1985 Example 4 0 6 p 169 Matrix mathematics Encyclopedia Britannica Retrieved 2020 08 19 Brown 1991 Definition III 2 1 Brown 1991 Theorem III 2 12 Brown 1991 Corollary III 2 16 Mirsky 1990 Theorem 1 4 1 Brown 1991 Theorem III 3 18 Eigen means own in German and in Dutch Brown 1991 Definition III 4 1 Brown 1991 Definition III 4 9 Brown 1991 Corollary III 4 10 Householder 1975 Ch 7 Bau III amp Trefethen 1997 Golub amp Van Loan 1996 Algorithm 1 3 1 Golub amp Van Loan 1996 Chapters 9 and 10 esp section 10 2 Golub amp Van Loan 1996 Chapter 2 3 Grcar Joseph F 2011 01 01 John von Neumann s Analysis of Gaussian Elimination and the Origins of Modern Numerical Analysis SIAM Review 53 4 607 682 doi 10 1137 080734716 ISSN 0036 1445 For example Mathematica see Wolfram 2003 Ch 3 7 Press Flannery amp Teukolsky et al 1992 Stoer amp Bulirsch 2002 Section 4 1 Horn amp Johnson 1985 Theorem 2 5 4 Horn amp Johnson 1985 Ch 3 1 3 2 Arnold amp Cooke 1992 Sections 14 5 7 8 Bronson 1989 Ch 15 Coburn 1955 Ch V Lang 2002 Chapter XIII Lang 2002 XVII 1 p 643 Lang 2002 Proposition XIII 4 16 Reichl 2004 Section L 2 Greub 1975 Section III 3 Greub 1975 Section III 3 13 Perrone 2024 pp 99 100 See any standard reference in a group Additionally the group must be closed in the general linear group Baker 2003 Def 1 30 Baker 2003 Theorem 1 2 Artin 1991 Chapter 4 5 Rowen 2008 Example 19 2 p 198 See any reference in representation theory or group representation See the item Matrix in Ito ed 1987 Not much of matrix theory carries over to infinite dimensional spaces and what does is not so useful but it sometimes helps Halmos 1982 p 23 Chapter 5 Empty Matrix A matrix is empty if either its row or column dimension is zero Glossary Archived 2009 04 29 at the Wayback Machine O Matrix v6 User Guide A matrix having at least one dimension equal to zero is called an empty matrix MATLAB Data Structures Archived 2009 12 28 at the Wayback Machine Fudenberg amp Tirole 1983 Section 1 1 1 Manning 1999 Section 15 3 4 Ward 1997 Ch 2 8 Stinson 2005 Ch 1 1 5 and 1 2 4 Association for Computing Machinery 1979 Ch 7 Godsil amp Royle 2004 Ch 8 1 Punnen 2002 Lang 1987a Ch XVI 6 Nocedal 2006 Ch 16 Lang 1987a Ch XVI 1 Lang 1987a Ch XVI 5 For a more advanced and more general statement see Lang 1969 Ch VI 2 Gilbarg amp Trudinger 2001 Solin 2005 Ch 2 5 See also stiffness method Latouche amp Ramaswami 1999 Mehata amp Srinivasan 1978 Ch 2 8 Healy Michael 1986 Matrices for Statistics Oxford University Press ISBN 978 0 19 850702 4 Krzanowski 1988 Ch 2 2 p 60 Krzanowski 1988 Ch 4 1 Conrey 2007 Zabrodin Brezin amp Kazakov et al 2006 Itzykson amp Zuber 1980 Ch 2 see Burgess amp Moore 2007 section 1 6 3 SU 3 section 2 4 3 2 Kobayashi Maskawa matrix Schiff 1968 Ch 6 Bohm 2001 sections II 4 and II 8 Weinberg 1995 Ch 3 Wherrett 1987 part II Riley Hobson amp Bence 1997 7 17 Guenther 1990 Ch 5 Shen Crossley amp Lun 1999 cited by Bretscher 2005 p 1 Discrete Mathematics 4th Ed Dossey Otto Spense Vanden Eynden Published by Addison Wesley October 10 2001 ISBN 978 0 321 07912 1 p 564 565 Needham Joseph Wang Ling 1959 Science and Civilisation in China Vol III Cambridge Cambridge University Press p 117 ISBN 978 0 521 05801 8 Discrete Mathematics 4th Ed Dossey Otto Spense Vanden Eynden Published by Addison Wesley October 10 2001 ISBN 978 0 321 07912 1 p 564 Merriam Webster dictionary Merriam Webster retrieved April 20 2009 Although many sources state that J J Sylvester coined the mathematical term matrix in 1848 Sylvester published nothing in 1848 For proof that Sylvester published nothing in 1848 see J J Sylvester with H F Baker ed The Collected Mathematical Papers of James Joseph Sylvester Cambridge England Cambridge University Press 1904 vol 1 His earliest use of the term matrix occurs in 1850 in J J Sylvester 1850 Additions to the articles in the September number of this journal On a new class of theorems and on Pascal s theorem The London Edinburgh and Dublin Philosophical Magazine and Journal of Science 37 363 370 From page 369 For this purpose we must commence not with a square but with an oblong arrangement of terms consisting suppose of m lines and n columns This does not in itself represent a determinant but is as it were a Matrix out of which we may form various systems of determinants The Collected Mathematical Papers of James Joseph Sylvester 1837 1853 Paper 37 p 247 Phil Trans 1858 vol 148 pp 17 37 Math Papers II 475 496 Dieudonne ed 1978 Vol 1 Ch III p 96 Knobloch 1994 Hawkins 1975 Kronecker 1897 Weierstrass 1915 pp 271 286 Bocher 2004 Mehra amp Rechenberg 1987 Whitehead Alfred North and Russell Bertrand 1913 Principia Mathematica to 56 Cambridge at the University Press Cambridge UK republished 1962 cf page 162ff Tarski Alfred 1946 Introduction to Logic and the Methodology of Deductive Sciences Dover Publications Inc New York NY ISBN 0 486 28462 X ReferencesAnton Howard 1987 Elementary Linear Algebra 5th ed New York Wiley ISBN 0 471 84819 0 Arnold Vladimir I 1992 Ordinary differential equations Berlin DE New York NY Springer Verlag ISBN 978 3 540 54813 3 Artin Michael 1991 Algebra Prentice Hall ISBN 978 0 89871 510 1 Association for Computing Machinery 1979 Computer Graphics Tata McGraw Hill ISBN 978 0 07 059376 3 Baker Andrew J 2003 Matrix Groups An Introduction to Lie Group Theory Berlin DE New York NY Springer Verlag ISBN 978 1 85233 470 3 Bau III David Trefethen Lloyd N 1997 Numerical linear algebra Philadelphia PA Society for Industrial and Applied Mathematics ISBN 978 0 89871 361 9 Beauregard Raymond A Fraleigh John B 1973 A First Course In Linear Algebra with Optional Introduction to Groups Rings and Fields Boston Houghton Mifflin Co ISBN 0 395 14017 X Bretscher Otto 2005 Linear Algebra with Applications 3rd ed Prentice Hall Bronson Richard 1970 Matrix Methods An Introduction New York Academic Press LCCN 70097490 Bronson Richard 1989 Schaum s outline of theory and problems of matrix operations New York McGraw Hill ISBN 978 0 07 007978 6 Brown William C 1991 Matrices and vector spaces New York NY Marcel Dekker ISBN 978 0 8247 8419 5 Coburn Nathaniel 1955 Vector and tensor analysis New York NY Macmillan OCLC 1029828 Conrey J Brian 2007 Ranks of elliptic curves and random matrix theory Cambridge University Press ISBN 978 0 521 69964 8 Fraleigh John B 1976 A First Course In Abstract Algebra 2nd ed Reading Addison Wesley ISBN 0 201 01984 1 Fudenberg Drew Tirole Jean 1983 Game Theory MIT Press Gilbarg David Trudinger Neil S 2001 Elliptic partial differential equations of second order 2nd ed Berlin DE New York NY Springer Verlag ISBN 978 3 540 41160 4 Godsil Chris Royle Gordon 2004 Algebraic Graph Theory Graduate Texts in Mathematics vol 207 Berlin DE New York NY Springer Verlag ISBN 978 0 387 95220 8 Golub Gene H Van Loan Charles F 1996 Matrix Computations 3rd ed Johns Hopkins ISBN 978 0 8018 5414 9 Greub Werner Hildbert 1975 Linear algebra Graduate Texts in Mathematics Berlin DE New York NY Springer Verlag ISBN 978 0 387 90110 7 Halmos Paul Richard 1982 A Hilbert space problem book Graduate Texts in Mathematics vol 19 2nd ed Berlin DE New York NY Springer Verlag ISBN 978 0 387 90685 0 MR 0675952 Horn Roger A Johnson Charles R 1985 Matrix Analysis Cambridge University Press ISBN 978 0 521 38632 6 Householder Alston S 1975 The theory of matrices in numerical analysis New York NY Dover Publications MR 0378371 Kreyszig Erwin 1972 Advanced Engineering Mathematics 3rd ed New York Wiley ISBN 0 471 50728 8 Krzanowski Wojtek J 1988 Principles of multivariate analysis Oxford Statistical Science Series vol 3 The Clarendon Press Oxford University Press ISBN 978 0 19 852211 9 MR 0969370 Ito Kiyosi ed 1987 Encyclopedic dictionary of mathematics Vol I IV 2nd ed MIT Press ISBN 978 0 262 09026 1 MR 0901762 Lang Serge 1969 Analysis II Addison Wesley Lang Serge 1987a Calculus of several variables 3rd ed Berlin DE New York NY Springer Verlag ISBN 978 0 387 96405 8 Lang Serge 1987b Linear algebra Berlin DE New York NY Springer Verlag ISBN 978 0 387 96412 6 Lang Serge 2002 Algebra Graduate Texts in Mathematics vol 211 Revised third ed New York Springer Verlag ISBN 978 0 387 95385 4 MR 1878556 Latouche Guy Ramaswami Vaidyanathan 1999 Introduction to matrix analytic methods in stochastic modeling 1st ed Philadelphia PA Society for Industrial and Applied Mathematics ISBN 978 0 89871 425 8 Manning Christopher D Schutze Hinrich 1999 Foundations of statistical natural language processing MIT Press ISBN 978 0 262 13360 9 Mehata K M Srinivasan S K 1978 Stochastic processes New York NY McGraw Hill ISBN 978 0 07 096612 3 Mirsky Leonid 1990 An Introduction to Linear Algebra Courier Dover Publications ISBN 978 0 486 66434 7 Nering Evar D 1970 Linear Algebra and Matrix Theory 2nd ed New York Wiley LCCN 76 91646 Nocedal Jorge Wright Stephen J 2006 Numerical Optimization 2nd ed Berlin DE New York NY Springer Verlag p 449 ISBN 978 0 387 30303 1 Oualline Steve 2003 Practical C programming O Reilly ISBN 978 0 596 00419 4 Perrone Paolo 2024 Starting Category Theory World Scientific doi 10 1142 9789811286018 0005 ISBN 978 981 12 8600 1 Press William H Flannery Brian P Teukolsky Saul A Vetterling William T 1992 LU Decomposition and Its Applications PDF Numerical Recipes in FORTRAN The Art of Scientific Computing 2nd ed Cambridge University Press pp 34 42 archived from the original on 2009 09 06 Protter Murray H Morrey Charles B Jr 1970 College Calculus with Analytic Geometry 2nd ed Reading Addison Wesley LCCN 76087042 Punnen Abraham P Gutin Gregory 2002 The traveling salesman problem and its variations Boston MA Kluwer Academic Publishers ISBN 978 1 4020 0664 7 Reichl Linda E 2004 The transition to chaos conservative classical systems and quantum manifestations Berlin DE