You are on page 1of 17

Week 7 (Lecture 13)

Contents:

 Recall to different types of system of linear equations


 Recall to homogeneous system of linear equations
 Nullspace of a matrix
 Theorem 1: The Nullspace is a subspace
 Basis and dimension of Nullspace
 Rank of a matrix
 Theorem 2: Row rank = column rank
 Theorem 3: Rank + Nullity = Number of columns
 Theorem 4: Homogeneous linear system with 𝑛 𝑚 has at least one free variable
 Worked out examples
 Exercises

Saba Fatema Page | 1


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Different types of System of Linear Equations
We recall that

It is possible for a system of linear equations to have exactly one solution, or an infinite
number of solutions, or no solution.

A system of linear equations is called consistent if it has at least one solution and
inconsistent if it has no solution.

Depending upon the number of variables and the number of equations in a system of linear
equations, there are two more criteria.

A system of linear equations is said to be underdetermined if there are more variables than
equations.

Example:

𝑥 2𝑥 3𝑥 4
2𝑥 𝑥 4𝑥 3

On the other hand, a system of linear equations is said to be is overdetermined if there are
more equations than variables.

Example:

𝑥 𝑥 2
2𝑥 3𝑥 3
𝑥 2𝑥 1

Saba Fatema Page | 2


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Homogeneous System of Linear Equations
We recall that

A system of 𝑚 equations in 𝑛 variables is called a homogeneous system of linear


equations, if it has the following form

𝑎 𝑥 𝑎 𝑥 𝑎 𝑥 ⋯ 𝑎 𝑥 0

𝑎 𝑥 𝑎 𝑥 𝑎 𝑥 ⋯ 𝑎 𝑥 0

𝑎 𝑥 𝑎 𝑥 𝑎 𝑥 ⋯ 𝑎 𝑥 0

𝑎 𝑥 𝑎 𝑥 𝑎 𝑥 ⋯ 𝑎 𝑥 0

The above system can be written as a matrix equation

𝐴𝐱 𝟎 2

𝑎 𝑎 ⋯ 𝑎 𝑥 0
𝑎 𝑎 ⋯ 𝑎 𝑥 0 ∈ℝ
where, 𝐴 ⋮ ⋮ ⋮ ⋮ , 𝐱 ⋮ ∈ ℝ , and 𝟎

𝑎 𝑎 ⋯ 𝑎 𝑥 0

Note. Every homogeneous system is consistent since 𝐴𝟎 𝟎 where 𝟎 ∈ ℝ .

For example, consider the following system of linear equations

𝑥 2𝑥 2𝑥 𝑥 0
3𝑥 6𝑥 5𝑥 4𝑥 0 1
𝑥 2𝑥 3𝑥 0

This system can be expressed in terms of matrices as

𝑥
1 2 2 1 𝑥 0
3 6 5 4 𝑥 0
1 2 0 3 𝑥 0

Saba Fatema Page | 3


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Homogeneous System of Linear Equations
or,

𝐴𝐱 𝟎 2

𝑥
1 2 2 1 𝑥 0
where, 𝐴 3 6 5 4 , 𝐱 𝑥 , and 𝟎 0 .
1 2 0 3 𝑥 0

The system 1 or 2 is known as homogeneous system of linear equations.

It is easy to see that a homogeneous system must have at least one solution. If we set 𝑥 0,
0
0
𝑥 0, 𝑥 0, 𝑥 0, i.e., 𝐱 𝟎 in the above system, we find that each of the
0
0
equations is satisfied. Therefore, 𝐱 𝟎 is a solution to this system. This solution is called
trivial solution.

A nonzero solution, if any, is called a nontrivial solution.

5
For example, 𝐱 1 is a nontrivial solution of (1) because
1
1

1 2 2 1 5 0
3 6 5 4 1 0
1
1 2 0 3 0
1

Saba Fatema Page | 4


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
The Nullspace of a Matrix
Nullspace of a matrix

If 𝐴 is an 𝑚 𝑛 matrix, then the set

𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎∈ℝ

is called the nullspace of 𝐴. In other words, the nullspace of a matrix 𝐴 is the set of all
solutions of the homogeneous system of linear equations 𝐴𝐱 𝟎.

For example, let

1 2 2 1
𝐴 3 6 5 4
1 2 0 3

The nullspace of 𝐴 is the set


𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎∈ℝ .

Consider

0 5 1
𝐱 0 , 𝐱 1 , 𝐱 2 .
0 1 2
0 1 1

We see that

0
𝐴𝐱 𝟎 𝐴𝐱 , but 𝐴𝐱 1 𝟎.
2

Therefore, the vectors 𝐱 , 𝐱 ∈ 𝑁 𝐴 but 𝐱 ∉ 𝑁 𝐴 .∎

Now we want to prove that the nullspace of 𝐴 is a subspace of ℝ .


Saba Fatema Page | 5
Lecturer
Department of Mathematics and Natural Sciences
Brac University 
The Nullspace of a Matrix
Theorem 1. If 𝐴 be an 𝑚 𝑛 matrix, then 𝑁 𝐴 is a subspace of ℝ .

Proof. Take 𝐱 , 𝐱 ∈ 𝑁 𝐴 . Then 𝐴𝐱 𝟎 𝐴𝐱 . Thus

𝐴 𝐱 𝐱 𝐴𝐱 𝐴𝐱 𝟎 𝟎 𝟎.

This proves that 𝐱 𝐱 ∈𝑁 𝐴 .

And for all scalars 𝑐,

𝐴 𝑐𝐱 𝑐𝐴𝐱 𝑐𝟎 𝟎.

This proves that 𝑐𝐱 ∈ 𝑁 𝐴 . This completes the proof. ∎

Note. The nullspace of matrix 𝐴 is also known as the solution space of 𝐴𝐱 𝟎.

Now we will find the nullspace of a matrix.

Consider,

1 2 2 1
𝐴 3 6 5 4
1 2 0 3

Recall that 𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎 ∈ ℝ . Consider 𝐱 ∈ ℝ as follows:

𝑥
𝑥
𝐱 𝑥 .
𝑥

Then we apply eliminations to 𝐴, which gives the following

1 2 2 1
𝐴 3 6 5 4
1 2 0 3


1 2 2 1 → 1 2 2 1 → 1 2 0 3
⎯⎯⎯⎯⎯⎯⎯⎯ 0 0 1 1 ⎯⎯⎯⎯⎯⎯⎯⎯ 0 0 1 1 ⎯⎯⎯⎯⎯⎯⎯ 0 0 1 1
0 0 2 2 0 0 0 0 0 0 0 0

Saba Fatema Page | 6


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
The Nullspace of a Matrix
Now the last matrix gives the following homogeneous system

𝑥 2𝑥 3𝑥 0

𝑥 𝑥 0

Since 𝑥 and 𝑥 are free variables, we set 𝑥 𝑠 and 𝑥 𝑡 where 𝑠, 𝑡 ∈ ℝ. Then

𝑥 2𝑠 3𝑡, 𝑥 𝑠, 𝑥 𝑡, 𝑥 𝑡.

Therefore, the solution vector 𝐱 can be written as

𝑥 2𝑠 3𝑡 2 3
𝑥 𝑠 1 0
𝐱 𝑥 𝑠 𝑡
𝑡 0 1
𝑥 𝑡 0 1

2 3
which gives the nullspace 𝑁 𝐴 𝑠 1 𝑡 0 .
0 1
0 1

Note. All the solutions of the above homogeneous system 𝐴𝐱 𝟎 are linear combination of
2 3
two vectors 1 and 0 , i.e. these two vectors span the solution space. When a
0 1
0 1
homogeneous system is solved from the row-echelon form or, from the reduced row-echelon
form, the spanning set is always independent.

 A basis of 𝑁 𝐴 is the set of linearly independent vectors in 𝑁 𝐴 .

2 3
𝐵 1 , 0
0 1
0 1

 The dimension of the nullspace of 𝐴 is called nullity. The nullity 𝐴 2.


Saba Fatema Page | 7
Lecturer
Department of Mathematics and Natural Sciences
Brac University 
The Nullspace of a Matrix
Rank of a matrix

The number of linearly independent vectors in the row space of a matrix 𝐴 is known as
row rank.

In other words, the dimension of the row space of a matrix 𝐴 is called the row rank of 𝐴.

Similarly, the number of linearly independent vectors in column space of a matrix 𝐴 is known
as column rank, i.e. the dimension of the column space of matrix 𝐴.

Theorem 2 If 𝐴 is an 𝑚 𝑛 matrix, then the row space and column space of 𝐴 have the same
dimension. ∎

The above theorem provides that,

row rank 𝐴 column rank 𝐴 rank 𝐴

Since we generally perform the row reduction to achieve the row echelon form, so the
number of nonzero rows in row echelon form of the matrix 𝐴 gives the rank of 𝐴.

Alternatively, we can say, rank 𝐴 is obtained by the number of pivots in row echelon form
of 𝐴.

1 2 2 1
Observe that, the reduced row echelon form of 𝐴 3 6 5 4 is
1 2 0 3

Pivots 1 2 0 3
0 0 1 1  
0 0 0 0

which has two nonzero rows, so the rank of 𝐴 is 2. Alternatively, we can say that there are 2
pivots in the reduced row echelon form of 𝐴, so rank 𝐴 is 2. Here, 𝑥 , 𝑥 are pivot variables.
On the other hand, 𝑥 , 𝑥 are free variables, so the dimension of the nullspace i.e. nullity is
also 2. So, we have the following observation:

rank 𝐴 nullity 𝐴 number of columns in 𝐴.


Saba Fatema Page | 8
Lecturer
Department of Mathematics and Natural Sciences
Brac University 
The Nullspace of a Matrix
This statement is officially known as the rank‐nullity theorem.

Theorem 3 If 𝐴 be an 𝑚 𝑛 matrix, then

rank 𝐴 nullity 𝐴 𝑛.

For example, to find the rank and nullity of

1 0 2 1 0
𝐴 0 1 3 1 3
2 1 1 1 3
0 3 9 0 12

We reduce the matix 𝐴 as follows:

1 0 2 1 0 1 0 2 0 1
𝐴 0 1 3 1 3 → 0 1 3 0 4
2 1 1 1 3 0 0 0 1 1
0 3 9 0 12 0 0 0 0 0

Since the reduced row echelon form has three nonzero rows, so

rank 𝐴 , 𝑟 3.

Also, the number of columns in 𝐴 is 𝑛 5, then by rank‐nullity theorem

nullity 𝐴 𝑛 𝑟

5 3

Theorem 4 Homogeneous linear system with 𝑛 𝑚 has at least one free variable.∎


Saba Fatema Page | 9
Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
Example 1 Find the nullspace, rank and nullity of the following matrices:

1 2 𝐴
i 𝐴 , ii 𝐵 , iii 𝐶 𝐴 2𝐴
3 8 2𝐴

Solution

1 2
i 𝐴
3 8

Here, 𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎 ∈ ℝ . Consider 𝐱 ∈ ℝ as follows:

𝑥
𝐱 𝑥 .

Then we apply eliminations to 𝐴,


1 2 → 1 2 1 2 → 1 0
𝐴 ⎯⎯⎯⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯⎯⎯⎯
3 8 0 2 0 1 0 1

The last matrix gives the following system

1 0 𝑥 0
0 1 𝑥 0
𝑥 0
or, 𝑥 , i.e. 𝑥 0, 𝑥 0.
0

0
Hence, 𝑁 𝐴 .
0

Rank 𝐴 , 𝑟 2.

Nullity 𝐴 𝑛 𝑟 2 2 0. ∎

Note. For the above matrix 𝐴, the nullspace contains only one solution, which is trivial
solution.

Saba Fatema Page | 10


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
1 2
𝐴 3 8
ii 𝐵
2𝐴 2 4
6 16

Here, 𝑁 𝐵 𝐱 ∈ ℝ : 𝐴𝐱 𝟎 ∈ ℝ . Consider 𝐱 ∈ ℝ as follows:

𝑥
𝐱 𝑥 .

Then we apply eliminations to 𝐵,


1 2 → 1 2 1 2 1 2 1 0

3 8 → 0 2 0 1 → 0 1 → 0 1
𝐵 ⎯⎯⎯⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯⎯⎯⎯
2 4 0 0 0 0 0 0 0 0
6 16 0 4 0 4 0 0 0 0

The last matrix gives the following system

1 0 0
0 1 𝑥 0
0 0 𝑥 0
0 0 0
𝑥 0
or, 𝑥 , i.e. 𝑥 0, 𝑥 0.
0

0
Hence, 𝑁 𝐵 .
0

Rank 𝐵 , 𝑟 2.

Nullity 𝐵 𝑛 𝑟 2 2 0. ∎

1 2 2 4
iii 𝐶 𝐴 2𝐴
3 8 6 16

Here, 𝑁 𝐶 𝐱 ∈ ℝ : 𝐴𝐱 𝟎 ∈ ℝ . Consider 𝐱 ∈ ℝ as follows:

𝑥
𝑥
𝐱 𝑥 .
𝑥

Saba Fatema Page | 11


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
Then we apply eliminations to 𝐶,

1 2 2 4
𝐶
3 8 6 16


→ 1 2 2 4 1 2 2 4 → 1 0 2 0
⎯⎯⎯⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯ ⎯⎯⎯⎯⎯⎯⎯⎯
0 2 0 4 0 1 0 2 0 1 0 2

The last matrix gives the following system

𝑥 0
1 0 2 0 𝑥 0
0 1 0 2 𝑥 0
𝑥 0

i.e.

𝑥 2𝑥 0

𝑥 2𝑥 0.

Since 𝑥 and 𝑥 are free variables, we set 𝑥 𝑠 and 𝑥 𝑡 where 𝑠, 𝑡 ∈ ℝ. Then

𝑥 2𝑠, 𝑥 2𝑡, 𝑥 𝑠, 𝑥 𝑡.

2𝑠 2 0
2𝑡 0 2
Hence, 𝑁 𝐶 𝑠 𝑡 .
𝑠 1 0
𝑡 0 1

Rank 𝐶 , 𝑟 2.

Nullity 𝐶 𝑛 𝑟 4 2 2. ∎

Saba Fatema Page | 12


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
Example 2 For the following matrix 𝐴, find (a) a basis for, and (b) the dimension of, the
solution space of 𝐴𝐱 𝟎.

3 6 21
𝐴 2 4 14
1 2 7

Solution

3 6 21
𝐴 2 4 14
1 2 7

We know that the solution space of 𝐴𝐱 𝟎 is the nullspace 𝑁 𝐴 .

Here, 𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎∈ℝ

Now we apply elimination to 𝐴 up to the reduced row-echelon form, and obtain the following


3 6 21 ↔ 1 2 7 →
1 2 7
𝐴 2 4 14 ⎯⎯⎯ 2 4 14 ⎯⎯⎯⎯⎯⎯⎯⎯ 0 0 0
1 2 7 3 6 21 0 0 0

The last matrix gives

1 2 7 𝑥 0
0 0 0 𝑥 0
0 0 0 𝑥 0

Which implies 𝑥 2𝑥 7𝑥 0.

Here, 𝑥 is pivot variable, and 𝑥 , 𝑥 are free variables.

Set, 𝑥 𝑠, 𝑥 𝑡, where 𝑠, 𝑡 ∈ ℝ. Then

𝑥 2𝑠 7𝑡, 𝑥 𝑠, 𝑥 𝑡.

Therefore, the solution vector 𝐱 can be written as

2𝑠 7𝑡 2 7
𝐱 𝑠 𝑠 1 𝑡 0
𝑡 0 1

Saba Fatema Page | 13


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
(a) A basis for the solution space of 𝐴𝐱 𝟎 is given by the following set

2 7
1 , 0
0 1

(b) The dimension of the solution space of 𝐴𝐱 𝟎 is 2. ∎

Example 3 Find (a) a basis for, and (b) the dimension of, the solution space of the following
homogeneous system of linear equations.

4𝑥 𝑦 2𝑧 0 2𝑥 2𝑥 4𝑥 2𝑥 0
i 2𝑥 3𝑦 2𝑧 0 ii 𝑥 2𝑥 𝑥 2𝑥 0
3𝑥 𝑦 𝑧 0 𝑥 𝑥 4𝑥 2𝑥 0

Solution

4𝑥 𝑦 2𝑧 0
i 2𝑥 3𝑦 2𝑧 0
3𝑥 𝑦 𝑧 0

Consider the above system as 𝐴𝐱 𝟎, where

4 1 2 𝑥 0
𝐴 2 3 2 , 𝐱 𝑦 and 𝟎 0
3 1 1 𝑧 0

We know that the solution space of 𝐴𝐱 𝟎 is the nullspace 𝑁 𝐴 .

Here, 𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎∈ℝ

Now we apply elimination to 𝐴, and obtain the following

4 1 2 1 0 0
𝐴 2 3 2 → 0 1 0
3 1 1 0 0 1

The last matrix gives

1 0 0 𝑥 0
0 1 0 𝑦 0
0 0 1 𝑧 0

Saba Fatema Page | 14


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
Which implies 𝑥 0, 𝑦 0, 𝑧 0

Therefore, the solution vector 𝐱 is

𝑥 0
𝐱 𝑦 0
𝑧 0

which is the trivial solution.

(a) Since, all the unknowns 𝑥, 𝑦, 𝑧 are pivot variables, and there is no free variable, so there
is no linearly independent vector in the solution space of the given system 𝐴𝐱 𝟎. Hence, A
basis for the solution space of 𝐴𝐱 𝟎 is given by the empty set ∅ .

(b)The dimension of the solution space of 𝐴𝐱 𝟎 is 0. ∎

2𝑥 2𝑥 4𝑥 2𝑥 0
ii 𝑥 2𝑥 𝑥 2𝑥 0
𝑥 𝑥 4𝑥 2𝑥 0

Consider the above system as 𝐴𝐱 𝟎, where

𝑥
2 2 4 2 𝑥 0
𝐴 1 2 1 2 , 𝐱 𝑥 and 𝟎 0
1 1 4 2 𝑥 0

We know that the solution space of 𝐴𝐱 𝟎 is the nullspace 𝑁 𝐴 .

Here, 𝑁 𝐴 𝐱 ∈ ℝ : 𝐴𝐱 𝟎∈ℝ

Applying elimination to the matrix 𝐴 yields,

2 2 4 2 1 0 0 5/8
𝐴 1 2 1 2 → 0 1 0 15/8
1 1 4 2 0 0 1 9/8

The last matrix gives

Saba Fatema Page | 15


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Worked Out Examples
𝑥
1 0 0 5/8 0
𝑥
0 1 0 15/8 𝑥 0
0 0 1 9/8 𝑥 0

Which implies

5
𝑥 𝑥 0
8
15
𝑥 𝑥 0
8
9
𝑥 𝑥 0
8

Here, 𝑥 , 𝑥 , 𝑥 are pivot variables, and 𝑥 is free variable.

Set, 𝑥 𝑡, where 𝑡 ∈ ℝ. Then

5 15 9
𝑥 𝑡, 𝑥 𝑡, 𝑥 𝑡, 𝑥 𝑡
8 8 8

Therefore, the solution vector 𝐱 can be written as

5 5
⎡ 𝑡⎤ ⎡ ⎤
⎢ 8 ⎥ ⎢ 8 ⎥
⎢ 15 𝑡⎥ ⎢ 15⎥
𝐱 ⎢ 8 ⎥ 𝑡⎢ 8 ⎥
⎢ 9 ⎥ ⎢ 9⎥
⎢ 8𝑡 ⎥ ⎢ 8⎥
⎣ 𝑡 ⎦ ⎣ 1⎦

(a) A basis for the solution space of 𝐴𝐱 𝟎 is given by the following set

5
⎧⎡ ⎤⎫
⎪⎢ 8⎥⎪
⎪ 15 ⎪
⎢ ⎥
⎢ 8⎥
⎨⎢ 9 ⎥ ⎬

⎪⎢ 8 ⎥ ⎪

⎩⎣ 1 ⎦ ⎭

(b) The dimension of the solution space of 𝐴𝐱 𝟎 is 1. ∎

Saba Fatema Page | 16


Lecturer
Department of Mathematics and Natural Sciences
Brac University 
Exercises
1. Find (a) the nullspace, (b) rank, and (c) nullity (or, dimension of the nullspace) of the
following matrices:
2 6 3 1
2 1 0 2 3 6 9
i 𝐴 ii 𝐴
3 2 1 1 1 2 3
0 6 2 0

2. For the following matrices, find (a) a basis for, and (b) the dimension of, the solution
space of 𝐴𝐱 𝟎.
1 3 2 4
2 1 1 2 3
i 𝐴 ii A iii 𝐴 0 1 1 2
1 3 0 1 0
2 6 4 8

3. Find (a) a basis for, and (b) the dimension of, the solution space of the following
homogeneous system of linear equations.
𝑥 𝑦 𝑧 0 3𝑥 3𝑥 15𝑥 11𝑥 0
i 3𝑥 𝑦 0 ii 𝑥 3𝑥 𝑥 𝑥 0
2𝑥 4𝑦 5𝑧 0 2𝑥 3𝑥 11𝑥 8𝑥 0

Saba Fatema Page | 17


Lecturer
Department of Mathematics and Natural Sciences
Brac University 

You might also like