Rank of Matrix
Rank of Matrix
Definition:
Let =
[
11
12
.
1
21
22
2
. .
. .
be an matrix.
The rows of ,
1
= (
11 ,
12,
,
1
)
2
= (
21 ,
22,
,
2
)
.
= (
1 ,
2,
,
)
Similarly, the columns of ,
1
= [
11
21
1
] ,
2
= [
12
22
2
] , ,
= [
]
Definition: The dimension of the row space of is called the row rank of,
and the dimension of the column space of is called the column rank of .
Theorem: Row rank of A= Column rank of A
Definition: Since row rank = column rank , now merely refer to the rank of
matrix and write rank
How to find it?
Step1:
C A
RREF
Step2: rank A = the number of non zero rows in C
Theorem: Let A be an m x n matrix. Then,
dim
dim
dim
rowspace
nullspace
rank A nullity A n + =
Example:
(
(
(
(
(
(
=
0 0 0 0 0
0 0 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
A
and 5 = n .
Since
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
0
0
1
0
0
,
0
0
0
1
0
,
0
0
0
0
1
is a basis of column space and thus
( ) 3 = A rank
. The solutions of 0 = Ax are
R s s s x s x x x x e = = = = =
2 1 2 5 1 4 3 2 1
, , , , 0 , 0 , 0
.
Thus, the solution space (the null space) is
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(
+
(
(
(
(
(
(
1
0
0
0
0
,
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
2 1
span s s
.
Then,
(
(
(
(
(
(
0
1
0
0
0
and
(
(
(
(
(
(
1
0
0
0
0
are the basis of the null space. and
( ) 2 = A nullity
.
Therefore,
n A nullity A rank = = + = + 5 2 3 ) ( ) (
.
How to find the bases of the row and column spaces:
Suppose A is a
n m
matrix. Then, the bases of the row and column spaces can
be found via the following steps.
Step 1:
Transform the matrix A to the matrix in reduced row echelon form.
Step 2:
The nonzero rows of the matrix in reduced row echelon form a basis of the
row space of A.
The columns corresponding to the ones containing the leading 1s form a basis.
For example, if
6 = n
and the reduced row echelon matrix is
(
(
(
(
(
(
(
(
0 0 0 0 0 0
0 0 0 0 0 0
1 0 0 0
1 0 0
1
,
then the 1st, the 3rd, and the 4th columns contain a leading 1 and
thus
( ) ( ) ( ) A col A col A col
4 3 1
, ,
form a basis of the column
space of A.
Note:
To find the basis of the column space is to find to basis for the vector space
{ } ) ( , ), ( ), (
2 1
A col A col A col span
n
=
3 4 0 2 1
3 2 7 3 2
4 1 8 2 3
4 3 0 2 1
A
.
Find the bases of the row and column spaces of A.
[solution:]
Step 1:
Transform the matrix A to the matrix in reduced row echelon form,
(
(
(
(
(
(
(
(
=
0 0 0 0 0
1 1 0 0 0
1 0 1 1 0
1 0 2 0 1
3 4 0 2 1
3 2 7 3 2
4 1 8 2 3
4 3 0 2 1
form echelon row reduced in
A
Step 2:
The basis for the row space is
| | | | | | { } 1 1 0 0 0 , 1 0 1 1 0 , 1 0 2 0 1
The columns corresponding to the ones containing the leading 1s are the 1st, the 2nd, and
the 4th columns. Thus,
(
(
(
(
(
(
(
(
(
(
(
(
4
2
1
3
,
2
3
2
2
,
1
2
3
1
form a basis of the column space.
Since the basis of the row space of A is
| | | | | | { } 1 1 0 0 0 , 1 0 1 1 0 , 1 0 2 0 1 ,
the dimension of the row space is 3 and the row rank of A is 3. Similarly,
(
(
(
(
(
(
(
(
(
(
(
(
4
2
1
3
,
2
3
2
2
,
1
2
3
1
is the basis of the column space of A. Thus, the dimension of the column space is 3 and the
column rank of A is 3.
Example 1. Let = *
1
,
2
,
3
,
4
+, where
1
= (1, 2, 0, 3, 4),
2
= (3, 2, 8, 1, 4) ,
3
= (2, 3, 7, 2, 3),
4
= (1, 2, 0, 4, 3) and be subspace of
5
given by
= . Find a basis for .
Solution: Note that is the row space of the matrix whose rows are given
vectors
A = [
1 2 0
3 2 8
2 3 7
1 2 0
3 4
1 4
2 3
4 3
]
Using elementary row operations, we have
A~ [
1 2 0
0 8 8
0 7 7
0 0 0
3 4
8 16
4 11
7 7
] ~[
1 2 0
0 1 1
0 7 7
0 0 0
3 4
1 2
4 11
7 7
] ~[
1 2 0
0 1 1
0 0 0
0 0 0
3 4
1 2
3 3
1 1
]
~[
1 0 2
0 1 1
0 0 0
0 0 0
1 0
1 2
1 1
0 0
] ~[
1 0 2
0 1 1
0 0 0
0 0 0
1 0
1 2
1 1
0 0
] ~[
1 0 2
0 1 1
0 0 0
0 0 0
1 0
0 1
1 1
0 0
] = B.
The row spaces and are equal, and basis for the row spaces consists of the
nonzero rows of .
Hence
1
= (1, 0, 2, 0, 1),
2
= (0, 1, 1, 0, 1) ,
3
= (0, 0, 0, 1, 1) Form a basis for .
The rank of A=..
Example 3 Let A = [
1 2 4
0 1 2
1 1 0
1
1
0
]. Compute rank .
Theorem 3 A matrix is nonsingular if and only if rank = .
Example 4 Let = [
1 2
3 4
]. Then || = |
1 2
3 4
| = 4 6 = 2 0, that is
is nonsingular . Rank = 2 because = [
1 2
3 4
] ~[
1 2
0 2
].
Important Result:
If A and B are two
n m
row equivalent matrices, then the row spaces of A and B
are equal.
Corollary 1: If is matrix, then rank = if and only if || 0.
Corollary 2: Let be matrix. The linear system = has unique
solution for every 1 matrix if and only if rank = .
Corollary 3: The homogeneous system = 0 of linear equations in
unknowns has nontrivial solution if and only if rank < .
Theorem 4: The linear system = has a solution if and only if rank =
rank , -.
Example 5: Consider the linear system
{
2
1
+
2
+3
3
= 1
1
2
2
+2
3
= 2
2
+3
3
= 3
or [
2 1 3
1 2 2
0 1 2
] [
3
] = [
1
2
3
]
= [
2 1 3
1 2 2
0 1 2
] and , - = [
2 1 3 1
1 2 2 2
0 1 2 3
] rank = 3 and
, - = 3 . Therefore, the linear system has a solution.
Example 6: Consider the linear system
[
1 2 3
1 3 4
2 1 7
] [
3
] = [
4
5
6
] = [
1 2 3
1 3 4
2 1 7
] rank = 2
, - = [
1 2 3 4
1 3 4 5
2 1 7 6
] , - = 3 . Therefore, the linear system has no
solution.
Important Result:
Let A be an
n n
matrix.
A is nonsingular if and only if
( ) n A rank =
.
( ) ( )
solution. unique a has
0 det r nonsingula is
b Ax
A A n A rank
=
= =
( ) solution. nontrivial a has 0 = < Ax n A rank
Important Result:
Let A be an
n m
matrix. Then,
b Ax =
has a solution
| | b A rank A rank | ) ( =
Rank and Singularity
How can one distinguish between a consistent and inconsistent system of
equations?
A system of equations
| || | | | C X A =
is consistent if the rank of
A
is equal to the rank
of the augmented matrix
| | C A
A system of equations
| || | | | C X A =
is inconsistent if the rank of
A
is less than the
rank of the augmented matrix
| | C A
.
But, what do you mean by rank of a matrix?
The rank of a matrix is defined as the order of the largest square submatrix whose
determinant is not zero.
Example 3
What is the rank of
| |
(
(
(
=
3 2 1
5 0 2
2 1 3
A
?
Solution
The largest square submatrix possible is of order 3 and that is
] [A
itself. Since
, 0 23 ) det( = = A
the rank of
. 3 ] [ = A
Example 4
What is the rank of
| |
(
(
(
=
7 1 5
5 0 2
2 1 3
A
?
Solution
The largest square submatrix of
] [A
is of order 3 and that is
] [A
itself. Since
0 ) det( = A
, the rank of
] [A
is less than 3. The next largest square submatrix would
be a 2
=
0 2
1 3
B
and
0 2 ) det( = = B
. Hence the rank of
] [A
is 2. There is no need to look at other
2 2
submatrices to establish that the rank of
] [A
is 2.
If a solution exists, how do we know whether it is unique?
In a system of equations
] [ ] [ ] [ C X A =
that is consistent, the rank of the coefficient
matrix
] [A
is the same as the augmented matrix
] [ C A
. If in addition, the rank of
the coefficient matrix
] [A
is same as the number of unknowns, then the solution is
unique; if the rank of the coefficient matrix
] [A
is less than the number of
unknowns, then infinite solutions exist.
Unique solution if
rank (A) = number of unknowns
Infinite solutions if
rank (A) < number of unknowns
Consistent System if
rank (A) = rank (A.B)
Inconsistent System if
rank (A) < rank (A.B)
[A] [X] = [B]
Figure. Flow chart of conditions for consistent and inconsistent system of
equations.
First: Nonhomogeneous system
The rank of square matrix can be used to determine whether the
matrix is singular or nonsingular, as the following theorem.
Theorem: An n n matrix A is nonsingular iff rank A = n
Corollaries (1)If A is an n n matrix, then rank A = n iff
det( ) 0 A =
.
(2) Let be an n n matrix. The linear system Ax = b has a unique
solution for every
1 n
matrix b Iff rank (A) = n.
(3) rank (A) = n, A is nonsingular so A
-1
exist Ax = b
AA
-1
x = A
-1
b; x = A
-1
Ex.8 Find the rank of the matrix
1 1 1 4
2 1 3 0
3 4 8 20
A
| |
|
=
|
|
\ .
.
1 1 1 4 1 1 1 4 1 1 1 4
2 1 3 0 0 1 5 8 0 1 5 8
3 4 8 20 0 1 5 8 0 0 0 0
A
| | | | | |
| | |
=
| | |
| | |
\ . \ . \ .
Hence 2 rankA= .
Ex.9 Find the rank of the matrix
2
1 1 2
1 1 2 0
2 2 6 4
a
A a
a a
| |
|
=
|
|
\ .
) sol
2 2 2
2 2
2 2
2
2
1 1 2 1 1 2 1 1 2
1 1 2 0 0 0 0 0
2 2 6 4 0 2 4 2 0 0 2 4
1 1 2 0
Case1: 0 0 0 1 2 2
0 0 0 0
1 1 2
Case2: 0 0 1 0
0 0 2 4
(a
a a a
A a a a a a
a a a a a a a
a rankA
a
a a
a a
| | | | | |
| | |
=
| | |
| | |
\ . \ . \ .
| |
|
= =
|
|
\ .
| |
|
=
|
|
\ .
2
1 1 2 4
) 2 0 1 0 2 2
0 0 0 0
1 1 2
(b) 2 0 1 0 3
0 0 1 2
2 if 0 or 2
Hence
3 if 0 and 2
a rankA
a
a a rankA
a
a a
rankA
a a
| |
|
= =
|
|
\ .
| |
|
= =
|
|
+
\ .
= =
=
= =
(a) Either or 1 1 rankA rankB r rankA rankB r = = = = .
(b)
{ } { } min , 1 , min , r rankB m n rankA m n = s + s .
(c) If m n < then r m n s < , hence either the system is inconsistent or it has
infinitely many solutions.
Ex.10: Find conditions on a such that the following system has no
) sol
solution, one solution, or infinitely many solutions.
1
( 2) 1
2 2 ( 2) 1
x ay z
x a y z
x y a z
+ =
+ + =
+ + =
1 1 1 1 1 1 1 1 1
1 2 1 1 0 2 2 0 0 0 2 2 0 0
2 2 2 1 0 2 2 1 0 0 1
1 1 1 1
Case1: 1 0 0 1 1
0 0 0 0
1 1 1
Case2: 1 0 1 0 0
0 0 1
1 0 1 1
(a) 0 0 1 0 0
0 0 0 1
a a a
a a a
a a a a
a
a
a
a
a
| | | | | |
| | |
| | |
| | |
\ . \ . \ .
| |
|
=
|
|
\ .
| |
|
=
|
|
\ .
|
=
1 1 1
(b) 0 0 1 0 0
1
0 0 1
a
a
a
| |
|
|
|
| =
|
|
|
| \ .
\ .
1 : has infinitely many solutions.
0 : has no solutions.
1 and 0 : has exactly one solution.
a
a
a a
=
=
= =
Theorem 3
Let be the coefficient matrix of an linear system.
The following statements are equivalent:
(a) The system has a unique solution.
(b)
(c) is row-equivalent to .
n
A n n
rankA n
A I
=
) sol