4.3  Rank, Equivalence and Factorizations

Similarity compares two matrices of one operator, where the same basis is used for input and output, and the last section showed that deciding it is hard. This section asks what happens when the two bases may be chosen independently, as they may for any map T:V→W. The answer is strikingly simple: the rank is then the only thing that matters. On the way we meet the column–row factorization, which writes every matrix as a product through a space of dimension equal to its rank, and we collect the basic inequalities for the rank of a composition.

4.3.1. The column–row factorization

In Chapter 3 we computed the rank of a matrix by row reduction, and the reduction gave more than a number. It produced a basis of the column space, the pivot columns of A (Theorem 3.5.2), and it expressed every other column in terms of them, with coefficients read off the reduced row echelon form. Recording both pieces of information as matrices gives a factorization.

Theorem 4.3.1 (Column–Row Factorization)

Let A∈Mm×n(F) have rank r≥1, with pivot columns j1<⋯<jr. Let C∈Mm×r(F) be the matrix whose columns are the pivot columns aj1,…,ajr of A, and let R∈Mr×n(F) consist of the first r rows of the reduced row echelon form of A, that is, its non-zero rows. Then A=CR. Moreover, the columns of C are linearly independent and the rows of R are linearly independent.

Idea. Column l of CR is C times column l of R, that is, a combination of the pivot columns of A with the entries of column l of the RREF as coefficients. For a pivot column the coefficients are a standard basis vector, and for a free column they are exactly the coefficients that Theorem 3.5.2 (b) provides. So the factorization is that theorem written as a matrix identity.

Proof. Let E be the RREF of A, with entries ekl. By Theorem 3.5.5, E has exactly r pivots, so its non-zero rows are rows 1,…,r. Fix a column index l. By Theorem 0.9.3, column l of CR is C(e1l⋮erl)=e1laj1+⋯+erlajr. Case 1: l=ji is a pivot column. By Lemma 3.3.3 (a), column ji of E is ei, so the combination is aji=al.

Case 2: l is a free column. Let t be the number of pivot columns to the left of l. For k>t, the leading entry of row k of E lies in column jk>l, so ekl=0. The combination is therefore e1laj1+⋯+etlajt, which equals al by Theorem 3.5.2 (b).

In both cases column l of CR is column l of A; hence A=CR. The columns of C form a basis of col(A) by Theorem 3.5.2 (a), so they are independent. The rows of R are the non-zero rows of E, which form a basis of row(A) by Theorem 3.5.3, so they are independent. This proves the theorem.

In words: every matrix of rank r is a “tall” matrix with independent columns times a “wide” matrix with independent rows, and the middle size is exactly r. The factorization cannot be squeezed further.

Proposition 4.3.2 (Rank as the size of the thinnest factorization)

Let A∈Mm×n(F) be non-zero. Then rankA is the smallest integer s≥1 such that A=BD for some B∈Mm×s(F) and D∈Ms×n(F).

Proof. Let r=rankA; then r≥1 since A≠0. By Theorem 4.3.1, a factorization with s=r exists. Conversely, suppose A=BD with B∈Mm×s(F). By Theorem 3.5.9, r=rank(BD)≤rankB, and rankB≤s because col(B) is spanned by s columns (Theorem 1.6.3). Hence r≤s.

This gives a second view of “row rank equals column rank”. Let A≠0, and let B be the matrix whose s=dim⁡col(A) columns form a basis of col(A). Each column aj of A is Bdj for its coordinate column dj (Theorem 0.9.3), so A=BD with D=(d1⋯dn). Then every row of A is a row of B times D, a combination of the s rows of D (Theorem 0.9.2 (3) and the row form of Theorem 0.9.3), so dim⁡row(A)≤s=dim⁡col(A). Applying the same argument to A⊤ gives the reverse inequality. In the language of maps, the factorization says that x↦Ax can be done in two steps, Fn→Fr→Fm: first a surjection onto a space of dimension r, then an injection.

Example (A column–row factorization)

Find the column–row factorization of A=(120324143617)∈M3×4(R).

Solution. Row reduce. Subtracting 2 times row 1 from row 2 and 3 times row 1 from row 3 gives rows (1,2,0,3), (0,0,1,−2), (0,0,1,−2). Subtracting row 2 from row 3 gives the RREF (1203001−20000). The pivot columns are columns 1 and 3, so r=2, and by Theorem 4.3.1 A=CR=(102131)(1203001−2). Check by rows: row 2 of CR is 2(1,2,0,3)+(0,0,1,−2)=(2,4,1,4), and row 3 is 3(1,2,0,3)+(0,0,1,−2)=(3,6,1,7). The last column of R says a4=3a1−2a3, and indeed 3(1,2,3)−2(0,1,1)=(3,4,7).

4.3.2. Equivalent matrices

Go back to the change-of-basis square for a map T:V→W (Theorem 4.2.3): [T]B′C′=[id]CC′[T]BC[id]B′B. When V≠W, nothing ties the basis of V to the basis of W. So the two outer matrices are unrelated invertible matrices, of sizes m×m and n×n. Any two matrices of the same map are related in this way, and this recurring shape deserves a name.

Two matrices are equivalent when they describe the same linear map, with the input basis and the output basis each changed freely.

Definition 4.3.1 (Equivalent matrices)

Let A,B∈Mm×n(F). We say A is equivalent to B if there exist invertible matrices Q∈Mm(F) and P∈Mn(F) such that B=QAP.

In words: we may multiply on the left by any invertible matrix and on the right by any invertible matrix, and the two need not be related. Both sizes are forced: Q acts on the m rows and P on the n columns. This is an equivalence relation on Mm×n(F): A=ImAIn; if B=QAP then A=Q−1BP−1; and if also C=Q′BP′, then C=(Q′Q)A(PP′), where products of invertible matrices are invertible by Theorem 0.9.7 (part 3).

Examples.

  • Row equivalence. If B is obtained from A by row operations, then B=EA with E invertible (Theorem 3.4.8), so A and B are equivalent with Q=E and P=In. Column operations correspond to multiplying on the right, and they are allowed too.
  • Similarity. If B=P−1AP, then A and B are equivalent, with Q=P−1.
  • The identity and a swap. I2 and S=(0110) are equivalent, since S=SI2I2. They are not similar, because I2 is similar only to itself.
  • Degenerate case. The zero matrix 0m×n is equivalent only to itself, since Q0P=0. It is the matrix of the zero map in every pair of bases.

Non-example by minimal change. Keep B=QAP but drop the requirement that Q be invertible. Then every matrix could be sent to the zero matrix with Q=0, and the relation would not even be symmetric: 0=0⋅I2⋅I2, but I2≠Q0P for any Q,P. The clause “invertible” is what makes QAP a change of basis rather than an arbitrary composition.

Warning. Equivalent is much weaker than similar. The matrices I2 and J=(1101) are equivalent, since J=JI2I2 and J is invertible, but they are not similar (see the warning in the previous section). For square matrices, “equivalent” allows a different change of basis on each side, and that freedom destroys almost all the structure an operator has.

How much structure survives? The rank does, since multiplying by invertible matrices does not change it (Theorem 3.5.9). The theorem below says that nothing else survives. The target is the simplest matrix of each rank.

For 0≤r≤min(m,n), let Nr∈Mm×n(F) be the block matrix Nr:=(Ir000), with 1 in positions (1,1),…,(r,r) and 0 everywhere else. Its first r columns are e1,…,er∈Fm, and its remaining columns are zero.

Theorem 4.3.3 (Rank Normal Form)
  • (a) Let V and W be finite-dimensional with dim⁡V=n and dim⁡W=m, and let T:V→W be linear of rank r. Then there are bases B of V and C of W such that [T]BC=Nr.
  • (b) Every A∈Mm×n(F) is equivalent to Nr, where r=rankA.
  • (c) Two matrices A,B∈Mm×n(F) are equivalent if and only if rankA=rankB.

Idea. Work backwards from the goal. [T]BC=Nr says: T sends the first r vectors of B to the first r vectors of C, and sends the last n−r vectors of B to 0. So ① the last n−r vectors of B should be a basis of kerT, and by Rank–Nullity that is exactly the right number; ② the first r vectors of B extend it to a basis of V; ③ their images are forced to be the first r vectors of C, and we must show they are independent, which follows by counting; ④ extend them to a basis of W. These are the bases of the proof of Rank–Nullity, one on each side.

Proof.

  • (a) By the Rank–Nullity Theorem (Theorem 2.3.1), dim⁡kerT=n−r. Let (ur+1,…,un) be a basis of kerT, a subspace of V by Theorem 2.2.1. By the Basis Extension Theorem (Theorem 1.6.5) there are u1,…,ur∈V such that B=(u1,…,ur,ur+1,…,un) is a basis of V; the new vectors may be listed first, since reordering a basis gives a basis. Put wi=Tui for i=1,…,r.

    By Theorem 2.2.4, imT=span(Tu1,…,Tun). Since Tuj=0 for j>r, removing these vectors does not change the span, so (w1,…,wr) spans imT. This list has length r=dim⁡imT, so it is a basis of imT by Theorem 1.6.4 (b); in particular it is linearly independent in W. By the Basis Extension Theorem there are wr+1,…,wm∈W such that C=(w1,…,wm) is a basis of W.

    Now read off the columns of [T]BC (Definition 4.1.1). For i≤r, Tui=wi, whose C-coordinate vector is ei. For j>r, Tuj=0, whose coordinate vector is 0. These are the columns of Nr.

  • (b) Let T:Fn→Fm, Tx=Ax, and let En, Em be the standard bases. The j-th column of [T]EnEm is [Aej]Em=Aej, the j-th column of A (Theorem 0.9.3), so [T]EnEm=A. By Theorem 4.1.5, rankT=rankA=r. Take B, C as in (a). By Theorem 4.2.3, Nr=[T]BC=[id]EmCA[id]BEn, and both outer matrices are invertible by Theorem 4.2.1 (c). Hence A is equivalent to Nr.

  • (c) (⇒) If B=QAP with Q,P invertible, then rankB=rankA by Theorem 3.5.9. (⇐) If rankA=rankB=r, then by (b) both A and B are equivalent to Nr. Since equivalence is symmetric and transitive, A is equivalent to B. This proves the theorem.

So the equivalence classes of Mm×n(F) are exactly the sets of matrices of rank r, for r=0,1,…,min(m,n): there are min(m,n)+1 of them, whatever the field. Every linear map between finite-dimensional spaces looks like “keep r coordinates and delete the rest” once the bases on both sides are chosen well. The right pair of bases makes any single map trivial.

Remark. Contrast this with operators. For T∈L(V) we must use one basis for input and output, and the relation becomes similarity. There the rank is far from the whole story: I2 and (1101) have the same rank but are not similar. Classifying operators up to a change of one basis is a much harder problem, answered in Chapter 10 by the Jordan and rational canonical forms.

The proof is also an algorithm. To find Q and P for a concrete matrix, compute a basis of nul(A), extend it, and take images.

Example (Bringing a 2×3 matrix to normal form)

Let A=(121243)∈M2×3(R). Find invertible Q∈M2(R) and P∈M3(R) with QAP=Nr.

Solution. Subtracting 2 times row 1 from row 2 gives (121001), so r=rankA=2, and the solutions of Ax=0 satisfy x3=0, x1=−2x2. Hence nul(A)=span((−2,1,0)), as Rank–Nullity predicts (3−2=1).

Following the proof, let u3=(−2,1,0), and extend with u1=e1, u2=e3. The list (e1,e3,u3) is independent: in ae1+be3+c(−2,1,0)=(a−2c,c,b)=0, the second and third entries give c=b=0, and then a=0. So it is a basis B of R3. The images are w1=Ae1=(1,2) and w2=Ae3=(1,3), which already form a basis C of R2 since r=m=2. Therefore P=[id]BE3=(10−2001010),Q=[id]E2C=(1123)−1=(3−1−21), using Theorem 4.2.1 (c) and Theorem 0.9.8. Check: AP=(110230) (the columns are w1, w2, 0), and QAP=(3−1−21)(110230)=(100010)=N2. The pair (Q,P) is far from unique; any choice of extension gives another.

Quick check. How many equivalence classes does M3×2(F) have, and which is the class of (122400)?

Solution. Ranks in M3×2(F) range over 0,1,2, so there are min(3,2)+1=3 classes by Theorem 4.3.3 (c). The given matrix is non-zero and its second column is twice the first, so its rank is 1, and it lies in the class of N1: all matrices of rank 1.

4.3.3. Rank inequalities for compositions

The rank of a composition cannot exceed the rank of either factor, and it cannot fall too far either. Both facts come from the same observation: ST is S applied to the subspace imT. For a subspace X⊆W and a linear map S:W→U, the restriction S|X:X→U, x↦Sx, is linear, since its values are those of S. Its kernel is kerS∩X.

Theorem 4.3.4 (Rank of a Composition)

Let T:V→W and S:W→U be linear, with V and W finite-dimensional. Then rank(ST)≤min(rankS,rankT).

Proof. Consider the restriction S′=S|imT:imT→U. For v∈V, (ST)(v)=S(Tv)=S′(Tv), so im(ST)⊆imS′; conversely every S′w with w=Tv∈imT equals (ST)(v). Hence im(ST)=imS′. Since imT is finite-dimensional (a subspace of W, Theorem 1.6.7), Rank–Nullity (Theorem 2.3.1) applied to S′ gives rank(ST)=dim⁡imS′=dim⁡imT−dim⁡kerS′≤rankT. Also im(ST)=imS′⊆imS, and imS is finite-dimensional by Rank–Nullity for S, so rank(ST)≤rankS by Theorem 1.6.7. This proves the theorem.

The lower bound uses the same restriction, but now we control its kernel instead of ignoring it.

Theorem 4.3.5 (Sylvester’s Rank Inequality)

Let T:V→W and S:W→U be linear, with V and W finite-dimensional. Then rank(ST)≥rankS+rankT−dim⁡W. In matrix form: for A∈Mm×n(F) and B∈Mn×p(F), rank(AB)≥rankA+rankB−n.

Idea. Of the rankT dimensions that reach W, the map S can destroy only those lying in kerS, and kerS has dimension dim⁡W−rankS. Rank–Nullity for the restriction S|imT turns this sentence into an inequality.

Proof. Let S′=S|imT, so that imS′=im(ST) as in the proof of Theorem 4.3.4, and kerS′=kerS∩imT⊆kerS. By Rank–Nullity for S′ and then for S, rankT=rank(ST)+dim⁡(kerS∩imT)≤rank(ST)+dim⁡kerS=rank(ST)+dim⁡W−rankS, where the inequality is Theorem 1.6.7. Rearranging gives the claim. For matrices, apply it to Sy=Ay on W=Fn and Tx=Bx on V=Fp: the matrix of ST in standard bases is AB by Theorem 4.1.2, and ranks of maps and matrices agree by Theorem 4.1.5.

If you worked Exercise (C1: A Lower Bound for the Rank of a Composite), you have seen this proof already; we record the result here as a theorem so that later arguments can cite it. A typical use: if AB=0 with A∈Mm×n(F) and B∈Mn×p(F), then 0≥rankA+rankB−n, that is, rankA+rankB≤n. For instance, there are no A,B∈M3(R) of rank 2 with AB=0.

Warning. The rank of a product depends on the order of the factors. For A=(1000) and B=(0100), AB=B has rank 1 but BA=0 has rank 0. Theorem 3.5.9 and Sylvester’s inequality bound rank(AB) from both sides; they do not determine it, and they say nothing that would make rank(AB)=rank(BA).

4.3.4. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define what it means for A,B∈Mm×n(F) to be equivalent.
  • (b) State the Rank Normal Form theorem for a matrix A∈Mm×n(F).
  • (c) True or false: equivalent square matrices are similar. Justify your answer.
  • (d) True or false: rank(AB)=rank(BA) for all A,B∈Mn(F). Justify your answer.
  • (e) How many equivalence classes does M2×5(F7) have?
  • (f) In the proof of the normal form for T:V→W, which vectors form the end of the basis of V, and which vectors form the start of the basis of W?

Solution.

  • (a) There are invertible Q∈Mm(F) and P∈Mn(F) with B=QAP (Definition 4.3.1).

  • (b) If r=rankA, there are invertible Q,P with QAP=(Ir000); and two m×n matrices are equivalent if and only if they have the same rank (Theorem 4.3.3).

  • (c) False. I2 and (1101) both have rank 2, so they are equivalent, but I2 is similar only to itself.

  • (d) False. With A=(1000) and B=(0100), rank(AB)=1 and rank(BA)=0.

  • (e) The possible ranks are 0,1,2, so there are 3 classes. The field plays no role.

  • (f) The last n−r vectors of the basis of V form a basis of kerT. The first r vectors of the basis of W are the images of the first r basis vectors of V, and they form a basis of imT.

B. Practice

Exercise (B1: A column–row factorization)

Find the column–row factorization of A=(1−1202−2511−131)∈M3×4(R). Hence write the second and fourth columns of A as combinations of its pivot columns.

Solution. Subtract 2 times row 1 from row 2 and row 1 from row 3: the rows become (1,−1,2,0), (0,0,1,1), (0,0,1,1). Subtract row 2 from row 3, and then 2 times row 2 from row 1: RREF=(1−10−200110000). The pivot columns are 1 and 3, so rankA=2, and by Theorem 4.3.1 A=(122513)(1−10−20011). Check by rows: 2(1,−1,0,−2)+5(0,0,1,1)=(2,−2,5,1) and (1,−1,0,−2)+3(0,0,1,1)=(1,−1,3,1); row 1 is (1,−1,0,−2)+2(0,0,1,1). Reading columns 2 and 4 of R: a2=−a1 and a4=−2a1+a3. Indeed −2(1,2,1)+(2,5,3)=(0,1,1)=a4.

Exercise (B2: Normal form of a rank-one matrix)

Let A=(1−12−22−4)∈M2×3(R). Find invertible Q∈M2(R) and P∈M3(R) such that QAP=(100000), following the proof of Theorem 4.3.3.

Solution. Row 2 is −2 times row 1, and A≠0, so rankA=1. The null space is {x1−x2+2x3=0}; setting the free variables x2,x3 to (1,0) and (0,1) gives the basis u2=(1,1,0), u3=(−2,0,1). Extend with u1=e1: in ae1+bu2+cu3=(a+b−2c,b,c)=0, the last two entries give b=c=0 and then a=0, so B=(e1,u2,u3) is a basis of R3. Its first image is w1=Ae1=(1,−2), which we extend to the basis C=((1,−2),e2) of R2 (independent, since a(1,−2)+b(0,1)=(a,−2a+b)=0 forces a=b=0). Then P=(11−2010001),Q=(10−21)−1=(1021). Check: AP has columns Ae1=(1,−2), Au2=0, Au3=0, and Q(1,−2)=(1,0). So QAP=(100000). Both Q and P are invertible by Theorem 4.2.1 (c).

Exercise (B3: Rank-one pieces)

Let A∈Mm×n(F).

  • (a) Use Theorem 4.3.1 to show that if rankA=1, then A=xy⊤ for some non-zero x∈Fm and y∈Fn.
  • (b) Show that if rankA=r≥1, then A is a sum of r matrices of rank 1, and that it is not a sum of fewer than r matrices of rank 1.
  • (c) Write (120324143617) as a sum of two rank-one matrices.

Solution.

  • (a) With r=1, C∈Mm×1(F) is a single column x, and R∈M1×n(F) is a single row, which we write as y⊤ with y∈Fn. So A=xy⊤. Both are non-zero: the columns of C and the rows of R are linearly independent by Theorem 4.3.1, and a list containing a zero vector is dependent. (This recovers one direction of Exercise (C2: Matrices of rank one).)

  • (b) Write A=CR with columns c1,…,cr of C and rows r1,…,rr of R, and let cik, rkl be the entries of C, R. The m×n matrix ckrk has (i,l)-entry cikrkl, so by Theorem 0.9.2 (1), (CR)il=∑k=1rcikrkl=∑k=1r(ckrk)il,that is,A=c1r1+⋯+crrr. Each ckrk has rank 1 by the (⇐) direction of Exercise (C2: Matrices of rank one), since ck≠0 (a column of C, whose columns are independent) and rk≠0 (a row of R, whose rows are independent). If A=A1+⋯+As with each rankAi=1, then by Exercise (C1: Rank of a sum) applied repeatedly, r=rankA≤rankA1+⋯+rankAs=s.

  • (c) By Example (A column–row factorization), A=CR with C=(102131) and R=(1203001−2), so A=(123)(1203)+(011)(001−2)=(120324063609)+(0000001−2001−2).

C. Going deeper

Exercise (C1: Frobenius’s rank inequality)

Let A∈Mm×n(F), B∈Mn×p(F) and C∈Mp×q(F). Write N=nul(A)⊆Fn, and let S:Fn→Fm be Sy=Ay.

  • (a) Show that col(AB)={Ay:y∈col(B)}, and deduce from Rank–Nullity for S|col(B) that rank(AB)=rankB−dim⁡(N∩col(B)).
  • (b) Show similarly that rank(ABC)=rank(BC)−dim⁡(N∩col(BC)).
  • (c) Prove that col(BC)⊆col(B), and deduce Frobenius’s inequality rank(ABC)+rankB≥rank(AB)+rank(BC).
  • (d) Deduce Sylvester’s inequality for matrices from (c).

Hint: for (d), look for a special choice of the middle factor.

Solution.

  • (a) By Theorem 0.9.2, every vector ABx equals Ay with y=Bx∈col(B); conversely every y∈col(B) is Bx for some x, and then Ay=(AB)x∈col(AB). So col(AB)=im(S|col(B)). The kernel of S|col(B) is N∩col(B), and col(B) is finite-dimensional, so by Theorem 2.3.1, rankB=dim⁡col(B)=rank(AB)+dim⁡(N∩col(B)).

  • (b) The same argument with BC in place of B gives col(ABC)=im(S|col(BC)), with kernel N∩col(BC), so rank(BC)=rank(ABC)+dim⁡(N∩col(BC)).

  • (c) Every vector BCx=B(Cx) lies in col(B), so col(BC)⊆col(B). Hence N∩col(BC)⊆N∩col(B), and by Theorem 1.6.7, dim⁡(N∩col(BC))≤dim⁡(N∩col(B)). By (b) and then (a), rank(ABC)=rank(BC)−dim⁡(N∩col(BC))≥rank(BC)−dim⁡(N∩col(B))=rank(BC)−rankB+rank(AB). Rearranging gives Frobenius’s inequality.

  • (d) Let A∈Mm×n(F) and C∈Mn×q(F), and apply (c) with p=n and B=In. Then rank(AC)+n≥rankA+rankC, since rankIn=n. This is Theorem 4.3.5 for matrices.

Exercise (C2: Counting over F2)
  • (a) Show that M2(F2) contains exactly 1 matrix of rank 0, 6 of rank 2 and 9 of rank 1.
  • (b) Deduce the sizes of the equivalence classes of M2(F2).
  • (c) Compare with similarity: how many matrices of M2(F2) are similar to I2? Is the class of I2 under equivalence a union of several similarity classes?

Solution.

  • (a) The only matrix of rank 0 is 0. A matrix has rank 2 exactly when its two columns span F22, that is (Theorem 1.6.4), when they form a basis of F22. The first column can be any of the 3 non-zero vectors of F22. The second must lie outside the span of the first, which has 2 elements, so there are 4−2=2 choices. That gives 3⋅2=6 matrices of rank 2. Since |M2(F2)|=24=16, the remaining 16−1−6=9 matrices have rank 1.

  • (b) By Theorem 4.3.3 (c), the classes are the sets of matrices of a fixed rank, of sizes 1, 9 and 6.

  • (c) I2 is similar only to itself, so its similarity class has 1 element, while its equivalence class, the invertible matrices, has 6. Since similar matrices are equivalent, each equivalence class is a union of similarity classes, and here the class of the 6 invertible matrices contains the similarity class {I2} together with others. For example (1101) is invertible but not similar to I2, so there are at least two similarity classes inside.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.