Jump to content

Rank (linear algebra)

From Wikipedia, the free encyclopedia
(Redirected fromRank of a matrix)

Inlinear algebra,therankof amatrixAis thedimensionof thevector spacegenerated (orspanned) by its columns.[1][2][3]This corresponds to the maximal number oflinearly independentcolumns ofA.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 thesystem of linear equationsandlinear transformationencoded byA.There are multiple equivalent definitions of rank. A matrix's rank is one of its most fundamental characteristics.

The rank is commonly denoted byrank(A)orrk(A);[2]sometimes the parentheses are not written, as inrankA.[i]

Main definitions

[edit]

In this section, we give some definitions of the rank of a matrix. Many definitions are possible; seeAlternative definitionsfor several of these.

Thecolumn rankofAis thedimensionof thecolumn spaceofA,while therow rankofAis the dimension of therow spaceofA.

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§ Proofs that column rank = row rank,below.) This number (i.e., the number of linearly independent rows or columns) is simply called therankofA.

A matrix is said to havefull rankif 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 berank-deficientif it does not have full rank. Therank deficiencyof a matrix is the difference between the lesser of the number of rows and columns, and the rank.

The rank of alinear mapor operatoris defined as the dimension of itsimage:[5][6][7][8]whereis the dimension of a vector space, andis the image of a map.

Examples

[edit]

The matrix has rank 2: the first two columns arelinearly 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, thetranspose ofAhas rank 1. Indeed, since the column vectors ofAare the row vectors of thetransposeofA,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.,rank(A) = rank(AT).

Computing the rank of a matrix

[edit]

Rank from row echelon forms

[edit]

A common approach to finding the rank of a matrix is to reduce it to a simpler form, generallyrow echelon form,byelementary 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 ofpivots(or basic columns) and also the number of non-zero rows.

For example, the matrixAgiven 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 matrixAis 2.

Computation

[edit]

When applied tofloating pointcomputations on computers, basic Gaussian elimination (LU decomposition) can be unreliable, and a rank-revealing decomposition should be used instead. An effective alternative is thesingular value decomposition(SVD), but there are other less computationally expensive choices, such asQR decompositionwith pivoting (so-calledrank-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

[edit]

Proof using row reduction

[edit]

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§ Rank from row echelon forms.Here is a variant of this proof:

It is straightforward to show that neither the row rank nor the column rank are changed by anelementary row operation.AsGaussian eliminationproceeds by elementary row operations, thereduced row echelon formof 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 anidentity matrixpossibly 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 oflinear combinationsof vectors, and is valid over anyfield.The proof is based upon Wardlaw (2005).[9]The second usesorthogonalityand is valid for matrices over thereal 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

[edit]

LetAbe anm×nmatrix. Let the column rank ofAber,and letc1,...,crbe any basis for the column space ofA.Place these as the columns of anm×rmatrixC.Every column ofAcan be expressed as a linear combination of thercolumns inC.This means that there is anr×nmatrixRsuch thatA=CR.Ris the matrix whoseith column is formed from the coefficients giving theith column ofAas a linear combination of thercolumns ofC.In other words,Ris the matrix which contains the multiples for the bases of the column space ofA(which isC), which are then used to formAas a whole. Now, each row ofAis given by a linear combination of therrows ofR.Therefore, the rows ofRform a spanning set of the row space ofAand, by theSteinitz exchange lemma,the row rank ofAcannot exceedr.This proves that the row rank ofAis less than or equal to the column rank ofA.This result can be applied to any matrix, so apply the result to the transpose ofA.Since the row rank of the transpose ofAis the column rank ofAand the column rank of the transpose ofAis the row rank ofA,this establishes the reverse inequality and we obtain the equality of the row rank and the column rank ofA.(Also seeRank factorization.)

Proof using orthogonality

[edit]

LetAbe anm × nmatrix with entries in thereal numberswhose row rank isr.Therefore, the dimension of the row space ofAisr.Letx1,x2,…,xrbe abasisof the row space ofA.We claim that the vectorsAx1,Ax2,…,Axrarelinearly independent.To see why, consider a linear homogeneous relation involving these vectors with scalar coefficientsc1,c2,…,cr: wherev=c1x1+c2x2+ ⋯ +crxr.We make two observations: (a)vis a linear combination of vectors in the row space ofA,which implies thatvbelongs to the row space ofA,and (b) sinceAv= 0,the vectorvisorthogonalto every row vector ofAand, hence, is orthogonal to every vector in the row space ofA.The facts (a) and (b) together imply thatvis orthogonal to itself, which proves thatv= 0or, by the definition ofv, But recall that thexiwere chosen as a basis of the row space ofAand so are linearly independent. This implies thatc1=c2= ⋯ =cr= 0.It follows thatAx1,Ax2,…,Axrare linearly independent.

Now, eachAxiis obviously a vector in the column space ofA.So,Ax1,Ax2,…,Axris a set ofrlinearly independent vectors in the column space ofAand, hence, the dimension of the column space ofA(i.e., the column rank ofA) must be at least as big asr.This proves that row rank ofAis no larger than the column rank ofA.Now apply this result to the transpose ofAto get the reverse inequality and conclude as in the previous proof.

Alternative definitions

[edit]

In all the definitions in this section, the matrixAis taken to be anm×nmatrix over an arbitraryfieldF.

Dimension of image

[edit]

Given the matrix,there is an associatedlinear mapping defined by The rank ofis 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

[edit]

Given the same linear mappingfas above, the rank isnminus the dimension of thekerneloff.Therank–nullity theoremstates that this definition is equivalent to the preceding one.

Column rank – dimension of column space

[edit]

The rank ofAis the maximal number of linearly independent columnsofA;this is thedimensionof thecolumn spaceofA(the column space being the subspace ofFmgenerated by the columns ofA,which is in fact just the image of the linear mapfassociated toA).

Row rank – dimension of row space

[edit]

The rank ofAis the maximal number of linearly independent rows ofA;this is the dimension of therow spaceofA.

Decomposition rank

[edit]

The rank ofAis the smallest integerksuch thatAcan be factored as,whereCis anm×kmatrix andRis ak×nmatrix. In fact, for all integersk,the following are equivalent:

  1. the column rank ofAis less than or equal tok,
  2. there existkcolumnsof sizemsuch that every column ofAis a linear combination of,
  3. there exist anmatrixCand amatrixRsuch that(whenkis the rank, this is arank factorizationofA),
  4. there existkrowsof sizensuch that every row ofAis a linear combination of,
  5. the row rank ofAis less than or equal tok.

Indeed, the following equivalences are obvious:. For example, to prove (3) from (2), takeCto be the matrix whose columns arefrom (2). To prove (2) from (3), taketo be the columns ofC.

It follows from the equivalencethat 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 mapf:VWis the minimal dimensionkof an intermediate spaceXsuch thatfcan be written as the composition of a mapVXand a mapXW.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). Seerank factorizationfor details.

Rank in terms of singular values

[edit]

The rank ofAequals the number of non-zerosingular values,which is the same as the number of non-zero diagonal elements in Σ in thesingular value decomposition.

Determinantal rank – size of largest non-vanishing minor

[edit]

The rank ofAis the largest order of any non-zerominorinA.(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-vanishingp-minor (p×psubmatrix 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 ofnvectors has dimensionp,thenpof those vectors span the space (equivalently, that one can choose a spanning set that is asubsetof 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 ofnvectors has dimensionp,thenpof these vectors span the spaceandthere is a set ofpcoordinates on which they are linearly independent).

Tensor rank – minimum number of simple tensors

[edit]

The rank ofAis the smallest numberksuch thatAcan be written as a sum ofkrank 1 matrices, where a matrix is defined to have rank 1 if and only if it can be written as a nonzero productof a column vectorcand a row vectorr.This notion of rank is calledtensor rank;it can be generalized in theseparable modelsinterpretation of thesingular value decomposition.

Properties

[edit]

We assume thatAis anm×nmatrix, and we define the linear mapfbyf(x) =Axas above.

  • The rank of anm×nmatrix is anonnegativeintegerand cannot be greater than eithermorn.That is,A matrix that has rankmin(m,n)is said to havefull rank;otherwise, the matrix isrank deficient.
  • Only azero matrixhas rank zero.
  • fisinjective(or "one-to-one" ) if and only ifAhas rankn(in this case, we say thatAhasfull column rank).
  • fissurjective(or "onto" ) if and only ifAhas rankm(in this case, we say thatAhasfull row rank).
  • IfAis a square matrix (i.e.,m=n), thenAisinvertibleif and only ifAhas rankn(that is,Ahas full rank).
  • IfBis anyn×kmatrix, then
  • IfBis ann×kmatrix of rankn,then
  • IfCis anl×mmatrix of rankm,then
  • The rank ofAis equal torif and only if there exists an invertiblem×mmatrixXand an invertiblen×nmatrixYsuch thatwhereIrdenotes ther×ridentity matrix.
  • Sylvester’s rank inequality:ifAis anm×nmatrix andBisn×k,then[ii]This is a special case of the next inequality.
  • The inequality due toFrobenius:ifAB,ABCandBCare defined, then[iii]
  • Subadditivity:whenAandBare of the same dimension. As a consequence, a rank-kmatrix can be written as the sum ofkrank-1 matrices, but not fewer.
  • The rank of a matrix plus thenullityof the matrix equals the number of columns of the matrix. (This is therank–nullity theorem.)
  • IfAis a matrix over thereal numbersthen the rank ofAand the rank of its correspondingGram matrixare equal. Thus, for real matricesThis can be shown by proving equality of theirnull spaces.The null space of the Gram matrix is given by vectorsxfor whichIf this condition is fulfilled, we also have[11]
  • IfAis a matrix over thecomplex numbersanddenotes the complex conjugate ofAandAthe conjugate transpose ofA(i.e., theadjointofA), then

Applications

[edit]

One useful application of calculating the rank of a matrix is the computation of the number of solutions of asystem of linear equations.According to theRouché–Capelli theorem,the system is inconsistent if the rank of theaugmented matrixis greater than the rank of thecoefficient 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 haskfree parameters wherekis 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.

Incontrol theory,the rank of a matrix can be used to determine whether alinear systemiscontrollable,orobservable.

In the field ofcommunication 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

[edit]

There are different generalizations of the concept of rank to matrices over arbitraryrings,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 astensors,thetensor rankgeneralizes 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 ofrankforsmooth mapsbetweensmooth manifolds.It is equal to the linear rank of thederivative.

Matrices as tensors

[edit]

Matrix rank should not be confused withtensor order,which is called tensor rank. Tensor order is the number of indices required to write atensor,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; seeTensor (intrinsic definition)for details.

The tensor rank of a matrix can also mean the minimum number ofsimple tensorsnecessary to express the matrix as a linear combination, and that this definition does agree with matrix rank as here discussed.

See also

[edit]

Notes

[edit]
  1. ^Alternative notation includesfromKatznelson & Katznelson (2008,p. 52, §2.5.1) andHalmos (1974,p. 90, § 50).
  2. ^Proof: Apply therank–nullity theoremto the inequality
  3. ^Proof. The mapis 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 therank–nullity theorem. Alternatively, ifis a linear subspace then;apply this inequality to the subspace defined by the orthogonal complement of the image ofin the image of,whose dimension is;its image underhas dimension.

References

[edit]
  1. ^Axler (2015)pp. 111-112, §§ 3.115, 3.119
  2. ^abRoman (2005)p. 48, § 1.16
  3. ^Bourbaki,Algebra,ch. II, §10.12, p. 359
  4. ^abMackiw, G. (1995), "A Note on the Equality of the Column and Row Rank of a Matrix",Mathematics Magazine,68(4): 285–286,doi:10.1080/0025570X.1995.11996337
  5. ^Hefferon (2020)p. 200, ch. 3, Definition 2.1
  6. ^Katznelson & Katznelson (2008)p. 52, § 2.5.1
  7. ^Valenza (1993)p. 71, § 4.3
  8. ^Halmos (1974)p. 90, § 50
  9. ^ Wardlaw, William P. (2005), "Row Rank Equals Column Rank",Mathematics Magazine,78(4): 316–318,doi:10.1080/0025570X.2005.11953349,S2CID218542661
  10. ^Banerjee, Sudipto; Roy, Anindya (2014),Linear Algebra and Matrix Analysis for Statistics,Texts in Statistical Science (1st ed.), Chapman and Hall/CRC,ISBN978-1420095388
  11. ^Mirsky, Leonid (1955).An introduction to linear algebra.Dover Publications.ISBN978-0-486-66434-7.

Sources

[edit]

Further reading

[edit]
  • Roger A. Horn and Charles R. Johnson (1985).Matrix Analysis.Cambridge University Press.ISBN978-0-521-38632-6.
  • 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]