3.5  Row Space, Column Space, Null Space and Rank

We can now reduce any matrix and read off the solutions of any linear system. This section asks a coarser question: how much information does a matrix carry? Three subspaces come attached to every matrix A: the vectors Ax it can produce, the combinations of its rows, and the vectors it sends to zero. Their dimensions are governed by a single number, the rank, which is the number of pivots. With it we settle when a system is solvable and how many solutions it has, and we turn the questions of Chapter 1 about vectors in Fm (independent? spanning? a basis of a sum or an intersection?) into a routine computation, which is the “systematic method” that Chapter 1 promised.

Throughout, F is a field and A∈Mm×n(F) has columns a1,…,an∈Fm.

3.5.1. Three subspaces of a matrix

Here is the matrix we will follow through the section: A=(1200−1241001211200113)∈M4×5(R). Three questions about it have come up in this chapter, and each answer is a set. For which b∈R4 can we solve Ax=b? By Theorem 3.1.1, exactly for b in the span of the columns. Which x∈R5 solve Ax=0? By Theorem 3.1.2, a subspace of R5. And which new equations can we derive from the four by adding multiples of them? Their left-hand sides are exactly the combinations of the rows. These three sets recur so often that they get names.

The column space is everything A can produce, the null space is everything A kills, and the row space is every left-hand side we can build from the equations of Ax=b.

Definition 3.5.1 (Column space)

The column space of A∈Mm×n(F) is the span of its columns, col(A):=span(a1,…,an)={Ax:x∈Fn}⊆Fm.

Definition 3.5.2 (Row space)

The row space of A∈Mm×n(F) is the span of its rows, row(A):=span(row 1,…,row m)⊆M1×n(F).

Definition 3.5.3 (Null space)

The null space of A∈Mm×n(F) is the solution set of the homogeneous system, nul(A):={x∈Fn:Ax=0}⊆Fn.

In words: col(A) lives among the outputs, in Fm (one entry per row); nul(A) lives among the inputs, in Fn (one entry per column); and row(A) consists of row vectors of length n. The two descriptions of col(A) agree by Theorem 0.9.3: Ax=x1a1+⋯+xnan, and as x runs over Fn these are all the combinations of the columns.

Well-definedness. All three are subspaces. col(A) and row(A) are spans, hence subspaces by Theorem 1.3.1, of Fm and of M1×n(F) respectively. nul(A) is a subspace of Fn by Theorem 3.1.2. The row vectors M1×n(F) form an n-dimensional space, with the standard basis e1⊤,…,en⊤ (Example (Dimensions of the Running Examples)). Transposing turns row vectors into columns and respects sums and scalar multiples (Theorem 0.9.5), so it sends a combination of rows to the same combination of their transposes, and only the zero row transposes to 0. The transposes of the rows of A are the columns of A⊤. Hence transposing sends row(A) onto col(A⊤), a list of rows is independent exactly when the list of their transposes is, and transposing a basis of row(A) gives a basis of col(A⊤). Therefore (∗)dim⁡row(A)=dim⁡col(A⊤).

Examples.

  • The identity. col(In)=Fn, since the columns e1,…,en span; row(In)=M1×n(F); and nul(In)={0}, since Inx=x.
  • The zero matrix is the degenerate case. For 0=0m×n, col(0)=span(0,…,0)={0}, row(0)={0}, and nul(0)=Fn, since every x is killed. It carries no information, and its column space is as small as possible while its null space is as large as possible. We will see that this trade-off is exact.
  • A single row. For A=(11−1)∈M1×3(R), the columns are the scalars 1,1,−1∈R1, so col(A)=R1, row(A)=span((11−1)) is a line of row vectors, and nul(A) is the plane x+y−z=0 in R3.

Non-example by minimal change. Replace 0 by a non-zero right-hand side: the solution set {x∈Fn:Ax=b} with b≠0. It is described by the same equations, and it is still of the form p+nul(A) when non-empty (Theorem 3.1.3). But it does not contain 0, since A0=0≠b, so it fails the first condition of Theorem 1.2.1.

Warning. The three spaces live in different places. For A∈M4×5(R) above, col(A)⊆R4 but nul(A)⊆R5, so a statement such as “nul(A)⊆col(A)” does not even make sense. Keep track by size: Ax needs x with n entries and returns a vector with m entries.

3.5.2. Rank and nullity

The column space measures how much A can reach, and the null space how much it collapses. We measure each by its dimension. Both are subspaces of finite-dimensional spaces, so both have a dimension by Theorem 1.6.7.

The rank counts the independent directions that A can produce.

Definition 3.5.4 (Rank of a matrix)

The rank of A∈Mm×n(F) is rankA:=dim⁡col(A).

Definition 3.5.5 (Nullity of a matrix)

The nullity of A∈Mm×n(F) is nullityA:=dim⁡nul(A).

From the examples above: rankIn=n and nullityIn=0; rank0m×n=0 and nullity0m×n=n; and rank(11−1)=1, with nullity 2. In each case rank plus nullity equals the number of columns. Two simple bounds hold at once: rankA≤m, because col(A)⊆Fm, and rankA≤n, because col(A) is spanned by n vectors (Theorem 1.6.3). Why define rank through columns and not rows? We could have, and one of the main theorems of this section says the answer would be the same.

3.5.3. What row operations preserve

To compute these spaces we will row reduce. So we first ask what a row operation does to each of them. Recall from Theorem 3.4.8 that A is row equivalent to B exactly when B=EA with E∈Mm(F) invertible; since row equivalence is symmetric (Theorem 3.2.2 (b)), we may simply say that A and B are row equivalent.

Theorem 3.5.1 (Row operations and the three spaces)

Let A,B∈Mm×n(F) be row equivalent. Then:

  • (a) row(B)=row(A);
  • (b) nul(B)=nul(A). Equivalently, writing b1,…,bn for the columns of B: for all c1,…,cn∈F, the columns of A satisfy c1a1+⋯+cnan=0 if and only if the columns of B satisfy c1b1+⋯+cnbn=0;
  • (c) but col(B) and col(A) need not be equal.

Proof.

  • (a) Write B=EA with E invertible, by Theorem 3.4.8. By Theorem 0.9.2, row i of EA is (row i of E)A, which by Theorem 0.9.3 (rows version) is a combination of the rows of A. So every row of B lies in row(A), and row(B)⊆row(A) by Proposition 1.3.4 (1). Since A=E−1B with E−1 invertible, the same argument gives row(A)⊆row(B).

  • (b) The equality nul(B)=nul(A) is Lemma 3.3.1. By Theorem 0.9.3, c1a1+⋯+cnan=Ac and c1b1+⋯+cnbn=Bc with c=(c1,…,cn), so the second statement is the first one written out (this is Lemma 3.3.2).

  • (c) Let A=(1111)∈M2(R) and B=(1100), obtained by R2→R2−R1. Then col(A)=span((1,1)) and col(B)=span((1,0)). These lines differ, since (1,0) is not a multiple of (1,1).

So row reduction keeps the row space and the relations among the columns, but it moves the columns themselves.

Warning. Do not read col(A) off the reduced form. In (c) above, the RREF of A is B, whose column space is the x-axis, while col(A) is the line y=x. What survives row reduction is the pattern of dependence: in both matrices column 2 equals column 1. So we use the RREF to decide which columns to take, and then take those columns from A.

3.5.4. Bases from the reduced form

Fix the notation for the rest of the section. Let R=(rkj) be the reduced row echelon form of A (Theorem 3.2.3, Theorem 3.3.4), with columns r1,…,rn∈Fm. Let R have r non-zero rows, and let the pivot of row k lie in column jk, so that j1<j2<⋯<jr. These are the pivot columns of A, well defined by Corollary 3.3.5. The remaining columns are the free columns. We use three facts from Definition 3.2.4:

  • rows r+1,…,m of R are zero;
  • column jk of R is ek (the pivot is 1 and the only non-zero entry of its column);
  • in row k, every entry to the left of the pivot is 0.

From the last two, if column j of R has exactly t pivot columns to its left, then every entry of rj in rows t+1,…,m is zero, except the pivot entry of row t+1 when j=jt+1. Indeed, for k≥t+1, row k is either zero or has its pivot in column jk≥j, and entries to the left of a pivot vanish. In the running example, R=(1200−1001020001100000), with r=3, pivot columns 1,3,4 and free columns 2,5 (the reduction is carried out in Example (Bases for the running example) below).

The column space comes first. In R the answer is visible: the pivot columns are e1,…,er, and every column has zeros below row r. Row reduction does not preserve columns, but by Theorem 3.5.1 (b) it preserves every linear relation among them, and “is a basis” and “equals this combination” are statements about relations.

Theorem 3.5.2 (Pivot columns form a basis of the column space)

Let A∈Mm×n(F) have pivot columns j1<⋯<jr, and let R=(rkj) be its RREF. Then:

  • (a) the pivot columns of A, (aj1,…,ajr), form a basis of col(A);
  • (b) if column j is free and t pivot columns lie to its left, then aj=r1jaj1+⋯+rtjajt;
  • (c) the pivot columns of A are exactly the vectors kept when (a1,…,an) is sifted as in Theorem 1.5.4.

Idea. Both claims are statements about linear relations among columns, so by Theorem 3.5.1 (b) it suffices to prove them for R, where they can be seen by inspection. The pivot columns of R are e1,…,er, which are independent. A free column of R is ∑krkjek, a combination of the pivot columns to its left with its own entries as coefficients. So we transfer two relations back to A: “∑ckajk=0 forces c1=⋯=cr=0” and “aj−∑krkjajk=0”. Part (c) is a rereading of Corollary 3.3.5.

Proof. Throughout, we use Theorem 3.5.1 (b) in the form: for scalars c1,…,cn, (†)c1a1+⋯+cnan=0⟺c1r1+⋯+cnrn=0.

  • (b) Let column j be free, with t pivot columns j1,…,jt to its left. By the fact in bold before the theorem, the entries of rj in rows t+1,…,m are zero, so rj=r1je1+⋯+rtjet=r1jrj1+⋯+rtjrjt, since rjk=ek. This is a linear relation among the columns of R with coefficient 1 on rj, −rkj on rjk, and 0 elsewhere. By (†), the columns of A satisfy the same relation, which is (b).

  • (c) Spanning. Each pivot column ajk lies in span(aj1,…,ajr), and each free column does by (b). Hence col(A)=span(a1,…,an)⊆span(aj1,…,ajr) by Proposition 1.3.4 (1). The reverse inclusion holds by Proposition 1.3.4 (2), since the pivot columns are among the columns.

Independence. Let c1aj1+⋯+crajr=0. This is a relation among all the columns of A with coefficient 0 on the free columns. By (†), c1rj1+⋯+crrjr=c1e1+⋯+crer=0. The k-th entry of the left side is ck, so c1=⋯=cr=0. Hence the pivot columns of A are linearly independent, and with spanning they form a basis of col(A) by Definition 1.5.1.

  • (c) By Corollary 3.3.5 (a), column j is a pivot column if and only if aj∉span(a1,…,aj−1). Sifting keeps aj exactly when aj is not in the span of the vectors kept before it, and by Theorem 1.5.4 (applied to (a1,…,aj−1)) that span is span(a1,…,aj−1). Hence the kept vectors are exactly the pivot columns. This proves the theorem.

This is sifting (Theorem 1.5.4) done by elimination. In Chapter 1, each step “is vj in the span of the vectors kept so far?” was a separate small system. One row reduction answers all of them at once, and part (b) even gives the coefficients.

The row space and the null space are read off R directly.

Theorem 3.5.3 (Basis of the row space)

The non-zero rows of the RREF R of A form a basis of row(A).

Proof. By Theorem 3.5.1 (a), row(A)=row(R). The zero rows of R contribute nothing to a combination, so the r non-zero rows span row(R). For independence, let c1(row 1)+⋯+cr(row r)=0. Look at the entry in column jk: since column jk of R is ek, only row k has a non-zero entry there, equal to 1. So that entry of the combination is ck, and ck=0 for each k. Hence the non-zero rows are a basis of row(A).

For the null space, each free variable gets one basis vector: set that free variable to 1, the other free variables to 0, and solve for the pivot variables.

Theorem 3.5.4 (Basis of the null space)

Let A∈Mm×n(F) have RREF R=(rkj) with pivot columns j1<⋯<jr. For each free column f, define sf∈Fn by (sf)f=1,(sf)f′=0 for every other free f′,(sf)jk=−rkf for k=1,…,r. Then the vectors sf, one for each free column f, form a basis of nul(A). In particular nullityA=n−r, the number of free columns.

Proof. By Theorem 3.5.1 (b), nul(A)=nul(R). For k≤r, row k of R has entry 1 in column jk, entry 0 in every other pivot column (since column jk′ is ek′), and entries rkf in the free columns. Rows k>r are zero. Hence Rx=0 is equivalent to the r equations (‡)xjk=−∑f freerkfxf(k=1,…,r). Spanning. Let x∈nul(A), and put y=∑f freexfsf. For a free column f, the f-th entry of y is xf, since sf has a 1 there and the other sf′ have 0. For a pivot column, the jk-th entry of y is ∑fxf(−rkf), which equals xjk by (‡). So x=y lies in the span of the sf. Each sf itself satisfies (‡), so it lies in nul(A).

Independence. If ∑fcfsf=0, then the f-th entry of the left side is cf, so every cf=0.

Hence the sf form a basis of nul(A), and there are n−r of them.

Example (Bases for the running example)

Find bases of col(A), row(A) and nul(A), and the rank and nullity, for A=(1200−1241001211200113)∈M4×5(R).

Solution. Row reduce: A→R3→R3−R1R2→R2−2R1(1200−1001020011300113)→R4→R4−R2R3→R3−R2(1200−1001020001100011)→R4→R4−R3R=(1200−1001020001100000). The pivot columns are 1,3,4, and the free columns are 2,5.

Column space. By Theorem 3.5.2 (a), the pivot columns of A, a1=(1,2,1,0),a3=(0,1,1,1),a4=(0,0,1,1), form a basis of col(A), so rankA=3. By part (b), the free columns are a2=2a1 (from column 2 of R) and a5=−a1+2a3+a4 (from column 5). Check: −(1,2,1,0)+2(0,1,1,1)+(0,0,1,1)=(−1,0,2,3)=a5. Note that col(A)≠col(R): every column of R has last entry 0, but a3 does not.

Row space. By Theorem 3.5.3, a basis is (1200−1),(00102),(00011), so dim⁡row(A)=3.

Null space. The equations (‡) read x1=−2x2+x5, x3=−2x5, x4=−x5. By Theorem 3.5.4, a basis is s2=(−2,1,0,0,0),s5=(1,0,−2,−1,1), so nullityA=2. Check: As2=−2a1+a2=0 and As5=a1−2a3−a4+a5=0, which are the two relations found above.

So rankA=dim⁡row(A)=3 and rankA+nullityA=5, the number of columns.

Quick check. Without computing anything, what is the largest possible rank of a 3×5 matrix, and the smallest possible nullity?

Solution. rankA=dim⁡col(A)≤3, since col(A)⊆F3. By Theorem 3.5.4, the nullity is the number of free columns, 5−r, where r≤3 is the number of pivots (one per non-zero row). So the nullity is at least 2. For example (I303×2) attains rank 3 and nullity 2.

3.5.5. Row rank equals column rank

The example came out with dim⁡row(A)=dim⁡col(A). This is not luck, and it is surprising: the row space and the column space live in different spaces, and the rows and columns of a 4×5 matrix have nothing obvious in common. Counting pivots explains it.

Theorem 3.5.5 (Row rank equals column rank)

Let A∈Mm×n(F), and let r be the number of pivots of its RREF. Then dim⁡row(A)=dim⁡col(A)=r. Consequently rankA=rankA⊤.

Proof. By Theorem 3.5.2 (a), col(A) has a basis consisting of the r pivot columns, so dim⁡col(A)=r. By Theorem 3.5.3, row(A) has a basis consisting of the non-zero rows of the RREF. Each non-zero row contains exactly one pivot and each pivot lies in a non-zero row, so there are r of them, and dim⁡row(A)=r. Finally, by (∗) at the start of this section, rankA⊤=dim⁡col(A⊤)=dim⁡row(A)=r=rankA.

The theorem makes the rank independent of which echelon form we compute. Gaussian elimination without the final clearing-up phase produces an echelon form that is not reduced, and different sequences of operations produce different echelon forms. They all give the same count.

Corollary 3.5.6 (Rank from any echelon form)

Let A∈Mm×n(F), and let G be a matrix in row echelon form that is row equivalent to A. Then the number of non-zero rows of G is rankA, and the columns of G containing its pivots are exactly the pivot columns of A.

Proof. By Corollary 3.3.5 (b), the pivot columns of G are the pivot columns of A. Each non-zero row of G has exactly one pivot, in a different column (Definition 3.2.3), so the number of non-zero rows of G equals the number of pivot columns of A, which is rankA by Theorem 3.5.5.

Warning. Rank is a property of A, not of a computation, but it must be counted from a row echelon form. The number of non-zero rows of A itself is not the rank: (1224) has two non-zero rows and rank 1. Count non-zero rows only after reaching an echelon form. And the rank depends on the field when the entries are read in different fields: (111−1) has rank 2 over R, but over F2, where −1=1, both rows are (11) and the rank is 1.

3.5.6. Rank–nullity and the Rouché–Capelli theorem

The trade-off between the zero matrix and the identity was exact, and now we can say why.

Theorem 3.5.7 (Rank–Nullity for Matrices)

For every A∈Mm×n(F), rankA+nullityA=n, the number of columns of A.

Proof. Let r be the number of pivot columns of A. By Theorem 3.5.5, rankA=r. By Theorem 3.5.4, nullityA=n−r. Adding gives n.

Each column of A is either a pivot column, contributing a direction to col(A), or a free column, contributing a direction to nul(A). Nothing is lost and nothing is counted twice. This is the same equation as the Rank–Nullity Theorem of Chapter 2, which proved it for linear maps by counting basis vectors, with no matrices at all.

Now the question this chapter started with. When does Ax=b have a solution, and how many solutions are there? The first answer was b∈col(A) (Theorem 3.1.1); here is a version that is a pure count.

Theorem 3.5.8 (Rouché–Capelli Theorem)

Let A∈Mm×n(F), b∈Fm, and let [A∣b]∈Mm×(n+1)(F) be the augmented matrix.

  • (a) The system Ax=b is consistent if and only if rankA=rank[A∣b].
  • (b) Suppose it is consistent, let p be one solution, let r=rankA, and let s1,…,sn−r be a basis of nul(A). Then every solution can be written as x=p+t1s1+⋯+tn−rsn−r for exactly one choice of (t1,…,tn−r)∈Fn−r. In words: the solutions form an (n−r)-parameter family.
  • (c) If moreover F is a finite field with q elements (for instance Fp, with q=p), a consistent system has exactly qn−rankA solutions.

Idea. For (a), adding the column b can only enlarge the column space, and the dimension goes up exactly when b is new, that is, when b∉col(A). For (b), the structure theorem says solutions are p plus null vectors, and null vectors have unique coordinates in a basis. For (c), unique coordinates mean the solutions are in bijection with Fn−r, which has qn−r elements.

Proof.

  • (a) By Definition 3.5.1, col([A∣b])=span(a1,…,an,b), which contains col(A) by Proposition 1.3.4 (2).

    (⇒) Suppose the system is consistent. By Theorem 3.1.1, b∈span(a1,…,an), so by Theorem 1.3.5 col([A∣b])=col(A), and the ranks are equal.

    (⇐) Suppose rankA=rank[A∣b]. Then col(A) is a subspace of col([A∣b]) of the same dimension, so col(A)=col([A∣b]) by Theorem 1.6.8. In particular b∈col(A), and the system is consistent by Theorem 3.1.1.

  • (b) By Theorem 3.5.7, nullityA=n−r, so a basis s1,…,sn−r of nul(A) exists (Theorem 3.5.4). By Theorem 3.1.3, x is a solution if and only if x−p∈nul(A). By Theorem 1.5.1, applied in the vector space nul(A) with this basis, each x−p∈nul(A) equals t1s1+⋯+tn−rsn−r for exactly one (t1,…,tn−r). Conversely every such expression is in nul(A), so p plus it is a solution. This proves (b).

  • (c) By (b), the rule (t1,…,tn−r)↦p+t1s1+⋯+tn−rsn−r is a bijection from Fn−r onto the solution set: every solution is hit, and by exactly one tuple. A tuple in Fn−r is a choice of n−r entries, each one of q elements, so Fn−r has qn−r elements. (When r=n there is exactly one tuple, the empty one, and the basis of nul(A) is empty, so p is the only solution and q0=1.) Hence the solution set has qn−r elements.

Over an infinite field such as Q, R or C, part (b) gives the familiar trichotomy: no solution, exactly one solution (when rankA=n), or infinitely many (when rankA<n, since distinct values of t1 give distinct solutions). Over a finite field “infinitely many” is replaced by an exact power of q. For example, over F2 a system can never have exactly 3 or 6 solutions.

Example (Counting solutions over F3)

Over F3, consider A=(110212102012),b=(101),b′=(100). Decide whether Ax=b and Ax=b′ are consistent, and count their solutions.

Solution. We reduce both augmented matrices at once, carrying two right-hand columns; arithmetic is modulo 3, so −1=2 and −2=1. [110211121000201210]→R3→R3−2R1R2→R2−R1[110211011122011121]→R1→R1−R2R3→R3−R2[102122011122000002]. Row operations act on each column separately, so deleting either right-hand column gives a reduction of the corresponding augmented matrix. For instance, in row 2, (1,2,1,0)−(1,1,0,2)=(0,1,1,−2)=(0,1,1,1), and in row 3, (2,0,1,2)−2(1,1,0,2)=(0,−2,1,−2)=(0,1,1,1).

The left block is an echelon form of A with two non-zero rows, so rankA=2 by Corollary 3.5.6. With b, the augmented matrix [A∣b] has the same two non-zero rows (the last is zero), so rank[A∣b]=2=rankA, and by Theorem 3.5.8 (a) the system is consistent. By part (c) it has exactly 34−2=9 solutions. Explicitly, the reduced system is x1=2−2x3−x4=2+x3+2x4 and x2=2−x3−x4=2+2x3+2x4, with x3,x4∈F3 free: nine choices.

With b′, the last row (0,0,0,0∣2) is a non-zero row with its pivot in the last column, so [A∣b′] has three non-zero rows in echelon form and rank[A∣b′]=3≠2. By Theorem 3.5.8 (a), Ax=b′ has no solution. Indeed, row 3 of A is the sum of rows 1 and 2, so any solution would need b3′=b1′+b2′=1, but b3′=0.

3.5.7. Rank of a product

Multiplying matrices cannot create information: every column of AB is a combination of the columns of A, and every row is a combination of the rows of B. The rank records this.

Theorem 3.5.9 (Rank of a product)

Let A∈Mm×n(F) and B∈Mn×p(F). Then rank(AB)≤min(rankA,rankB). Moreover, if P∈Mm(F) and Q∈Mn(F) are invertible, then rank(PA)=rankA=rank(AQ).

Proof. Let b1,…,bp∈Fn be the columns of B. By Theorem 0.9.2, the columns of AB are Ab1,…,Abp, which lie in col(A) by Definition 3.5.1. By Proposition 1.3.4 (1), col(AB)⊆col(A), so rank(AB)≤rankA by Theorem 1.6.7. Similarly, row i of AB is (row i of A)B, a combination of the rows of B by Theorem 0.9.3 (rows version), so row(AB)⊆row(B). By Theorem 3.5.5, rank(AB)=dim⁡row(AB)≤dim⁡row(B)=rankB.

For the second statement, apply the inequality twice: rankA=rank(P−1(PA))≤rank(PA)≤rankA, so equality holds throughout. The same sandwich with A=(AQ)Q−1 gives rank(AQ)=rankA.

The equality case recovers something we already knew in a new form: row operations (left multiplication by an invertible P) do not change the rank. The inequality is often strict. For A=(0100), both factors of A⋅A have rank 1, but A2=0 has rank 0.

3.5.8. A toolkit for questions from Chapter 1

In Chapter 1 we asked, again and again, whether some vectors in Fm are independent, whether they span, how to extend them to a basis, and what the sum and intersection of two subspaces are. Each was answered by solving a small system by hand. Everything now reduces to one move: put the vectors as columns of a matrix, row reduce, and read off pivots.

Theorem 3.5.10 (Independence and spanning by rank)

Let v1,…,vk∈Fm, and let A=(v1⋯vk)∈Mm×k(F). Then:

  • (a) (v1,…,vk) is linearly independent if and only if rankA=k, that is, every column is a pivot column;
  • (b) (v1,…,vk) spans Fm if and only if rankA=m, that is, every row of the RREF has a pivot;
  • (c) (v1,…,vk) is a basis of Fm if and only if k=m=rankA.

Proof.

  • (a) By Theorem 0.9.3, c1v1+⋯+ckvk=Ac with c=(c1,…,ck), so the list is independent if and only if nul(A)={0}, that is, nullityA=0. By Theorem 3.5.7 this means rankA=k.

  • (b) The list spans Fm if and only if col(A)=Fm. Since col(A)⊆Fm and dim⁡Fm=m, this holds if and only if rankA=m, by Theorem 1.6.8 for one direction and because equal spaces have equal dimension for the other. The number of pivots is rankA by Theorem 3.5.5, and the RREF has m rows, each with at most one pivot.

  • (c) Combine (a) and (b) with Definition 1.5.1.

Example (Testing independence)

Decide whether v1=(1,2,0,1), v2=(2,4,1,1), v3=(0,0,1,−1) are linearly independent in R4. If not, find a linear relation.

Solution. Row reduce the matrix with these columns: (12024001111−1)→R4→R4−R1R2→R2−2R1(1200000110−1−1)→R2↔R3(1200110000−1−1)→R1→R1−2R2R4→R4+R2(10−2011000000). Only columns 1 and 2 are pivot columns, so the rank is 2<3, and the vectors are dependent by Theorem 3.5.10 (a). Column 3 of the RREF gives the relation, by Theorem 3.5.2 (b): v3=−2v1+v2. Check: −2(1,2,0,1)+(2,4,1,1)=(0,0,1,−1). Moreover (v1,v2) is a basis of span(v1,v2,v3) by Theorem 3.5.2 (a).

To extend an independent list to a basis of Fm, append the standard basis and keep the pivot columns. The appended vectors guarantee that the columns span Fm. The original vectors all survive, because by Theorem 3.5.2 (c) a column is discarded only if it lies in the span of the columns before it, and an independent list has no such vector (Lemma 1.5.3).

Example (Extending to a basis by elimination)

Extend the independent list (v1,v2)=((1,2,0,1),(2,4,1,1)) from Example (Testing independence) to a basis of R4.

Solution. Form M=(v1v2e1e2e3e4) and row reduce: (121000240100010010110001)→R4→R4−R1R2→R2−2R1(12100000−21000100100−1−1001)→then R4→R4+R2R2↔R3(12100001001000−210000−1011) →then R3→−R3R3↔R4(1210000100100010−1−100−2100)→R4→R4+2R3(1210000100100010−1−10001−2−2). This is an echelon form with pivots in columns 1,2,3,4. By Corollary 3.5.6 these are the pivot columns of M, so by Theorem 3.5.2 (a) the corresponding columns of M form a basis of col(M)=R4: (v1,v2,e1,e2). (Clearing above the pivots gives the RREF, whose column 5 says e3=−v1+v2−e1−2e2; check: −(1,2,0,1)+(2,4,1,1)−(1,0,0,0)−2(0,1,0,0)=(0,0,1,0).)

For sums and intersections, one reduction does both jobs.

Proposition 3.5.11 (Sum and intersection by elimination)

Let U,W⊆Fm be subspaces with bases (u1,…,uk) and (w1,…,wl), and let M=(u1⋯ukw1⋯wl)∈Mm×(k+l)(F). Then:

  • (a) the pivot columns of M form a basis of U+W;
  • (b) for x=(x1,…,xk+l)∈Fk+l write ux:=x1u1+⋯+xkuk, the combination of the u’s with the first k entries of x as coefficients. If (n1,…,nd) is a basis of nul(M), then (un1,…,und) is a basis of U∩W.

In particular dim⁡(U+W)=rankM and dim⁡(U∩W)=nullityM.

Proof.

  • (a) By Proposition 1.7.2, U+W=span(u1,…,uk,w1,…,wl)=col(M), and Theorem 3.5.2 (a) applies.

  • (b) By Theorem 0.9.3, x∈nul(M) means x1u1+⋯+xkuk=−(xk+1w1+⋯+xk+lwl), so ux lies in U and in W. Also ux+y=ux+uy and ucx=cux, by the vector space axioms in Fm.

Spanning. Let v∈U∩W. Since the u’s span U and the w’s span W, v=a1u1+⋯+akuk=b1w1+⋯+blwl. Then x=(a1,…,ak,−b1,…,−bl)∈nul(M) and ux=v. Writing x=∑itini gives v=∑itiuni.

Independence. Let ∑itiuni=0, and put x=∑itini∈nul(M). Then ux=x1u1+⋯+xkuk=0, so x1=⋯=xk=0 because the u’s are independent. Since Mx=0, also xk+1w1+⋯+xk+lwl=0, so the remaining entries vanish because the w’s are independent. Hence x=0, and t1=⋯=td=0 because the ni are independent.

The dimension statements follow by counting the two bases, using Theorem 3.5.5 for rankM.

Adding the two counts and using Theorem 3.5.7 gives dim⁡(U+W)+dim⁡(U∩W)=rankM+nullityM=k+l=dim⁡U+dim⁡W. This is the Dimension Formula for Sums (Theorem 1.7.3) again, now with a second, computational proof for subspaces of Fm. (Some texts use the matrix with columns u1,…,uk,−w1,…,−wl instead of M, so that a null vector gives equal combinations ∑aiui=∑bjwj with no sign change. The two null spaces differ only by the signs of the last l entries.)

Example (A basis of a sum)

Let U=span(u1,u2) and W=span(w1,w2) in R4, where u1=(1,0,1,2),u2=(0,1,1,1),w1=(1,1,0,1),w2=(1,3,0,1). Find a basis and the dimension of U+W.

Solution. Each pair is independent, since neither vector is a multiple of the other (compare the first two entries), so dim⁡U=dim⁡W=2. Row reduce M=(u1u2w1w2): (1011011311002111)→R4→R4−2R1R3→R3−R1(1011011301−1−101−1−1)→R4→R4−R2R3→R3−R2(1011011300−2−400−2−4) →then R3→−12R3R4→R4−R3(1011011300120000)→R2→R2−R3R1→R1−R3R=(100−1010100120000). The pivot columns are 1,2,3. By Proposition 3.5.11 (a), (u1,u2,w1) is a basis of U+W, and dim⁡(U+W)=3. Column 4 of R says w2=−u1+u2+2w1; check: −(1,0,1,2)+(0,1,1,1)+2(1,1,0,1)=(1,3,0,1).

Example (A basis of an intersection)

For U and W as in Example (A basis of a sum), find a basis of U∩W, and check the Dimension Formula for Sums.

Solution. We reuse the RREF R of M. Its only free column is column 4, so by Theorem 3.5.4 nul(M) has the basis n=(1,−1,−2,1) (set x4=1; then x1=1, x2=−1, x3=−2). The relation Mn=0 reads u1−u2−2w1+w2=0, that is, u1−u2=2w1−w2. By Proposition 3.5.11 (b), un=u1−u2=(1,−1,0,1) is a basis of U∩W. Check that it lies in W: 2(1,1,0,1)−(1,3,0,1)=(1,−1,0,1). So dim⁡(U∩W)=1, and dim⁡U+dim⁡W−dim⁡(U∩W)=2+2−1=3=dim⁡(U+W), in agreement with Theorem 1.7.3.

3.5.9. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define col(A), row(A), nul(A) and rankA for A∈Mm×n(F), and say which space each subspace lives in.
  • (b) State the Rank–Nullity Theorem for matrices and the Rouché–Capelli Theorem.
  • (c) True or false: if R is the RREF of A, then col(R)=col(A). Justify your answer.
  • (d) True or false: there is a 4×6 real matrix with nullity 1. Justify your answer.
  • (e) True or false: for every A∈Mm×n(F), rankA=rankA⊤. Justify your answer.
  • (f) Describe how to find a basis of U∩W for subspaces U,W⊆Fm given by bases.

Solution.

  • (a) col(A) is the span of the columns, a subspace of Fm; row(A) is the span of the rows, a subspace of M1×n(F); nul(A)={x∈Fn:Ax=0}, a subspace of Fn; and rankA=dim⁡col(A) (Definition 3.5.1, Definition 3.5.2, Definition 3.5.3, Definition 3.5.4).
  • (b) For A∈Mm×n(F), rankA+nullityA=n (Theorem 3.5.7). For b∈Fm, Ax=b is consistent if and only if rankA=rank[A∣b]; then the solutions are p+nul(A), an (n−rankA)-parameter family, with exactly qn−rankA solutions over a field with q elements (Theorem 3.5.8).
  • (c) False. For A=(1111), R=(1100), and (1,1)∈col(A) but (1,1)∉col(R)=span((1,0)). Row operations preserve the row space and the column relations, not the column space (Theorem 3.5.1).
  • (d) False. Its rank is at most 4, since the column space lies in R4, so by Theorem 3.5.7 its nullity is 6−rankA≥2.
  • (e) True. This is Theorem 3.5.5.
  • (f) Put the basis vectors of U and then of W as the columns of M, find a basis of nul(M) from the RREF, and for each basis vector n take the combination of the u’s with the first k entries of n as coefficients (Proposition 3.5.11).

B. Practice

Exercise (B1: The three subspaces of a 3×5 matrix)

Let A=(1−12032−2514−11−11−5)∈M3×5(R). Find bases of col(A), row(A) and nul(A). Hence verify rankA+nullityA=5.

Solution. Row reduce: A→R3→R3+R1R2→R2−2R1(1−12030011−20011−2)→R1→R1−2R2R3→R3−R2R=(1−10−270011−200000). The pivot columns are 1 and 3; the free columns are 2,4,5.

By Theorem 3.5.2, the pivot columns of A, (1,2,−1) and (2,5,−1), form a basis of col(A). By Theorem 3.5.3, (1−10−27) and (0011−2) form a basis of row(A). The reduced equations are x1=x2+2x4−7x5 and x3=−x4+2x5, so by Theorem 3.5.4 a basis of nul(A) is s2=(1,1,0,0,0),s4=(2,0,−1,1,0),s5=(−7,0,2,0,1). For example As4=2a1−a3+a4=(2,4,−2)−(2,5,−1)+(0,1,1)=0. Hence rankA=2 and nullityA=3, and 2+3=5, as Theorem 3.5.7 requires.

Exercise (B2: Independence and extension in R4)

Let v1=(1,0,2,1), v2=(2,1,3,1), v3=(0,1,−1,−1) in R4.

  • (a) Determine whether (v1,v2,v3) is linearly independent. Justify your answer.
  • (b) Find a basis of span(v1,v2,v3), and extend it to a basis of R4 using standard basis vectors.

Solution.

  • (a) Row reduce the matrix with columns v1,v2,v3: (12001123−111−1)→R4→R4−R1R3→R3−2R1(1200110−1−10−1−1)→R4→R4+R2, R1→R1−2R2R3→R3+R2(10−2011000000). The rank is 2<3, so the list is dependent by Theorem 3.5.10 (a). Column 3 gives v3=−2v1+v2 (Theorem 3.5.2 (b)); check: (−2,0,−4,−2)+(2,1,3,1)=(0,1,−1,−1).
  • (b) By Theorem 3.5.2 (a), (v1,v2) is a basis of span(v1,v2,v3). To extend it, row reduce (v1v2e1e2e3e4): (121000010100230010110001)→R4→R4−R1R3→R3−2R1(1210000101000−1−20100−1−1001)→R4→R4+R2R3→R3+R2(12100001010000−211000−1101) →then R3→−R3R3↔R4(121000010100001−10−100−2110)→R4→R4+2R3(121000010100001−10−1000−11−2). This echelon form has pivots in columns 1,2,3,4, which are the pivot columns by Corollary 3.5.6. By Theorem 3.5.2 (a) the corresponding columns form a basis of the column space, which is R4 since it contains e1,…,e4. Hence (v1,v2,e1,e2) is a basis of R4 extending (v1,v2).
Exercise (B3: Sum and intersection in R5)

Let U=span(u1,u2,u3) and W=span(w1,w2) in R5, where u1=(1,1,0,0,1),u2=(0,1,1,0,0),u3=(1,0,0,1,0),w1=(1,2,2,1,2),w2=(0,0,1,1,1). Find dim⁡U, dim⁡W, a basis of U+W and a basis of U∩W. Hence verify Theorem 1.7.3.

Solution. Row reduce M=(u1u2u3w1w2): (1011011020010210011110021)→R5→R5−R1R2→R2−R1(1011001−110010210011100−111)→R3→R3−R2(1011001−110001110011100−111) →R5→R5+R3R4→R4−R3(1011001−110001110000000022)→then R4→12R4R4↔R5(1011001−110001110001100000). Clearing above the pivots (R3→R3−R4, R2→R2−R4, R1→R1−R4, then R2→R2+R3, R1→R1−R3) gives R=(1000−10100−1001000001100000). The pivot columns are 1,2,3,4, so (u1,u2,u3,w1) is independent by Theorem 3.5.2 (a), and so are its sub-lists (u1,u2,u3) and (w1); also w2 is not a multiple of w1 (compare first entries). Hence dim⁡U=3 and dim⁡W=2, with the given spanning lists as bases. By Proposition 3.5.11 (a), (u1,u2,u3,w1) is a basis of U+W, so dim⁡(U+W)=4.

The only free column is column 5. Setting x5=1 gives n=(1,1,0,−1,1), a basis of nul(M) by Theorem 3.5.4. So u1+u2−w1+w2=0, and by Proposition 3.5.11 (b), u1+u2=(1,2,1,0,1) is a basis of U∩W. Check: w1−w2=(1,2,1,0,1). Hence dim⁡(U∩W)=1, and dim⁡U+dim⁡W−dim⁡(U∩W)=3+2−1=4=dim⁡(U+W).

C. Going deeper

Exercise (C1: Rank of a sum)

Let A,B∈Mm×n(F). Prove that rank(A+B)≤rankA+rankB. Give an example where the inequality is strict.

Solution. The j-th column of A+B is aj+bj, which lies in col(A)+col(B) (Definition 1.7.1). This sum is a subspace (Theorem 1.7.1), so by Theorem 1.3.1, col(A+B)⊆col(A)+col(B). By Theorem 1.6.7 and Theorem 1.7.3, rank(A+B)≤dim⁡(col(A)+col(B))=rankA+rankB−dim⁡(col(A)∩col(B))≤rankA+rankB. For strictness, take A=I2 and B=−I2 over R: rank(A+B)=rank0=0<2+2.

Exercise (C2: Matrices of rank one)

Let A∈Mm×n(F). Prove that rankA=1 if and only if A=xy⊤ for some non-zero x∈Fm and y∈Fn.

Solution. (⇐) Suppose A=xy⊤ with x,y≠0, and write y=(y1,…,yn). By Theorem 0.9.2, the j-th column of xy⊤ is x times the j-th column of y⊤, the 1×1 matrix (yj); that is, yjx. So every column lies in span(x), and col(A)⊆span(x). Since y≠0, some yj≠0, and then yjx≠0 because x≠0 (Theorem 1.1.9). The list (x) is independent, since ax=0 forces a=0 (Theorem 1.1.9), so span(x) has dimension 1, and rankA≤1 by Theorem 1.6.7. On the other hand rankA≠0: a space of dimension 0 has the empty list as a basis, so it equals span()={0}, but col(A) contains the non-zero vector yjx. Hence rankA=1.

(⇒) Suppose rankA=1, and let (x) be a basis of col(A); then x≠0. Each column aj∈col(A) equals yjx for some yj∈F. Put y=(y1,…,yn). By the computation in (⇐), the j-th column of xy⊤ is yjx=aj, so A=xy⊤. If y=0, then A=0 would have rank 0, so y≠0. This proves the claim.

Exercise (C3: The matrix i+j)

For n≥1, let An∈Mn(R) have entries aij=i+j. Prove that rankA1=1 and rankAn=2 for every n≥2. Hence find nullityAn.

Hint: write each row as a combination of two fixed row vectors.

Solution. For n=1, A1=(2)≠0, so rankA1=1. Let n≥2, and put 1=(11⋯1) and d=(12⋯n) in M1×n(R). Row i of An is (i+1⋯i+n)=i1+d. So row(An)⊆span(1,d), and dim⁡row(An)≤2 by Theorem 1.6.3.

Rows 1 and 2 are (23⋯) and (34⋯). If c1(row 1)+c2(row 2)=0, the first two entries give 2c1+3c2=0 and 3c1+4c2=0. Subtracting the first from the second gives c1+c2=0, so c1=−c2, and then −2c2+3c2=c2=0, so c1=0. Hence row(An) contains two independent vectors, and dim⁡row(An)≥2 by Theorem 1.6.3.

So dim⁡row(An)=2, and rankAn=2 by Theorem 3.5.5. By Theorem 3.5.7, nullityAn=n−2 for n≥2, and nullityA1=0.

Exercise (C4: Counting right-hand sides over a finite field)

Let F be a finite field with q elements, and let A∈Mm×n(F) have rank r.

  • (a) Prove that exactly qr vectors b∈Fm make Ax=b consistent.
  • (b) By counting the pairs (x,b)∈Fn×Fm with Ax=b in two ways, and using Theorem 3.1.3 but not Theorem 3.5.7, prove that nul(A) has exactly qn−r elements. Deduce nullityA=n−r: a counting proof of Rank–Nullity over a finite field.
  • (c) Over F2, let A=(110011101). How many b∈F23 give a consistent system, and how many solutions does each such system have?

Solution.

  • (a) By Theorem 3.1.1, Ax=b is consistent exactly when b∈col(A). Let (c1,…,cr) be a basis of col(A). By Theorem 1.5.1, (t1,…,tr)↦t1c1+⋯+trcr is a bijection Fr→col(A): every vector of col(A) is hit by exactly one tuple. Since Fr has qr elements, so does col(A).

  • (b) Let N=|nul(A)|. Each x∈Fn determines exactly one b=Ax, so there are qn pairs. Now group the pairs by b. If b∉col(A), there are none, by Theorem 3.1.1. If b∈col(A), pick one solution p; by Theorem 3.1.3 the solutions are p+nul(A), and h↦p+h is a bijection from nul(A) onto this set (it is onto by definition, and p+h=p+h′ gives h=h′). So each of the qr vectors b of (a) accounts for exactly N pairs, and there are qrN pairs in total. Hence qrN=qn, and N=qn−r.

    Let d=nullityA. The argument of (a), applied to a basis of nul(A) of length d, gives N=qd. So qd=qn−r. Since q≥2, distinct exponents give distinct powers of q, so d=n−r. This is Theorem 3.5.7, proved here by counting alone.

  • (c) Over F2, R3→R3+R1 gives row 3 equal to (0,1,1), and then R3→R3+R2 makes it zero. So an echelon form is (110011000), and rankA=2 by Corollary 3.5.6. By (a), exactly 22=4 of the 8 vectors b give a consistent system, and by Theorem 3.5.8 (c) each has 23−2=2 solutions. (The consistent b are those with b1+b2+b3=0. The rows of A add up to zero, so every consistent b satisfies this equation; exactly 4 vectors of F23 satisfy it, and 4 are consistent, so the two sets coincide.)

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.