Rank (linear algebra)
Template:Short description In linear algebra, the rank of a matrix Template:Mvar is the dimension of the vector space generated (or spanned) by its columns.[1][2][3] This corresponds to the maximal number of linearly independent columns of Template:Mvar. This, in turn, is identical to the dimension of the vector space spanned by its rows.[4] Rank is thus a measure of the "nondegenerateness" of the system of linear equations and linear transformation encoded by Template:Mvar. There are multiple equivalent definitions of rank. A matrix's rank is one of its most fundamental characteristics.
The rank is commonly denoted by Template:Math or Template:Math;[2] sometimes the parentheses are not written, as in Template:Math.[lower-roman 1]
Main definitions
In this section, we give some definitions of the rank of a matrix. Many definitions are possible; see Alternative definitions for several of these.
The column rank of Template:Mvar is the dimension of the column space of Template:Mvar, while the row rank of Template:Mvar is the dimension of the row space of Template:Mvar.
A fundamental result in linear algebra is that the column rank and the row rank are always equal. (Three proofs of this result are given in Template:Slink, below.) This number (i.e., the number of linearly independent rows or columns) is simply called the rank of Template:Mvar.
A matrix is said to have full rank if its rank equals the largest possible for a matrix of the same dimensions, which is the lesser of the number of rows and columns. A matrix is said to be rank-deficient if it does not have full rank. The rank deficiency of a matrix is the difference between the lesser of the number of rows and columns, and the rank.
The rank of a linear map or operator is defined as the dimension of its image:[5][6][7][8]where is the dimension of a vector space, and is the image of a map.
Examples
The matrix has rank 2: the first two columns are linearly independent, so the rank is at least 2, but since the third is a linear combination of the first two (the first column plus the second), the three columns are linearly dependent so the rank must be less than 3.
The matrix has rank 1: there are nonzero columns, so the rank is positive, but any pair of columns is linearly dependent. Similarly, the transpose of Template:Mvar has rank 1. Indeed, since the column vectors of Template:Mvar are the row vectors of the transpose of Template:Mvar, the statement that the column rank of a matrix equals its row rank is equivalent to the statement that the rank of a matrix is equal to the rank of its transpose, i.e., Template:Math.
Computing the rank of a matrix
Rank from row echelon forms
Script error: No such module "Labelled list hatnote". A common approach to finding the rank of a matrix is to reduce it to a simpler form, generally row echelon form, by elementary row operations. Row operations do not change the row space (hence do not change the row rank), and, being invertible, map the column space to an isomorphic space (hence do not change the column rank). Once in row echelon form, the rank is clearly the same for both row rank and column rank, and equals the number of pivots (or basic columns) and also the number of non-zero rows.
For example, the matrix Template:Mvar given by can be put in reduced row-echelon form by using the following elementary row operations: The final matrix (in reduced row echelon form) has two non-zero rows and thus the rank of matrix Template:Mvar is 2.
Computation
When applied to floating point computations on computers, basic Gaussian elimination (LU decomposition) can be unreliable, and a rank-revealing decomposition should be used instead. An effective alternative is the singular value decomposition (SVD), but there are other less computationally expensive choices, such as QR decomposition with pivoting (so-called rank-revealing QR factorization), which are still more numerically robust than Gaussian elimination. Numerical determination of rank requires a criterion for deciding when a value, such as a singular value from the SVD, should be treated as zero, a practical choice which depends on both the matrix and the application.
Proofs that column rank = row rank
Proof using row reduction
The fact that the column and row ranks of any matrix are equal is fundamental in linear algebra. Many proofs have been given. One of the most elementary ones has been sketched in Template:Slink. Here is a variant of this proof:
It is straightforward to show that neither the row rank nor the column rank are changed by an elementary row operation. As Gaussian elimination proceeds by elementary row operations, the reduced row echelon form of a matrix has the same row rank and the same column rank as the original matrix. Further elementary column operations allow putting the matrix in the form of an identity matrix possibly bordered by rows and columns of zeros. Again, this changes neither the row rank nor the column rank. It is immediate that both the row and column ranks of this resulting matrix is the number of its nonzero entries.
We present two other proofs of this result. The first uses only basic properties of linear combinations of vectors, and is valid over any field. The proof is based upon Wardlaw (2005).[9] The second uses orthogonality and is valid for matrices over the real numbers; it is based upon Mackiw (1995).[4] Both proofs can be found in the book by Banerjee and Roy (2014).[10]
Proof using linear combinations
Let Template:Mvar be an Template:Math matrix. Let the column rank of Template:Mvar be Template:Mvar, and let Template:Math be any basis for the column space of Template:Mvar. Place these as the columns of an Template:Math matrix Template:Mvar. Every column of Template:Mvar can be expressed as a linear combination of the Template:Mvar columns in Template:Mvar. This means that there is an Template:Math matrix Template:Mvar such that Template:Math. Template:Mvar is the matrix whose Template:Mvarth column is formed from the coefficients giving the Template:Mvarth column of Template:Mvar as a linear combination of the Template:Mvar columns of Template:Mvar. In other words, Template:Mvar is the matrix which contains the multiples for the bases of the column space of Template:Mvar (which is Template:Mvar), which are then used to form Template:Mvar as a whole. Now, each row of Template:Mvar is given by a linear combination of the Template:Mvar rows of Template:Mvar. Therefore, the rows of Template:Mvar form a spanning set of the row space of Template:Mvar and, by the Steinitz exchange lemma, the row rank of Template:Mvar cannot exceed Template:Mvar. This proves that the row rank of Template:Mvar is less than or equal to the column rank of Template:Mvar. This result can be applied to any matrix, so apply the result to the transpose of Template:Mvar. Since the row rank of the transpose of Template:Mvar is the column rank of Template:Mvar and the column rank of the transpose of Template:Mvar is the row rank of Template:Mvar, this establishes the reverse inequality and we obtain the equality of the row rank and the column rank of Template:Mvar. (Also see Rank factorization.)
Proof using orthogonality
Let Template:Mvar be an Template:Math matrix with entries in the real numbers whose row rank is Template:Mvar. Therefore, the dimension of the row space of Template:Mvar is Template:Mvar. Let Template:Math be a basis of the row space of Template:Mvar. We claim that the vectors Template:Math are linearly independent. To see why, consider a linear homogeneous relation involving these vectors with scalar coefficients Template:Math: where Template:Math. We make two observations: (a) Template:Math is a linear combination of vectors in the row space of Template:Mvar, which implies that Template:Math belongs to the row space of Template:Mvar, and (b) since Template:Math, the vector Template:Math is orthogonal to every row vector of Template:Mvar and, hence, is orthogonal to every vector in the row space of Template:Mvar. The facts (a) and (b) together imply that Template:Math is orthogonal to itself, which proves that Template:Math or, by the definition of Template:Math, But recall that the Template:Math were chosen as a basis of the row space of Template:Mvar and so are linearly independent. This implies that Template:Math. It follows that Template:Math are linearly independent.
Every Template:Math is in the column space of Template:Mvar. So, Template:Math is a set of Template:Mvar linearly independent vectors in the column space of Template:Mvar and, hence, the dimension of the column space of Template:Mvar (i.e., the column rank of Template:Mvar) must be at least as big as Template:Mvar. This proves that row rank of Template:Mvar is no larger than the column rank of Template:Mvar. Now apply this result to the transpose of Template:Mvar to get the reverse inequality and conclude as in the previous proof.
Alternative definitions
In all the definitions in this section, the matrix Template:Mvar is taken to be an Template:Math matrix over an arbitrary field Template:Mvar.
Dimension of image
Given the matrix , there is an associated linear mapping defined by The rank of is the dimension of the image of . This definition has the advantage that it can be applied to any linear map without need for a specific matrix.
Rank in terms of nullity
Given the same linear mapping Template:Mvar as above, the rank is Template:Mvar minus the dimension of the kernel of Template:Mvar. The rank–nullity theorem states that this definition is equivalent to the preceding one.
Column rank – dimension of column space
The rank of Template:Mvar is the maximal number of linearly independent columns of Template:Mvar; this is the dimension of the column space of Template:Mvar (the column space being the subspace of Template:Math generated by the columns of Template:Mvar, which is in fact just the image of the linear map Template:Mvar associated to Template:Mvar).
Row rank – dimension of row space
The rank of Template:Mvar is the maximal number of linearly independent rows of Template:Mvar; this is the dimension of the row space of Template:Mvar.
Decomposition rank
The rank of Template:Mvar is the smallest positive integer Template:Mvar such that Template:Mvar can be factored as , where Template:Mvar is an Template:Math matrix and Template:Mvar is a Template:Math matrix. In fact, for all integers Template:Mvar, the following are equivalent:
- the column rank of Template:Mvar is less than or equal to Template:Mvar,
- there exist Template:Mvar columns of size Template:Mvar such that every column of Template:Mvar is a linear combination of ,
- there exist an matrix Template:Mvar and a matrix Template:Mvar such that (when Template:Mvar is the rank, this is a rank factorization of Template:Mvar),
- there exist Template:Mvar rows of size Template:Mvar such that every row of Template:Mvar is a linear combination of ,
- the row rank of Template:Mvar is less than or equal to Template:Mvar.
Indeed, the following equivalences are obvious: . For example, to prove (3) from (2), take Template:Mvar to be the matrix whose columns are from (2). To prove (2) from (3), take to be the columns of Template:Mvar.
It follows from the equivalence that the row rank is equal to the column rank.
As in the case of the "dimension of image" characterization, this can be generalized to a definition of the rank of any linear map: the rank of a linear map Template:Math is the minimal dimension Template:Mvar of an intermediate space Template:Mvar such that Template:Mvar can be written as the composition of a map Template:Math and a map Template:Math. Unfortunately, this definition does not suggest an efficient manner to compute the rank (for which it is better to use one of the alternative definitions). See rank factorization for details.
Rank in terms of singular values
The rank of Template:Mvar equals the number of non-zero singular values, which is the same as the number of non-zero diagonal elements in Σ in the singular value decomposition .
Determinantal rank – size of largest non-vanishing minor
The rank of Template:Mvar is the largest order of any non-zero minor in Template:Mvar. (The order of a minor is the side-length of the square sub-matrix of which it is the determinant.) Like the decomposition rank characterization, this does not give an efficient way of computing the rank, but it is useful theoretically: a single non-zero minor witnesses a lower bound (namely its order) for the rank of the matrix, which can be useful (for example) to prove that certain operations do not lower the rank of a matrix.
A non-vanishing Template:Mvar-minor (Template:Math submatrix with non-zero determinant) shows that the rows and columns of that submatrix are linearly independent, and thus those rows and columns of the full matrix are linearly independent (in the full matrix), so the row and column rank are at least as large as the determinantal rank; however, the converse is less straightforward. The equivalence of determinantal rank and column rank is a strengthening of the statement that if the span of Template:Mvar vectors has dimension Template:Mvar, then Template:Mvar of those vectors span the space (equivalently, that one can choose a spanning set that is a subset of the vectors): the equivalence implies that a subset of the rows and a subset of the columns simultaneously define an invertible submatrix (equivalently, if the span of Template:Mvar vectors has dimension Template:Mvar, then Template:Mvar of these vectors span the space and there is a set of Template:Mvar coordinates on which they are linearly independent).
Tensor rank – minimum number of simple tensors
Script error: No such module "Labelled list hatnote".
The rank of Template:Mvar is the smallest number Template:Mvar such that Template:Mvar can be written as a sum of Template:Mvar rank 1 matrices, where a matrix is defined to have rank 1 if and only if it can be written as a nonzero product of a column vector Template:Mvar and a row vector Template:Mvar. This notion of rank is called tensor rank; it can be generalized in the separable models interpretation of the singular value decomposition.
Properties
We assume that Template:Mvar is an Template:Math matrix, and we define the linear map Template:Mvar by Template:Math as above.
- The rank of an Template:Math matrix is a nonnegative integer and cannot be greater than either Template:Mvar or Template:Mvar. That is, A matrix that has rank Template:Math is said to have full rank; otherwise, the matrix is rank deficient.
- Only a zero matrix has rank zero.
- Template:Mvar is injective (or "one-to-one") if and only if Template:Mvar has rank Template:Mvar (in this case, we say that Template:Mvar has full column rank).
- Template:Mvar is surjective (or "onto") if and only if Template:Mvar has rank Template:Mvar (in this case, we say that Template:Mvar has full row rank).
- If Template:Mvar is a square matrix (i.e., Template:Math), then Template:Mvar is invertible if and only if Template:Mvar has rank Template:Mvar (that is, Template:Mvar has full rank).
- If Template:Mvar is any Template:Math matrix, then
- If Template:Mvar is an Template:Math matrix of rank Template:Mvar, then
- If Template:Mvar is an Template:Math matrix of rank Template:Mvar, then
- The rank of Template:Mvar is equal to Template:Mvar if and only if there exists an invertible Template:Math matrix Template:Mvar and an invertible Template:Math matrix Template:Mvar such that where Template:Math denotes the Template:Math identity matrix and the three zero matrices have the sizes Template:Math, Template:Math and Template:Math.
- Sylvester’s rank inequality: if Template:Mvar is an Template:Math matrix and Template:Mvar is Template:Math, then[lower-roman 2] This is a special case of the next inequality.
- The inequality due to Frobenius: if Template:Math, Template:Math and Template:Math are defined, then[lower-roman 3]
- Subadditivity: when Template:Mvar and Template:Mvar are of the same dimension. As a consequence, a rank-Template:Mvar matrix can be written as the sum of Template:Mvar rank-1 matrices, but not fewer.
- The rank of a matrix plus the nullity of the matrix equals the number of columns of the matrix. (This is the rank–nullity theorem.)
- If Template:Mvar is a matrix over the real numbers then the rank of Template:Mvar and the rank of its corresponding Gram matrix are equal. Thus, for real matrices This can be shown by proving equality of their null spaces. The null space of the Gram matrix is given by vectors Template:Math for which If this condition is fulfilled, we also have [11]
- If Template:Mvar is a matrix over the complex numbers and denotes the complex conjugate of Template:Mvar and Template:Math the conjugate transpose of Template:Mvar (i.e., the adjoint of Template:Mvar), then
Applications
One useful application of calculating the rank of a matrix is the computation of the number of solutions of a system of linear equations. According to the Rouché–Capelli theorem, the system is inconsistent if the rank of the augmented matrix is greater than the rank of the coefficient matrix. If on the other hand, the ranks of these two matrices are equal, then the system must have at least one solution. The solution is unique if and only if the rank equals the number of variables. Otherwise the general solution has Template:Mvar free parameters where Template:Mvar is the difference between the number of variables and the rank. In this case (and assuming the system of equations is in the real or complex numbers) the system of equations has infinitely many solutions.
In control theory, the rank of a matrix can be used to determine whether a linear system is controllable, or observable.
In the field of communication complexity, the rank of the communication matrix of a function gives bounds on the amount of communication needed for two parties to compute the function.
Generalization
There are different generalizations of the concept of rank to matrices over arbitrary rings, where column rank, row rank, dimension of column space, and dimension of row space of a matrix may be different from the others or may not exist.
Thinking of matrices as tensors, the tensor rank generalizes to arbitrary tensors; for tensors of order greater than 2 (matrices are order 2 tensors), rank is very hard to compute, unlike for matrices.
There is a notion of rank for smooth maps between smooth manifolds. It is equal to the linear rank of the derivative.
Matrices as tensors
Matrix rank should not be confused with tensor order, which is called tensor rank. Tensor order is the number of indices required to write a tensor, and thus matrices all have tensor order 2. More precisely, matrices are tensors of type (1,1), having one row index and one column index, also called covariant order 1 and contravariant order 1; see Tensor (intrinsic definition) for details.
The tensor rank of a matrix can also mean the minimum number of simple tensors necessary to express the matrix as a linear combination, and that this definition does agree with matrix rank as here discussed.
See also
- Matroid rank
- Nonnegative rank (linear algebra)
- Rank (differential topology)
- Multicollinearity
- Linear dependence
Notes
References
Sources
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
- Script error: No such module "citation/CS1".
Further reading
- Script error: No such module "citation/CS1".
- Kaw, Autar K. Two Chapters from the book Introduction to Matrix Algebra: 1. Vectors [1] and System of Equations [2]
- Mike Brookes: Matrix Reference Manual. [3]
Script error: No such module "Navbox".
- ↑ Template:Harvard citation text pp. 111-112, §§ 3.115, 3.119
- ↑ a b Template:Harvard citation text p. 48, § 1.16
- ↑ Bourbaki, Algebra, ch. II, §10.12, p. 359
- ↑ a b Script error: No such module "citation/CS1".
- ↑ Template:Harvard citation text p. 200, ch. 3, Definition 2.1
- ↑ Template:Harvard citation text p. 52, § 2.5.1
- ↑ Template:Harvard citation text p. 71, § 4.3
- ↑ Template:Harvard citation text p. 90, § 50
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
- ↑ Script error: No such module "citation/CS1".
Cite error: <ref> tags exist for a group named "lower-roman", but no corresponding <references group="lower-roman"/> tag was found