In

and System of Equation

* Mike Brookes: Matrix Reference Manual

{{DEFAULTSORT:Rank (Linear Algebra) Linear algebra

linear algebra
Linear algebra is the branch of mathematics concerning linear equations such as:
:a_1x_1+\cdots +a_nx_n=b,
linear maps such as:
:(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n,
and their representations in vector spaces and through matrix (math ...

, the rank of a matrix
Matrix or MATRIX may refer to:
Science and mathematics
* Matrix (mathematics), a rectangular array of numbers, symbols, or expressions
* Matrix (logic), part of a formula in prenex normal form
* Matrix (biology), the material in between a eukaryoti ...

is the dimension
In and , the dimension of a (or object) is informally defined as the minimum number of needed to specify any within it. Thus a has a dimension of one (1D) because only one coordinate is needed to specify a point on itfor example, the point ...

of the vector space
In mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...

generated (or spanned) by its columns. p. 48, § 1.16 This corresponds to the maximal number of linearly independent
In the theory of vector spaces, a set of vectors is said to be if at least one of the vectors in the set can be defined as a linear combinationIn mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics ...

columns of . This, in turn, is identical to the dimension of the vector space spanned by its rows. Rank is thus a measure of the "Degenerate form, nondegenerateness" of the system of linear equations and linear transformation encoded by . There are multiple equivalent definitions of rank. A matrix's rank is one of its most fundamental characteristics.
The rank is commonly denoted by or ; sometimes the parentheses are not written, as in .Alternative notation includes $\backslash rho\; (\backslash Phi)$ from and .
Main definitions

In this section, we give some definitions of the rank of a matrix. Many definitions are possible; see #Alternative definitions, Alternative definitions for several of these. The column rank of is the dimension (linear algebra), dimension of the column space of , while the row rank of is the dimension of the row space of . A fundamental result in linear algebra is that the column rank and the row rank are always equal. (Two proofs of this result are given in , below.) This number (i.e., the number of linearly independent rows or columns) is simply called the rank of . 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 $\backslash Phi$ is defined as the dimension of its Image (mathematics), image:$$\backslash operatorname\; (\backslash Phi)\; :=\; \backslash dim\; (\backslash operatorname\; (\backslash Phi))$$where $\backslash dim$ is the dimension of a vector space, and $\backslash operatorname$ is the image of a map.Examples

The matrix $$\backslash begin1\&0\&1\backslash \backslash -2\&-3\&1\backslash \backslash 3\&3\&0\backslash end$$ has rank 2: the first two columns are linear dependence, linearly independent, so the rank is at least 2, but since the third is a linear combination of the first two (the second subtracted from the first), the three columns are linearly dependent so the rank must be less than 3. The matrix $$A=\backslash begin1\&1\&0\&2\backslash \backslash -1\&-1\&0\&-2\backslash end$$ has rank 1: there are nonzero columns, so the rank is positive, but any pair of columns is linearly dependent. Similarly, the transpose $$A^\; =\; \backslash begin1\&-1\backslash \backslash 1\&-1\backslash \backslash 0\&0\backslash \backslash 2\&-2\backslash end$$ of has rank 1. Indeed, since the column vectors of are the row vectors of the transpose of , 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., .Computing the rank of a matrix

Rank from row echelon forms

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 Pivot_element, pivots (or basic columns) and also the number of non-zero rows. For example, the matrix given by $$A=\backslash begin1\&2\&1\backslash \backslash -2\&-3\&1\backslash \backslash 3\&5\&0\backslash end$$ can be put in reduced row-echelon form by using the following elementary row operations: $$\backslash begin\; \backslash begin1\&2\&1\backslash \backslash -2\&-3\&1\backslash \backslash 3\&5\&0\backslash end\; \&\backslash xrightarrow\; \backslash begin1\&2\&1\backslash \backslash 0\&1\&3\backslash \backslash 3\&5\&0\backslash end\; \backslash xrightarrow\; \backslash begin1\&2\&1\backslash \backslash 0\&1\&3\backslash \backslash 0\&-1\&-3\backslash end\; \backslash \backslash \; \&\backslash xrightarrow\; \backslash ,\backslash ,\; \backslash begin1\&2\&1\backslash \backslash 0\&1\&3\backslash \backslash 0\&0\&0\backslash end\; \backslash xrightarrow\; \backslash begin1\&0\&-5\backslash \backslash 0\&1\&3\backslash \backslash 0\&0\&0\backslash end~.\; \backslash end$$ The final matrix (in row echelon form) has two non-zero rows and thus the rank of matrix 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 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

The fact that the column and row ranks of any matrix are equal forms is fundamental in linear algebra. Many proofs have been given. One of the most elementary ones has been sketched in . 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 (mathematics), field. The proof is based upon Wardlaw (2005). The second uses orthogonality and is valid for matrices over the real numbers; it is based upon Mackiw (1995). Both proofs can be found in the book by Banerjee and Roy (2014).Proof using linear combinations

Let be an matrix. Let the column rank of be , and let be any basis for the column space of . Place these as the columns of an matrix . Every column of can be expressed as a linear combination of the columns in . This means that there is an matrix such that . is the matrix whose th column is formed from the coefficients giving the th column of as a linear combination of the columns of . In other words, is the matrix which contains the multiples for the bases of the column space of (which is ), which are then used to form as a whole. Now, each row of is given by a linear combination of the rows of . Therefore, the rows of form a spanning set of the row space of and, by the Steinitz exchange lemma, the row rank of cannot exceed . This proves that the row rank of is less than or equal to the column rank of . This result can be applied to any matrix, so apply the result to the transpose of . Since the row rank of the transpose of is the column rank of and the column rank of the transpose of is the row rank of , this establishes the reverse inequality and we obtain the equality of the row rank and the column rank of . (Also see Rank factorization.)Proof using orthogonality

Let be an matrix with entries in the real numbers whose row rank is . Therefore, the dimension of the row space of is . Let be a basis (linear algebra), basis of the row space of . We claim that the vectors arelinearly independent
In the theory of vector spaces, a set of vectors is said to be if at least one of the vectors in the set can be defined as a linear combinationIn mathematics
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics ...

. To see why, consider a linear homogeneous relation involving these vectors with scalar coefficients :
$$0\; =\; c\_1\; A\backslash mathbf\_1\; +\; c\_2\; A\backslash mathbf\_2\; +\; \backslash cdots\; +\; c\_r\; A\backslash mathbf\_r\; =\; A(c\_1\; \backslash mathbf\_1\; +\; c\_2\; \backslash mathbf\_2\; +\; \backslash cdots\; +\; c\_r\; \backslash mathbf\_r)\; =\; A\backslash mathbf,$$
where . We make two observations: (a) is a linear combination of vectors in the row space of , which implies that belongs to the row space of , and (b) since , the vector is orthogonal to every row vector of and, hence, is orthogonal to every vector in the row space of . The facts (a) and (b) together imply that is orthogonal to itself, which proves that or, by the definition of ,
$$c\_1\backslash mathbf\_1\; +\; c\_2\backslash mathbf\_2\; +\; \backslash cdots\; +\; c\_r\; \backslash mathbf\_r\; =\; 0.$$
But recall that the were chosen as a basis of the row space of and so are linearly independent. This implies that . It follows that are linearly independent.
Now, each is obviously a vector in the column space of . So, is a set of linearly independent vectors in the column space of and, hence, the dimension of the column space of (i.e., the column rank of ) must be at least as big as . This proves that row rank of is no larger than the column rank of . Now apply this result to the transpose of to get the reverse inequality and conclude as in the previous proof.
Alternative definitions

In all the definitions in this section, the matrix is taken to be an matrix over an arbitrary Field (mathematics), field .Dimension of image

Given the matrix $A$, there is an associated linear mapping $$f\; :\; F^n\; \backslash mapsto\; F^m$$ defined by $$f(x)\; =\; Ax.$$ The rank of $A$ is the dimension of the image of $f$. 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 as above, the rank is minus the dimension of the kernel (algebra), kernel of . The rank–nullity theorem states that this definition is equivalent to the preceding one.Column rank – dimension of column space

The rank of is the maximal number of linearly independent columns $\backslash mathbf\_1,\backslash mathbf\_2,\backslash dots,\backslash mathbf\_k$ of ; this is the dimension of a vector space, dimension of the column space of (the column space being the subspace of generated by the columns of , which is in fact just the image of the linear map associated to ).Row rank – dimension of row space

The rank of is the maximal number of linearly independent rows of ; this is the dimension of the row space of .Decomposition rank

The rank of is the smallest integer such that can be factored as $A\; =\; CR$, where is an matrix and is a matrix. In fact, for all integers , the following are equivalent: # the column rank of is less than or equal to , # there exist columns $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$ of size such that every column of is a linear combination of $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$, # there exist an $m\; \backslash times\; k$ matrix and a $k\; \backslash times\; n$ matrix such that $A\; =\; CR$ (when is the rank, this is a rank factorization of ), # there exist rows $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$ of size such that every row of is a linear combination of $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$, # the row rank of is less than or equal to . Indeed, the following equivalences are obvious: $(1)\backslash Leftrightarrow(2)\backslash Leftrightarrow(3)\backslash Leftrightarrow(4)\backslash Leftrightarrow(5)$. For example, to prove (3) from (2), take to be the matrix whose columns are $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$ from (2). To prove (2) from (3), take $\backslash mathbf\_1,\backslash ldots,\backslash mathbf\_k$ to be the columns of . It follows from the equivalence $(1)\backslash Leftrightarrow(5)$ 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 is the minimal dimension of an intermediate space such that can be written as the composition of a map and a map . 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 equals the number of non-zero Singular value decomposition, singular values, which is the same as the number of non-zero diagonal elements in Σ in the singular value decompositionDeterminantal rank – size of largest non-vanishing minor

The rank of is the largest order of any non-zero Minor (linear algebra), minor in . (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 -minor ( 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 vectors has dimension , then 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 vectors has dimension , then of these vectors span the space ''and'' there is a set of coordinates on which they are linearly independent).Tensor rank – minimum number of simple tensors

The rank of is the smallest number such that can be written as a sum of rank 1 matrices, where a matrix is defined to have rank 1 if and only if it can be written as a nonzero product $c\; \backslash cdot\; r$ of a column vector and a row vector . This notion of rank is called tensor rank; it can be generalized in the Singular value decomposition#Separable models, separable models interpretation of the singular value decomposition.Properties

We assume that is an matrix, and we define the linear map by as above. * The rank of an matrix is a nonnegative integer and cannot be greater than either or . That is, $$\backslash operatorname(A)\; \backslash le\; \backslash min(m,\; n).$$ A matrix that has rank is said to have ''full rank''; otherwise, the matrix is ''rank deficient''. * Only a zero matrix has rank zero. * is injective function, injective (or "one-to-one") if and only if has rank (in this case, we say that has ''full column rank''). * is surjective function, surjective (or "onto") if and only if has rank (in this case, we say that has ''full row rank''). * If is a square matrix (i.e., ), then is invertible matrix, invertible if and only if has rank (that is, has full rank). * If is any matrix, then $$\backslash operatorname(AB)\; \backslash leq\; \backslash min(\backslash operatorname(A),\; \backslash operatorname(B)).$$ * If is an matrix of rank , then $$\backslash operatorname(AB)\; =\; \backslash operatorname(A).$$ * If is an matrix of rank , then $$\backslash operatorname(CA)\; =\; \backslash operatorname(A).$$ * The rank of is equal to if and only if there exists an invertible matrix and an invertible matrix such that $$XAY\; =\; \backslash begin\; I\_r\; \&\; 0\; \backslash \backslash \; 0\; \&\; 0\; \backslash \backslash \; \backslash end,$$ where denotes the identity matrix. * James Joseph Sylvester, Sylvester’s rank inequality: if is an matrix and is , thenProof: Apply the rank–nullity theorem to the inequality $$\backslash dim\; \backslash ker(AB)\; \backslash le\; \backslash dim\; \backslash ker(A)\; +\; \backslash dim\; \backslash ker(B).$$ $$\backslash operatorname(A)\; +\; \backslash operatorname(B)\; -\; n\; \backslash leq\; \backslash operatorname(A\; B).$$ This is a special case of the next inequality. * The inequality due to Ferdinand Georg Frobenius, Frobenius: if , and are defined, thenProof. The map$$C:\; \backslash ker(ABC)\; /\; \backslash ker(BC)\; \backslash to\; \backslash ker(AB)\; /\; \backslash ker(B)$$is well-defined and injective. We thus obtain the inequality in terms of dimensions of kernel, which can then be converted to the inequality in terms of ranks by the rank–nullity theorem. Alternatively, if $M$ is a linear subspace then $\backslash dim\; (AM)\; \backslash leq\; \backslash dim\; (M)$; apply this inequality to the subspace defined by the orthogonal complement of the image of $BC$ in the image of $B$, whose dimension is $\backslash operatorname\; (B)\; -\; \backslash operatorname\; (BC)$; its image under $A$ has dimension $\backslash operatorname\; (AB)\; -\; \backslash operatorname\; (ABC)$. $$\backslash operatorname(AB)\; +\; \backslash operatorname(BC)\; \backslash le\; \backslash operatorname(B)\; +\; \backslash operatorname(ABC).$$ * Subadditivity: $$\backslash operatorname(A+\; B)\; \backslash le\; \backslash operatorname(A)\; +\; \backslash operatorname(B)$$ when and are of the same dimension. As a consequence, a rank- matrix can be written as the sum of rank-1 matrices, but not fewer. * The rank of a matrix plus the Kernel (matrix), nullity of the matrix equals the number of columns of the matrix. (This is the rank–nullity theorem.) * If is a matrix over the real numbers then the rank of and the rank of its corresponding Gram matrix are equal. Thus, for real matrices $$\backslash operatorname(A^\backslash mathrm\; A)\; =\; \backslash operatorname(A\; A^\backslash mathrm)\; =\; \backslash operatorname(A)\; =\; \backslash operatorname(A^\backslash mathrm).$$ This can be shown by proving equality of their kernel (matrix), null spaces. The null space of the Gram matrix is given by vectors for which $A^\backslash mathrm\; A\; \backslash mathbf\; =\; 0.$ If this condition is fulfilled, we also have $0\; =\; \backslash mathbf^\backslash mathrm\; A^\backslash mathrm\; A\; x\; =\; \backslash left,\; A\; \backslash mathbf\; \backslash \; ^2.$ * If is a matrix over the complex numbers and $\backslash overline$ denotes the complex conjugate of and the conjugate transpose of (i.e., the Hermitian adjoint, adjoint of ), then $$\backslash operatorname(A)\; =\; \backslash operatorname(\backslash overline)\; =\; \backslash operatorname(A^\backslash mathrm)\; =\; \backslash operatorname(A^*)\; =\; \backslash operatorname(A^*A)\; =\; \backslash operatorname(AA^*).$$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 free parameters where 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 controllability, controllable, or observability, 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 ring (mathematics), 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 (differential topology), rank for smooth maps between smooth manifolds. It is equal to the linear rank of the pushforward (differential), 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 dependenceNotes

References

Sources

* * * * * *Further reading

* * Kaw, Autar K. Two Chapters from the book Introduction to Matrix Algebra: 1. Vectorand System of Equation

* Mike Brookes: Matrix Reference Manual

{{DEFAULTSORT:Rank (Linear Algebra) Linear algebra