Matrix (mathematics)

In mathematics, a matrix (plural matrices) is a rectangular array or table of numbers, symbols, or expressions, arranged in rows and columns, which is used to represent a mathematical object of a property of such an object.

For example,
[ 1 9 − 13 20 5 − 6 ] {\displaystyle {\begin{bmatrix}1&9&-13\\20&5&-6\end{bmatrix}}} [12095136]
is a matrix with two rows and three columns. This is often referred to as a “two by three matrix”, a “2*3-matrix”, or a matrix of dimension 2 ∗ 3 2*3 23.

Without further specifications, matrices represent linear maps, and allow explicit computations in linear algebra. Therefore, the study of matrices is a large part of linear algebra, and most properties and operations of abstract linear algebra can be expressed in terms of matrices. For example, matrix multiplication represents composition of linear maps.

Not all matrices are related to linear algebra. This is, in particular, the case in graph theory, of incidence matrices, and adjacency matrices. 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 to 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 involves often to compute with matrices of huge dimension. Matrices are used in most areas of mathematics and most scientific fields, either directly, or through their use in geometry and numerical analysis.

1 Definition


A matrix is a rectangular array of numbers (or other mathematical objects), called then entries of the matrix. Matrices are subject to standard operation such as addition and multiplication. Most commonly, a matrix over a field F F F is a rectangular array of elements of F F 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.3 0.6 20.4 5.5 9.7 − 6.2 ] . {\displaystyle \mathbf {A} ={\begin{bmatrix}-1.3&0.6\\20.4&5.5\\9.7&-6.2\end{bmatrix}}.} A= 1.320.49.70.65.56.2 .
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.

1.1 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 a matrix (in the usual sense) can have as long as they are positive integers. A matrix with m m m rows and n n n columns is called m ∗ n m * n mn matrix, or m-by-n matrix, while m m m and n n n are called its dimensions. For example, the matrix A A A above is a 3 ∗ 2 3*2 32 matrix.

Matrices with a single row are called row vectors, and those with a single column are called column vectors. 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
NameSizeExampleDescription
Row vector1 * n [ 3 7 2 ] {\begin{bmatrix}3&7&2\end{bmatrix}} [372]A matrix with one row, sometimes used to represent a vector
Column vectorn * 1 [ 4 1 8 ] {\begin{bmatrix}4\\1\\8\end{bmatrix}} 418 A matrix with one column, sometimes used to represent a vector
Square matrixn * n [ 9 13 5 1 11 7 2 6 3 ] {\displaystyle {\begin{bmatrix}9&13&5\\1&11&7\\2&6&3\end{bmatrix}}} 91213116573 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.

2 Notation


Matrices are commonly written in box brackets or parentheses:
A = [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ] = ( a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ) = ( a i j ) ∈ R m × n . {\displaystyle \mathbf {A} ={\begin{bmatrix}a_{11}&a_{12}&\cdots &a_{1n}\\a_{21}&a_{22}&\cdots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\cdots &a_{mn}\end{bmatrix}}={\begin{pmatrix}a_{11}&a_{12}&\cdots &a_{1n}\\a_{21}&a_{22}&\cdots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\cdots &a_{mn}\end{pmatrix}}=\left(a_{ij}\right)\in \mathbb {R} ^{m\times n}.} A= a11a21am1a12a22am2a1na2namn = a11a21am1a12a22am2a1na2namn =(aij)Rm×n.

The specifics of symbolic matrix notation vary widely, with some prevailing trends. Matrices are usually symbolized using upper-case letters (such as A A A in the examples above), while the corresponding lower-case letters, with two subscript indices (e.g., a 11 ,   o r   a 1 , 1 a_{11}, \ or \ a_{1,1} a11, or a1,1), represent the entries. In addition to using upper-case letters to symbolize matrices, many authors use a special typographical style, commonly boldface upright (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 case of A ‾ ‾ {\displaystyle {\underline {\underline {A}}}} A).

The entry in the i i i-th row and j j j-th column of a matrix A A A is sometimes referred to as the ( i , j ) (i, j) (i,j)th entry of the matrix, and most commonly denoted as a i , j a_{i,j} ai,j or a i j a_{ij} aij. Alternative notations for that entry are A [ i , j ] A[i,j] A[i,j] or A i , j A_{i,j} Ai,j. For example, the (1,3) entry of the following matrix A A A is 5 5 5 (also denoted a 1 , 3 a_{1,3} a1,3 or A 1 , 3 A_{1,3} A1,3):
A = [ 4 − 7 5 0 − 2 0 11 8 19 1 − 3 12 ] {\displaystyle \mathbf {A} ={\begin{bmatrix}4&-7&\color {red}{5}&0\\-2&0&11&8\\19&1&-3&12\end{bmatrix}}} A= 421970151130812

Sometimes, the entries of a matrix can be defined by a formula such as a i , j = f ( i , j ) a_{i,j} = f(i,j) ai,j=f(i,j). For example, each of the entries of the following matrix A A A is determined by the fomula a i , j = i − j a_{i,j} = i - j ai,j=ij.
A = [ 0 − 1 − 2 − 3 1 0 − 1 − 2 2 1 0 − 1 ] {\displaystyle \mathbf {A} ={\begin{bmatrix}0&-1&-2&-3\\1&0&-1&-2\\2&1&0&-1\end{bmatrix}}} A= 012101210321

In this case, the matrix itself is sometime defined by that formula, within square bracket or double parentheses. For example, the matrix above is defined as A = [ i − j ] A = [i - j] A=[ij]. If matrix size is m ∗ n m * n mn, the above-mentioned formula f ( i , j ) f(i, j) f(i,j) is valid for any i = 1 , . . . , m i = 1,..., m i=1,...,m and any j = 1 , . . . , n j = 1, ..., n j=1,...,n. This can be either specified separately, or indicated using m ∗ n m * n mn as a subscript. For instance, the matrix A A A above is 3 ∗ 4 3 * 4 34, and can be defined as A = [ i − j ] 3 ∗ 4 A = [i - j]_{3 * 4} A=[ij]34.

Some programming languages utilize doubly subscripted arrays (or arrays of arrays) to represent an m ∗ n m * n mn matrix. Some programming languages start the numbering of array indexes at zero, in which case then entries of an m-by-n matrix are indexed by 0 ≤ i ≤ m − 1 0 \le i \le m-1 0im1 and 0 ≤ j ≤ n − 1 0 \le j \le n-1 0jn1. This article follows the more common convention in mathematical writing where enumeration starts from 1 1 1.

An asterisk is occasionally used to refer to whole rows or columns in a matrix. For example, a i , ∗ a_{i,*} ai, refers to the i t h i^{th} ith row of A A A, and a ∗ , j a_{*,j} a,j refers to the j t h j^{th} jth column of A A A.

The set of all m-by-n real matrices is often denoted M ( m , n ) , {\displaystyle {\mathcal {M}}(m,n),} M(m,n), or M m × n R . {\displaystyle {\mathcal {M}}_{m\times n}\mathbb {R} .} Mm×nR. The set of all m-by-n matrices over another field or over a ring R R R, is similarly denoted M ( m , n , R ) , {\displaystyle {\mathcal {M}}(m,n,R),} M(m,n,R), or M m × n ( R ) . {\displaystyle {\mathcal {M}}_{m\times n}(R).} Mm×n(R). If m = n m = n m=n, that is, in the case of square matrices, one does not repeat the dimension: M ( n , R ) ,   o r   M n ( R ) . {\displaystyle {\mathcal {M}}(n,R),} \ or \ {\displaystyle {\mathcal {M}}_{n}(R).} M(n,R), or Mn(R). Often, M M M is used in place of M \mathcal M M

3 Basic operations


There are a number of basic operations that can be applied to modify matrices, called matrix addition, scalar multiplication, transposition, matrix multiplication, row operations, and submatrix.

3.1 Addition, scalar multiplication, and transposition


Main articles: Matrix addition, Scalar multiplication, and Transpose

Operations performed on matrices
OperationDefinitionExample
AdditionThe sum A + B A + B A+B of two m-by-n matrices A , B A, B A,B is calculated entrywise: ( A + B ) i , j = A i , j + B i , j , w h e r e   1 ≤ i ≤ m   a n d   b 1 ≤ j ≤ n . (A + B)_{i,j} = A_{i,j} + B_{i,j}, where \ 1 ≤ i ≤ m \ and \ b1 ≤ j ≤ n. (A+B)i,j=Ai,j+Bi,j,where 1im and b1jn. [ 1 3 1 1 0 0 ] + [ 0 0 5 7 5 0 ] = [ 1 + 0 3 + 0 1 + 5 1 + 7 0 + 5 0 + 0 ] = [ 1 3 6 8 5 0 ] {\displaystyle {\begin{bmatrix}1&3&1\\1&0&0\end{bmatrix}}+{\begin{bmatrix}0&0&5\\7&5&0\end{bmatrix}}={\begin{bmatrix}1+0&3+0&1+5\\1+7&0+5&0+0\end{bmatrix}}={\begin{bmatrix}1&3&6\\8&5&0\end{bmatrix}}} [113010]+[070550]=[1+01+73+00+51+50+0]=[183560]
Scalar multiplicationThe product cA of a number c c c (also called a scalar in the parlance of (abstract algebra) and a matrix A A A is computed by multiplying every entry of A A A by c c c: ( c A ) i , j = c ⋅ A i , j (cA)_{i,j} = c \cdot A_{i,j} (cA)i,j=cAi,j. This operation is called scalar multiplication, but its result is not named “scalar product” to avoid confusion, since “scalar product” is sometimes used as a synonym for “inner product”. 2 ⋅ [ 1 8 − 3 4 − 2 5 ] = [ 2 ⋅ 1 2 ⋅ 8 2 ⋅ − 3 2 ⋅ 4 2 ⋅ − 2 2 ⋅ 5 ] = [ 2 16 − 6 8 − 4 10 ] {\displaystyle 2\cdot {\begin{bmatrix}1&8&-3\\4&-2&5\end{bmatrix}}={\begin{bmatrix}2\cdot 1&2\cdot 8&2\cdot -3\\2\cdot 4&2\cdot -2&2\cdot 5\end{bmatrix}}={\begin{bmatrix}2&16&-6\\8&-4&10\end{bmatrix}}} 2[148235]=[212428222325]=[28164610]
TranspositionThe transpose of an m-by-n matrix A A A is the n-by-m matrix A T A^T AT (also denoted A t r A^{tr} Atr or t A {}^tA tA) formed by turning rows into columns and vice versa: ( A T ) i , j = A j , i (A^T)_{i,j} = A_{j,i} (AT)i,j=Aj,i [ 1 2 3 0 − 6 7 ] T = [ 1 0 2 − 6 3 7 ] {\displaystyle {\begin{bmatrix}1&2&3\\0&-6&7\end{bmatrix}}^{\mathrm {T} }={\begin{bmatrix}1&0\\2&-6\\3&7\end{bmatrix}}} [102637]T= 123067

Familiar properties of numbers extend to these operations of matrices: for example, addition is commutative, that is, the matrix sum does not depend on the order of the summands: A + B = B + A A + B = B + A A+B=B+A. The transpose is compatible with addition and scalar multiplication, as expressed by ( c A ) T = c ( A T ) (cA)^T = c(A^T) (cA)T=c(AT) and ( A + B ) T = A T + B T (A + B)^T = A^T + B^T (A+B)T=AT+BT. Finally, ( A T ) T = A (A^T)^T = A (AT)T=A.

3.2 Matrix multiplication


Main article: 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 A A is an m-by-n matrix and B B B is an n-by-p matrix, then their matrix product A B AB AB is the m-by-p matrix whose entries are given by dot product of the corresponding row of A A A and the corresponding columns of B B B:
[ A B ] i , j = a i , 1 b 1 , j + a i , 2 b 2 , j + ⋯ + a i , n b n , j = ∑ r = 1 n a i , r b r , 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},} [AB]i,j=ai,1b1,j+ai,2b2,j++ai,nbn,j=r=1nai,rbr,j,

where 1 ≤ i ≤ m 1 ≤ i ≤ m 1im and 1 ≤ j ≤ p 1 ≤ j ≤ p 1jp. For example, the underlined entry 2340 in the product is calculated as ( 2 × 1000 ) + ( 3 × 100 ) + ( 4 × 10 ) = 2340 : (2 × 1000) + (3 × 100) + (4 × 10) = 2340: (2×1000)+(3×100)+(4×10)=2340:
[ 2 ‾ 3 ‾ 4 ‾ 1 0 0 ] [ 0 1000 ‾ 1 100 ‾ 0 10 ‾ ] = [ 3 2340 ‾ 0 1000 ] . {\begin{aligned}{\begin{bmatrix}{\underline {2}}&{\underline {3}}&{\underline {4}}\\1&0&0\\\end{bmatrix}}{\begin{bmatrix}0&{\underline {1000}}\\1&{\underline {100}}\\0&{\underline {10}}\\\end{bmatrix}}&={\begin{bmatrix}3&{\underline {2340}}\\0&1000\\\end{bmatrix}}.\end{aligned}} [213040] 010100010010 =[3023401000].

Matrix multiplication satisfies the rules ( A B ) C = A ( B C ) (AB)C = A(BC) (AB)C=A(BC) (associativity), and ( A + B ) C = A C + B C (A + B)C = AC + BC (A+B)C=AC+BC as well as C ( A + B ) = C A + C B C(A + B) = CA + CB 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 A B AB AB may be defined without B A BA BA being defined, namely if A , B A, B A,B are m-by-n and n-by-k matrices, respectively, and m ≠ k m \neq k m=k. Even if both products are defined, they generally need not be equal, that is: A B ≠ B A AB \neq BA AB=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:
[ 1 2 3 4 ] [ 0 1 0 0 ] = [ 0 1 0 3 ] , {\begin{bmatrix}1&2\\3&4\\\end{bmatrix}}{\begin{bmatrix}0&1\\0&0\\\end{bmatrix}}={\begin{bmatrix}0&1\\0&3\\\end{bmatrix}}, [1324][0010]=[0013],
whereas
[ 0 1 0 0 ] [ 1 2 3 4 ] = [ 3 4 0 0 ] . {\displaystyle {\begin{bmatrix}0&1\\0&0\\\end{bmatrix}}{\begin{bmatrix}1&2\\3&4\\\end{bmatrix}}={\begin{bmatrix}3&4\\0&0\\\end{bmatrix}}.} [0010][1324]=[3040].

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.

3.3 Row operations


Main article: 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.

3.4 Submatrix


A submatrix of a matrix is 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 = [ 1 2 3 4 5 6 7 8 9 10 11 12 ] → [ 1 3 4 5 7 8 ] . {\displaystyle \mathbf {A} ={\begin{bmatrix}1&\color {red}{2}&3&4\\5&\color {red}{6}&7&8\\\color {red}{9}&\color {red}{10}&\color {red}{11}&\color {red}{12}\end{bmatrix}}\rightarrow {\begin{bmatrix}1&3&4\\5&7&8\end{bmatrix}}.} A= 159261037114812 [153748].

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.[19][20] Other authors define a principal submatrix as one in which the first k k k rows and columns, for some number k k k, are the ones that remain;[21] this type of submatrix has also been called a leading principal submatrix.[22]

4 Linear equations


Main articles: Linear equation and System of 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 A A is an m-by-n matrix, x x x designates a column vector (that is, n×1-matrix) of n n n variables x 1 , x 2 , . . . , x n x1, x2, ..., xn x1,x2,...,xn, and b b b is an m×1-column vector, then the matrix equation
A x = b \mathbf {Ax} =\mathbf {b} Ax=b
is equivalent to the system of linear equations[23]
a 1 , 1 x 1 + a 1 , 2 x 2 + ⋯ + a 1 , n x n = b 1    ⋮ a m , 1 x 1 + a m , 2 x 2 + ⋯ + a m , n x n = b m a 1 , 1 x 1 + a 1 , 2 x 2 + ⋯ + a 1 , n x n = b 1    ⋮ a m , 1 x 1 + a m , 2 x 2 + ⋯ + a m , n x n = b m {\displaystyle {\begin{aligned}a_{1,1}x_{1}+a_{1,2}x_{2}+&\cdots +a_{1,n}x_{n}=b_{1}\\&\ \ \vdots \\a_{m,1}x_{1}+a_{m,2}x_{2}+&\cdots +a_{m,n}x_{n}=b_{m}\end{aligned}}}{\displaystyle {\begin{aligned}a_{1,1}x_{1}+a_{1,2}x_{2}+&\cdots +a_{1,n}x_{n}=b_{1}\\&\ \ \vdots \\a_{m,1}x_{1}+a_{m,2}x_{2}+&\cdots +a_{m,n}x_{n}=b_{m}\end{aligned}}} a1,1x1+a1,2x2+am,1x1+am,2x2++a1,nxn=b1  +am,nxn=bma1,1x1+a1,2x2+am,1x1+am,2x2++a1,nxn=b1  +am,nxn=bm

Using matrices, this can be solved more compactly than would be possible by writing out all the equations separately. If n = m n = m n=m and the equations are independent, then this can be done by writing
x = A − 1 b {\displaystyle \mathbf {x} =\mathbf {A} ^{-1}\mathbf {b} } x=A1b
where A − 1 A^{−1} A1 is the inverse matrix of A A A. If A A A has no inverse, solutions—if any—can be found using its generalized inverse.

5 Linear transformations


Main articles: Linear transformation and Transformation matrix

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 A A gives rise to a linear transformation R n → R m R^n → R^m RnRm mapping each vector x x x in R n R^n Rn to the (matrix) product A x Ax Ax, which is a vector in R m R^m Rm. Conversely, each linear transformation f : R n → R m f: R^n → R^m f:RnRm arises from a unique m-by-n matrix A A A: explicitly, the ( i , j ) (i, j) (i,j)-entry of A A A is the i i ith coordinate of f ( e j ) f(e_j) f(ej), where e j = ( 0 , . . . , 0 , 1 , 0 , . . . , 0 ) e_j = (0,...,0,1,0,...,0) ej=(0,...,0,1,0,...,0) is the unit vector with 1 1 1 in the j j jth position and 0 0 0 elsewhere. The matrix A A A is said to represent the linear map f f f, and A A A is called the transformation matrix of f f f.

For example, the 2×2 matrix
A = [ a c b d ] {\displaystyle \mathbf {A} ={\begin{bmatrix}a&c\\b&d\end{bmatrix}}} A=[abcd]
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 [ 0 0 ] , [ 1 0 ] , [ 1 1 ] , [ 1 0 ] {\displaystyle {\begin{bmatrix}0\\0\end{bmatrix}},{\begin{bmatrix}1\\0\end{bmatrix}},{\begin{bmatrix}1\\1\end{bmatrix}}}{\displaystyle ,{\begin{bmatrix}1\\0\end{bmatrix}}} [00],[10],[11],[10] in turn. These vectors define the vertices of the unit square.

在这里插入图片描述

The vectors represented by a 2-by-2 matrix correspond to the sides of a unit square transformed into a parallelogram.

The following table shows several 2×2 real matrices with the associated linear maps of R2. The b l u e \blue{blue} blue original is mapped to the g r e e n \green{ green} green grid and shapes. The origin (0,0) is marked with a black point.

Horizontal shear with m = 1.25.Reflection through the vertical axisSqueeze mapping with r = 3/2Scaling by a factor of 3/2Rotation by π/6 = 30°
[ 1 1.25 0 1 ] {\displaystyle {\begin{bmatrix}1&1.25\\0&1\end{bmatrix}}} [101.251] [ − 1 0 0 1 ] {\displaystyle {\begin{bmatrix}-1&0\\0&1\end{bmatrix}}} [1001] [ 3 2 0 0 2 3 ] {\displaystyle {\begin{bmatrix}{\frac {3}{2}}&0\\0&{\frac {2}{3}}\end{bmatrix}}} [230032] [ 3 2 0 0 3 2 ] {\displaystyle {\begin{bmatrix}{\frac {3}{2}}&0\\0&{\frac {3}{2}}\end{bmatrix}}} [230023] [ cos ⁡ ( π 6 ) − sin ⁡ ( π 6 ) sin ⁡ ( π 6 ) cos ⁡ ( π 6 ) ] {\displaystyle {\begin{bmatrix}\cos \left({\frac {\pi }{6}}\right)&-\sin \left({\frac {\pi }{6}}\right)\\\sin \left({\frac {\pi }{6}}\right)&\cos \left({\frac {\pi }{6}}\right)\end{bmatrix}}} [cos(6π)sin(6π)sin(6π)cos(6π)]
在这里插入图片描述在这里插入图片描述在这里插入图片描述ddd

Under the 1-to-1 correspondence between matrices and linear maps, matrix multiplication corresponds to composition of maps:[24] if a k-by-m matrix B B B represents another linear map g : R m → R k g: R^m → R^k g:RmRk, then the composition g ∘ f g ∘ f gf is represented by B A BA BA since
( g ∘ f ) ( x ) = g ( f ( x ) ) = g ( A x ) = B ( A x ) = ( B A ) x . (g ∘ f)(x) = g(f(x)) = g(Ax) = B(Ax) = (BA)x. (gf)(x)=g(f(x))=g(Ax)=B(Ax)=(BA)x.
The last equality follows from the above-mentioned associativity of matrix multiplication.

The rank of a matrix A A 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 A 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.

6 Square matrix


Main article: Square matrix

A square matrix is a matrix with the same number of rows and columns.[5] An n-by-n matrix is known as a square matrix of order n n n. Any two square matrices of the same order can be added and multiplied. The entries a i i a_{ii} 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.

6.1 Main types


6.1.1 Diagonal and triangular matrix


If all entries of A A A below the main diagonal are zero, A A A is called an upper triangular matrix. Similarly if all entries of A A A above the main diagonal are zero, A A A is called a lower triangular matrix. If all entries outside the main diagonal are zero, A A A is called a diagonal matrix.

NameExample with n = 3
Diagonal matrix [ a 11 0 0 0 a 22 0 0 0 a 33 ] [ a 11 0 0 0 a 22 0 0 0 a 33 ] {\displaystyle {\begin{bmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\\\end{bmatrix}}}{\displaystyle {\begin{bmatrix}a_{11}&0&0\\0&a_{22}&0\\0&0&a_{33}\\\end{bmatrix}}} a11000a22000a33 a11000a22000a33
Lower triangular matrix [ a 11 0 0 a 21 a 22 0 a 31 a 32 a 33 ] [ a 11 0 0 a 21 a 22 0 a 31 a 32 a 33 ] {\displaystyle {\begin{bmatrix}a_{11}&0&0\\a_{21}&a_{22}&0\\a_{31}&a_{32}&a_{33}\\\end{bmatrix}}}{\displaystyle {\begin{bmatrix}a_{11}&0&0\\a_{21}&a_{22}&0\\a_{31}&a_{32}&a_{33}\\\end{bmatrix}}} a11a21a310a22a3200a33 a11a21a310a22a3200a33
Upper triangular matrix [ a 11 a 12 a 13 0 a 22 a 23 0 0 a 33 ] [ a 11 a 12 a 13 0 a 22 a 23 0 0 a 33 ] {\displaystyle {\begin{bmatrix}a_{11}&a_{12}&a_{13}\\0&a_{22}&a_{23}\\0&0&a_{33}\\\end{bmatrix}}}{\displaystyle {\begin{bmatrix}a_{11}&a_{12}&a_{13}\\0&a_{22}&a_{23}\\0&0&a_{33}\\\end{bmatrix}}} a1100a12a220a13a23a33 a1100a12a220a13a23a33

6.1.2 Identity matrix


Main article: Identity matrix

The identity matrix I n I_n In of size n n n is the n-by-n matrix in which all the elements on the main diagonal are equal to 1 1 1 and all other elements are equal to 0 0 0, for example,
I 1 = [ 1 ] ,   I 2 = [ 1 0 0 1 ] ,   … ,   I n = [ 1 0 ⋯ 0 0 1 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 1 ] {\displaystyle \mathbf {I} _{1}={\begin{bmatrix}1\end{bmatrix}},\ \mathbf {I} _{2}={\begin{bmatrix}1&0\\0&1\end{bmatrix}},\ \ldots ,\ \mathbf {I} _{n}={\begin{bmatrix}1&0&\cdots &0\\0&1&\cdots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\cdots &1\end{bmatrix}}} I1=[1], I2=[1001], , In= 100010001

It is a square matrix of order n n n, and also a special kind of diagonal matrix. It is called an identity matrix because multiplication with it leaves a matrix unchanged:
A I n = I m A = A AI_n = I_mA = A AIn=ImA=A for any m-by-n matrix A A 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.

6.1.3 Symmetric or skew-symmetric matrix


A square matrix A A A that is equal to its transpose, that is, A = A T A = A^T A=AT, is a symmetric matrix. If instead, A A A is equal to the negative of its transpose, that is, A = − A T A = −A^T A=AT, then A A A is a skew-symmetric matrix. In complex matrices, symmetry is often replaced by the concept of Hermitian matrices, which satisfy A ∗ = A A∗ = A 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.

6.1.4 Invertible matrix and its inverse


A square matrix A is called invertible or non-singular if there exists a matrix B B B such that
A B = B A = I n , AB = BA = I_n, AB=BA=In,
where I n I_n In is the n×n identity matrix with 1 1 1s on the main diagonal and 0 0 0s elsewhere. If B B B exists, it is unique and is called the inverse matrix of A A A, denoted A − 1 A^{−1} A1.

6.1.5 Definite matrix


A symmetric real matrix A is called positive-definite if the associated quadratic form
f   ( x ) = x T A x f (x) = x^TAx f(x)=xTAx
has a positive value for every nonzero vector x x x in R n R^n Rn. If f   ( x ) f (x) f(x) only yields negative values then A A A is negative-definite; if f f f does produce both negative and positive values then A A A is indefinite. If the quadratic form f f 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 A A:
B A ( x , y ) = x T A y . B_A (x, y) = x^TAy. BA(x,y)=xTAy.

In the case of complex matrices, the same terminology and result apply, with symmetric matrix, quadratic form, bilinear form, and transpose x T x^T xT replaced respectively by Hermitian matrix, Hermitian form, sesquilinear form, and conjugate transpose x H x^H xH.

6.1.6 Orthogonal matrix


6.2 Main operations


6.2.1 Trace


6.2.2 Determinant


6.2.3 Eigenvalues and eigenvectors


7 Computational aspects


8 Decomposition


9 Abstract algebraic aspects and generalizations


9.1 Matrices with more general entries


9.2 Relationship to linear maps


9.3 Matrix groups


9.4 Infinite matrices


9.5 Empty matrix


10 Applications


10.1 Graph theory


10.2 Analysis and geometry


10.3 Probability theory and statistics


10.4 Symmetries and transformations in physics


10.5 Linear combinations of quantum states


10.5 Normal modes


10.7 Geometrical optics


10.8 Electronics


11 History


11.1 Other historical usages of the word “matrix” in mathematics


12 See also


13 Notes


14 References


14.1 Physics references


14.2 Historical references


15 Further reading


16 External links

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值