06 Matrix Spaces
06 Matrix Spaces
06 Matrix Spaces
Observation. We obviously have ROW(A) = COL(A⊤ ) and (hence) rankr (A) = rankc (A⊤ ).
In the next proposition we will see that elementary row operations do not change rankr and rankc .
Thus, if a matrix B is obtained form A by an elementary row operation, then rankr (A) = rankr (B) and
rankc (A) = rankc (B). For the row rank, the result is quite expected and the proof is easy: in fact we will prove
that A and B have the same row space (NB: rankr is the dimension of this space). In contrast,the column
0 0 1 1
spaces of A and of B are not necessarily the same. (A simple example: A = −→ B = . We
1 1 0 0
have COL(A) = sp((0, 1)), COL(B) = sp((1, 0)).) Therefore it is somewhat unexpected that their column
spaces have necessarily the same dimension.
Proposition. Let A, B ∈ Rm×n , and assume that B is obtained form A by an elementary row operation.
Then we have:
1. ROW(A) = ROW(B).
2. rankr (A) = rankr (B).
3. rankc (A) = rankc (B).
Proof.
1. If B is obtained from A by an elementary row operation, then every row of B is a linear combination
of the rows of A, and (since elementary row operations are “invertible”) vice versa. Hence ROW(A) =
ROW(B).
2. We have rankc (A) = rankc (B) just because these are the dimensions of ROW(A) and of ROW(B).
3. For every v ∈ Rn we have Av = 0 ⇔ Bv = 0: this was a crucial claim for the Gauss-Jordan method.
This means that columns of A and the corresponding columns of B satisfy precisely the same linear
dependencies. More precisely: For every way to write 0 (the zero vector of Rm ) as a linear combination
of some columns of A, we can write 0 as a linear combination of the corresponding columns of B with
the same coefficients.
1 2 3 1 2 3
Example. Let A = and B = . (B is obtained form A by R2 → R2 − 3R1 .)
4 5 6 0 −3 −6
Then we have, for example:
1 2 3 0 1 2 3 0
1· −2· +1· = and 1 · −2· +1· =
4 5 6 0 0 −3 −6 0
1 3 1 3
The set , is linearly independent, and the set , is linearly independent.
4 6 0 −6
In particular, the maximal linearly independent subset of columns of A corresponds to the maximal
linearly independent subset of columns of B. Therefore we have bases of COL(A) and of COL(B) that
have the same size. Hence, we have dim(COL(A)) = dim(COL(B)), that is, rankc (A) = rankc (B).
We proved that elementary row operations do not change rankr and rankc . Similarly to elementary row
operations, one can define elementary column operations: Ci ↔ Cj , Ci → kCi , Ci → Ci + kCj . Then a
similar proof (or using the transpose) shows that elementary column operations also do not change rankr
and rankc .
The next theorem is non-trivial and fundamental.
Theorem. For every matrix A we have rankr (A) = rankc (A).
Proof. Using elementary row operations, we can bring the given matrix A to the canonical form:
1 ∗ ∗ 0 0 ∗ ∗ ∗ 0 ∗ ∗
r 1 0 ∗ ∗ ∗ 0 ∗ ∗
1 ∗ ∗ ∗ 0 ∗ ∗
C=
0 1 ∗ ∗
Then, using elementary column operations, we can bring this matrix to the form:
r
1
r 1
D= 1
1
(all other entries are 0-s). According to the last proposition, we have rankr (A) = rankr (D) and rankc (A) =
rankc (D). And we clearly have rankr (D) = rankc (D) = r. Hence, rankr (A) = r = rankc (A).
Remarks.
1. Due to this theorem, we will just say “the rank of A” and denote it by rank(A).
2. The theorem can be also stated as rank(A) = rank(A⊤ ).
3. The proof also yields a practical method for finding rank(A): it is the number of non-zero rows in any
staircase matrix that corresponds to A.
The next results are needed in order to prove another fundamental theorem and to develop general
practical methods for finding bases of vector spaces.
Observation.
(a) Non-zero rows of a staircase matrix C are linearly independent. Hence, they form a basis of ROW(C).
(b) Let A ∈ Rm×n , and consider NUL(A) (the space of solutions of the homogeneous system Ax = 0).
Then the spanning set of NUL(A) found by the Gauss-Jordan method is linearly independent, and,
hence it is a basis of NUL(A).
Proof.
(a) There are many ways for proving this. For example, let R1 , R2 , . . . , Rr be non-zero rows of a staircase
matrix, and denote by b1 , b2 , . . . , br their leading elements. Then if we write 0 = α1 R1 + α2 R2 +
. . . + αr Rr and compare the values in the columns that contain the leading elements, we obtain
α1 b1 = 0, α2 b2 = 0, . . . , αr br = 0 and, hence, α1 = α2 = . . . = αr = 0.
Alternatively, we can modify C as in the proof of the last Theorem. Then we obtain rank(C) = r, which
means that {R1 , R2 , . . . , Rr } is a set of size r that spans a vector space (ROW(C)) of dimension r.
Therefore, by one of the propositions about bases and dimensions, {R1 , R2 , . . . , Rr } is a basis of
ROW(C).
(b) If we construct a matrix whose rows are the elements of this spanning set, then its restriction to the
columns that correspond to the free variables, is a copy of an identity matrix. Then we can perform
elementary column operations to make these columns to be the first columns, thus obtaining a staircase
matrix. Then the result follows from (a).
nullity(A) = n − rank(A).
Proof. When we write the general solution of Ax = 0, we partition the variables into leading and free. The
number of leading variables is equal to the number of non-zero rows in a staircase matrix that corresponds
to A: that is, to rank(A). Hence, the number of free variables is n − rank(A). On the other hand, the number
of free variables is nullity(A) by the last Observation (b).
Methods for finding basis / dimension of a subspace of Rn . There are two main ways to specify
a subspace W of Rn , and the standard methods of finding a basis are as follows:
• W is given by a spanning set: W = sp(v1 , v2 , . . . , vm ). We construct a matrix A whose rows are
these vectors. This means W = ROW(A). Then we bring A to a staircase matrix C. By the last
Observation (a), the non-zero rows of C are a basis of W = ROW(A) = ROW(C). Finally, dim(W ) =
rank(A) = the number of non-zero rows in C.
• W is given by a homogeneous system of linear equations Ax = 0. That is, W = NUL(A) for some
matrix A. In this case one solves this system by Gauss-Jordan method, writes the general solution,
and extracts a spanning set of W . As mentioned in the Observation (b), this spanning set is always
linearly independent, and, hence, a basis of W .
The following two examples illustrate these methods. Note that in this examples we work with the same
matrix A, but the final step is different: in the first example we just collect the rows, in the second example
we still need to solve the system.
Example 1. Find a basis and determine the dimension of W = sp((1, 1, 1, 1, 1), (1, 2, 3, 4, 5), (1, 3, 5, 7, 9))
(a subspace of R5 ).
Solution. Let A be the matrix whose rows are the given vectors. We bring it to a staircase form:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 3 4 5 → − 0 1 2 3 4 → − 0 1 2 3 4 .
1 3 5 7 9 0 2 4 6 8 0 0 0 0 0
In order to find the general solution of the system, we use the Gauss-Jordan method. The first step is writing
the system using a matrix — this is the same matrix as in Example 1 — and bringing it to a staircase form.
This is also done above, but we can make one more step and bring it to the canonical form (this will save
some calculations at the following steps):
1 0 −1 −2 −3
− 0 1 2
··· → 3 4 .
0 0 0 0 0
Its unique
solution
is α =
5, β =0, γ =3, δ = 1.
9 7 1 1 1 2 1 0 1 2
Hence, =5 +0 +3 +1
5 2 1 1 1 2 −1 −2 3 3
9 7
and, therefore, = (5, 0, 3, 1).
5 2 B