In this section we discuss a very important numerical invariant associated with a linear transformation and to a matrix: itsrank. All vector spaces over the fieldF will be assumed to be finite dimensional in this section.
Definition 5.48. LetV; W be finite dimensional vector spaces overF. Therankof a linear mapT WV !W is the integer
rank.T /Ddim Im.T /:
Let us try to understand more concretely the previous definition. LetT WV !W be a linear transformation and letv1; : : : ;vnbe a basis ofV. Then the elements of Im.T /are of the formT .v/withv2V. Sincev1; : : : ;vnspanV, eachv2V can be writtenvDx1v1C: : :Cxnvnwithxi 2F, and
T .v/DT .x1v1C: : :Cxnvn/Dx1T .v1/C: : :CxnT .vn/:
ThusT .v1/; : : : ; T .vn/is a spanning set for Im.T /and rank.T /Ddim Span.T .v1/; : : : ; T .vn//:
Since we have already seen an algorithmic way of computing the span of a finite family of vectors (using row-reduction, see the discussion preceding Example4.30), this gives an algorithmic way of computing the rank of a linear transformation.
More precisely, pick a basis w1; : : : ;wm of W and express each of the vectors T .v1/; : : : ; T .vn/ as linear combinations of w1; : : : ;wm. Consider the matrix A whose rows are the coordinates of T .v1/; : : : ; T .vn/when expressed in the basis w1; : : : ;wm of W. Performing elementary operations on the rows of A does not change the span ofT .v1/; : : : ; T .vn/, so that rank.T /is the dimension of the span of the rows ofAref, then reduced row-echelon form ofA. On the other hand, it is very easy to compute the last dimension: by definition of the reduced row-echelon form, the dimension of the span of the rows of Aref is precisely the number of nonzero rows inAref or, equivalently, the number of pivots inAref. Thus
rank.T /Dnumber of nonzero rows ofAref Dnumber of pivots inAref: Let us see two concrete examples:
Problem 5.49. Compute the rank of the linear mapT WR3!R4defined by T .x; y;z/D.xCyCz; xy; yz;zx/:
Solution. We letv1;v2;v3be the canonical basis ofR3and compute T .v1/DT .1; 0; 0/D.1; 1; 0;1/;
thus the first row of the matrixAin the previous discussion is.1; 1; 0;1/. We do the same withv2;v3and we obtain
AD 2
41 1 0 1 11 1 0 1 0 1 1
3 5:
Using row-reduction we compute
Aref D 2
41 0 0 0 0 1 01 0 0 11
3 5 and we deduce that
rank.T /D3:
Problem 5.50. LetV be the space of polynomials with real coefficients of degree not exceeding3, and letT WV !V be the linear map defined by
T .P .X //DP .XC1/P .X /:
Find rank.T /.
Solution. We start by choosing the canonical basis 1; X; X2; X3 of V and computing
T .1/D0; T .X /DXC1X D1; T .X2/D.XC1/2X2D1C2X and
T .X3/D.XC1/3X3D1C3XC3X2: The matrixAin the previous discussion is
AD 2 66 4
0 0 0 0 1 0 0 0 1 2 0 0 1 3 3 0
3 77 5
and row-reduction yields
Aref D 2 66 4
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0
3 77 5:
There are three pivots, thus
rank.T /D3:
We turn now to a series of more theoretical exercises, which establish some other important properties of the rank of a linear map. In all problems below we assume that the vector spaces appearing in the statements are finite dimensional.
Problem 5.51. LetT WV !W be a linear map. Prove that rank.T /min.dimV;dimW /:
Solution. Since Im.T / W, we have rank.T / dimW. As we have already seen, ifv1; : : : ;vnis a basis ofV, then Im.T /is spanned byT .v1/; : : : ; T .vn/, thus
rank.T /nDdimV:
The result follows by combining the two inequalities.
Problem 5.52. LetT1WU !V andT2WV !W be linear maps. Prove that rank.T2ıT1/min.rank.T1/;rank.T2//:
Solution. The image of T2ıT1 is included in that ofT2, thus rank.T2ıT1/ rank.T2/. Next, we consider the restrictionT20of T2to Im.T1/, obtaining a linear mapT20 W Im.T1/ ! W whose image clearly equals that of T2ı T1. Applying Problem5.51toT20we obtain
rank.T2ıT1/Drank.T20/dim.Im.T1//Drank.T1/;
and the result follows.
Problem 5.53. LetT1; T2 WV !W be linear transformations. Prove that jrank.T1/rank.T2/j rank.T1CT2/rank.T1/Crank.T2/:
Solution. We have Im.T1CT2/Im.T1/CIm.T2/and so rank.T1CT2/dim.Im.T1/CIm.T2//
dim Im.T1/Cdim Im.T2/Drank.T1/Crank.T2/;
establishing the inequality on the right. On the other hand, we clearly have Im.T2/D Im.T2/, thus rank.T2/D rank.T2/. Applying what we have already proved, we obtain
rank.T1CT2/Crank.T2/Drank.T1CT2/Crank.T2/rank.T1/;
thus rank.T1CT2/rank.T1/rank.T2/. We conclude using the symmetry inT1
andT2.
Problem 5.54. Prove that ifS1WU !V,T WV !W andS2WW !Zare linear maps such thatS1; S2are bijective, then
rank.S2T S1/Drank.T /:
Solution. SinceS1is bijective, we have
.T S1/.U /DT .S1.U //DT .V /DIm.T /:
Since S2 is bijective, it realizes an isomorphism between .T S1/.U / and S2..T S1/.U //, thus these two spaces have the same dimension. We conclude that
rank.T /Ddim Im.T /Ddim.T S1/.U /D DdimS2..T S1/.U //Ddim.S2T S1/.U /Drank.S2T S1/:
Note that we only used the injectivity ofS1and the surjectivity ofS2.
We will now prove the first fundamental theorem concerning the rank of a linear map:
Theorem 5.55 (The Rank-Nullity Theorem). LetV; W be vector spaces over a fieldF and letT WV !W be a linear transformation. IfV is finite-dimensional, then
dim kerTCrank.T /DdimV: (5.3)
Proof. Letn D dimV and letr D dim kerT. Since kerT is a subspace ofV, we haver n, in particularr <1. We need to prove that dim ImT Dnr.
Letv1; : : : ;vr be a basis of kerT and extend it to a basisv1; : : : ;vnofV. We will prove thatT .vrC1/; : : : ; T .vn/form a basis of Im.T /, which will yield the desired result.
Let us start by proving that T .vrC1/; : : : ; T .vn/ are linearly independent.
Suppose thatarC1; : : : ; anare scalars inF such that arC1T .vrC1/C: : :CanT .vn/D0:
This equality can be written as T .arC1vrC1 C: : :Canvn/ D 0, or equivalently arC1vrC1C: : :Canvn2kerT. We can therefore write
arC1vrC1C: : :CanvnDb1v1C: : :Cbrvr
for some scalarsb1; : : : ; br 2 F. But sincev1; : : : ;vnform a basis ofV, the last relation forcesarC1 D : : : D an D 0 andb1 D : : : D br D 0, proving that T .vrC1/; : : : ; T .vn/are linearly independent.
Next, we prove that T .vrC1/; : : : ; T .vn/ span Im.T /. Let x 2 Im.T /. By definition, there isv2V such thatxDT .v/. Sincev1; : : : ;vnspanV, we can find scalarsa1; : : : ; an 2F such thatvDa1v1C: : :Canvn. Sincev1; : : : ;vr 2kerT, we obtain
xDT .v/D Xn iD1
aiT .vi/D Xn iDrC1
aiT .vi/2Span.T .vrC1/; : : : ; T .vn//:
This finishes the proof of the theorem.
Corollary 5.56. Let V be a finite-dimensional vector space over a field F and let T W V ! V be a linear transformation. Then the following assertions are equivalent:
a) T is injective.
b) T is surjective.
c) T is bijective.
Proof. Suppose that a) holds. Then the rank-nullity theorem and the fact that kerT D 0 yield dim Im.T / D dimV. Since Im.T /is a subspace of the finite- dimensional vector spaceV and dim Im.T /DdimV, we deduce that Im.T /DV and soT is surjective, thus b) holds.
Suppose now that b) holds, thus dim Im.T /DdimV. The rank-nullity theorem yields dim kerT D 0, thus kerT D 0 and then T is injective. Since it is also surjective by assumption, it follows that c) holds. Since c) clearly implies a), the
result follows.
Remark 5.57. Without the assumption thatV is finite dimensional, the previous result no longer holds: one can find linear transformationsT W V ! V which are injective and not surjective, and linear transformations which is surjective and not injective. Indeed, letV be the space of all sequences.xn/n0 of real numbers and define two mapsT1; T2WV !V by
T1.x0; x1; : : :/D.x1; x2; : : :/; T2.x0; x1; : : :/D.0; x0; x1; : : :/:
ThenT1is surjective but not injective, andT2is injective but not surjective.
Problem 5.58. LetAandBbennmatrices such thatABis invertible. Show that bothAandBare invertible.
Solution. LetT1 W Fn ! Fn andT2 W Fn ! Fn be the linear maps associated withAandB respectively (soT1.X /D AX andT2.X / D BX). ThenAB is the matrix of the linear mapT1 ıT2 with respect to the canonical basis of Fn (both on the source and on the target). SinceAB is invertible, we deduce thatT1ıT2is bijective, henceT2 is injective andT1 is surjective. But an injective or surjective linear transformation on a finite dimensional vector space is automatically bijective.
ThusT1andT2are both bijective and the result follows from Problem5.37.
Problem 5.59. LetA; B2Mn.C/satisfyAB DIn. Prove thatBADIn.
Solution. By the previous problem,AandBare invertible. Multiplying the relation AB DInon the right byA1yieldsBDA1. ThusBADA1ADIn. Problem 5.60. Show that ifAandB are square matrices inMn.C/withAB D ACB, thenABDBA.
Solution. The conditionAB DACBimplies.AIn/.BIn/DIn. Therefore AInandBInare mutually inverse and.BIn/.AIn/DIn, which implies
BADACBDAB.
Problem 5.61. LetT WR3!R3be the linear transformation defined by T .x; y;z/D.xy; 2xyz; x2yCz/:
Find the kernel ofT and the rank ofT.
Solution. In order to find the kernel ofT, we need to find thosex; y;z2R3such that
xyD0; 2xyzD0; x2yCzD0:
The first equation givesx D y, the second onezD xand sox D y D z, which satisfies all equations. It follows that the kernel ofT is the subspacef.x; x; x/jx 2 R3g, which is precisely the line spanned by the vector.1; 1; 1/.
Next, then rank ofT can be determined from the rank-nullity theorem:
3DdimR3Ddim kerTCrank.T /D1Crank.T /;
thus rank.T /D2.
We turn now to the analogous concept for matrices
Definition 5.62. LetA2Mm;n.F /. TherankofAis the integer rank.A/defined as the rank of the linear mapFn!FmsendingXtoAX(i.e., the canonical linear map attached toA).
Remark 5.63. We can restate the results established in Problems5.51,5.52,5.53, and5.54in terms of matrices as follows:
a) rank.A/min.m; n/ifA2Mm;n.F /.
b) jrank.A/rank.B/j rank.AC B/ rank.A/C rank.B/ for all A; B 2 Mm;n.F /.
c) rank.PAQ/Drank.A/for allP 2GLm.F /,A2Mm;n.F /andQ2 GLn.F /.
That is,the rank of a matrix does not change if we multiply it (on the left or on the right) by invertible matrices.
d) rank.AB/min.rank.A/;rank.B//forA2Mm;n.F /andB2Mn;p.F /.
Of course, we can also make the definition very concrete: letA2Mm;n.F /and lete1; e2; : : : ; enbe the canonical basis ofFn. Write' W Fn ! Fm for the linear mapX !AX canonically attached toA. By the previous discussion Im.'/is the span of'.e1/; : : : ; '.en/. Now, ifC1; : : : ; Cnare the columns ofA, seen as column vectors inFm, then by definition'.ei/DCi for alli. We conclude that the image of'is the span ofC1; : : : ; Cn.
Let us summarize the previous discussion in an important
Theorem 5.64. LetA 2 Mm;n.F /and letC1; C2; : : : ; Cn 2 Fm be its columns.
Then
rank.A/Ddim Span.C1; C2; : : : ; Cn/:
So, following the previous discussion, we obtain the following algorithm for computing the rank ofA: considerthe transpose tAof A (thus the columns of Abecome rows in the new matrix) and bring it to its reduced row-echelon form.
Then count the number of nonzero rows or equivalently the number of pivots.
This is the rank of A. We will see later on (see Problem5.70) that the trick of considering the transpose ofAis actually not necessary:Aand tAhave the same rank. Of course, we can also avoid considering the transpose matrix and instead using column operations onA.
Problem 5.65. Compute the rank of the matrix
AD 2 66 66 64
1 1 0 1 2 2 1 0 0 211 1 1 1 2 1 31 1
3 77 77 75 :
Solution. Following the previous discussion we bring the matrix
tAD 2 66 4
1 2 0 1 1 1 2 2 1 3 0 11 1 1 1 012 1
3 77 5
to its reduced row-echelon form by row-reduction
.tA/ref D 2 66 4
1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 11
3 77 5:
Since there are4nonzero rows, we deduce that rank.A/D4:
Problem 5.66 (Sylvester’s Inequality). Prove that for allA; B 2Mn.F /we have
rank.AB/rank.A/Crank.B/n:
Solution. Consider V D Fn and the linear transformations T1; T2 W V ! V sendingX toAX, respectivelyBX. We need to prove that
rank.T1ıT2/rank.T1/Crank.T2/dimV:
By the rank-nullity theorem we know that
rank.T1/dimV D dim kerT1; thus it suffices to prove that
rank.T2/rank.T1ıT2/dim kerT1: