column and row space of a matrix
TRANSCRIPT
Column and row space of a matrix
โข Recall that we can consider matrices as concatenation of rows or columns.
๐ด =
๐11 ๐12 ๐13๐21 ๐22 ๐23๐31 ๐32 ๐33
โข The space spanned by columns of a matrix is called โColumn Spaceโ, and denoted by Col(A).
โข The space spanned by rows of a matrix is called โRow Spaceโ, and denoted by Row(A).
๐1๐2๐3
๐1 ๐2 ๐3
Column and row space of a matrix
โข If matrix ๐ด is ๐ ร ๐, its columns are ๐-dimensional (โ๐).
โข The column space of ๐ด is a subspace of โ๐.
โข If matrix ๐ด is ๐ ร ๐, its rows are ๐-dimensional (โ๐).
โข The row space of ๐ด is a subspace of โ๐.
โข Example:
โข ๐ด =1 20 1โ1 0
.
โข ๐ด has two columns 10โ1
and 210
. These two columns span a plane in โ3
โข ๐ด has three rows 1 2 , 0 1 , and โ1 0 . These rows are linearly dependent (because they are 3 2-d rows), but they span the โ2 space.
Column and row space of a matrix
โข The equation ๐ด๐ = ๐ could be re-written as combination of columns of ๐ด:
๐ด๐ = ๐ โ ๐ฅ1๐1 + ๐ฅ2๐2 +โฏ+ ๐ฅ๐๐๐ = ๐
โข Or as dot product of rows of matrix ๐ด:
๐1 โ ๐ = ๐1๐2 โ ๐ = ๐2
โฎ๐๐ โ ๐ = ๐๐
Column space of a matrix
โข The equation ๐ด๐ = ๐ is solvable if and only if ๐ is in the column space of ๐ด.
โข In other words, ๐ should be in the span of columns of ๐ด, in order to ๐ด๐ = ๐ have solution.
โข Example:
โข ๐ด =1 20 1โ1 0
, ๐1 =41โ2
, ๐2 =40โ2
โข ๐ด๐ = ๐1 has solution because ๐1 is in the column space of ๐ด.(๐1 = 2๐1 + ๐2)
โข ๐ด๐ = ๐2 has NO solution because ๐2 is NOT in the column space of ๐ด.
Column space of a matrix
โข Example:
โข2 55 10 3
๐ฅ1๐ฅ2
=โ408
โข ๐1 =250
and ๐2 =513
are linearly
independent and span a plane in โ3.
โข But ๐ =โ408
is NOT in that plane.
โข So, the equation has NO solution.
Column space of a matrix
โข Example:
โข2 55 10 3
๐ฅ1๐ฅ2
=โ7โ6โ3
โข Now ๐โฒ =โ7โ6โ3
is in that plane.
โข So, the equation has a solution.
โข ๐โฒ = โ๐1 โ ๐2, so ๐ =โ1โ1
๐โฒ
Null space of a matrix
โข In equation ๐ด๐ = ๐, if ๐ = ๐ then ๐ด๐ = ๐ is called a homogenous equation.
โข This equation always has a trivial solution which is ๐ = ๐.โข We are interested in non-trivial solutions for homogenous equations.
๐ด๐ = ๐ โ ๐ฅ1๐1 + ๐ฅ2๐2 +โฏ+ ๐ฅ๐๐๐ = ๐
โข The above equation has non-trivial solutions if and only if the ๐1, ๐2, โฆ, ๐๐are linearly dependent.
โข The space spanned by the solution set of ๐ด๐ = ๐ is called the โNull spaceโ of ๐ด, and denoted as Nul(A).
Trivial vs. Non-trivial solutions
โข ๐ is a non-zero vector and it can span the line along its direction.
โข In other words, any point along its direction can be reached by ๐๐, where ๐ is a scalar.
โข ๐๐ can be zero only when ๐ = 0.
โข So, there is NO non-trivial
solution for ๐๐ = 0.๐
๐๐๐๐๐๐
๐๐
Trivial vs. Non-trivial solutions
โข ๐ and ๐ are linearly independent vectors.
โข So, they span the whole โ2 plane.
โข In other words, any point in the plane in which they spanned can be reached by ๐1๐ + ๐2๐, where ๐1 and ๐2 are scalars.
โข ๐1๐ + ๐2๐ can be zero only when ๐1 = 0 and ๐2 = 0.
โข So, there is NO non-trivial
solution for ๐1๐ + ๐2๐ = 0.
๐
๐๐๐๐๐๐
๐
Trivial vs. Non-trivial solutions
โข ๐, ๐, ๐ are linearly dependent vectors in โ2.
โข So, the span is still the whole โ2plane.
โข There are infinite set of (๐1, ๐2, ๐3) that can satisfy ๐1๐ + ๐2๐ + ๐3๐ =๐, besides (0,0,0).
โข Example:
โข ๐ =12, ๐ =
21, ๐ =
โ1โ1
โข Non-trivial solution for ๐1๐ + ๐2๐ + ๐3๐ = ๐
โข ๐(1,1,โ3) for any ๐ โ โ โ 0
๐
๐๐๐๐๐๐
๐๐
Null space of a matrix
โข So, matrix ๐ด has a non-trivial null space if and only if its columns are linearly dependent.
โข Example:
โข ๐ด =2 55 10 3
, ๐1and ๐2are linearly independent. So, Null space of ๐ด has only the zero vector.
โข ๐ด =2 5 75 1 60 3 3
, ๐1, ๐2, and ๐3 are linearly dependent. So, Null space of ๐ด is
the span of โ1โ11
.
Null space of a matrix
โข Recall that we can re-write ๐ด๐ = ๐ as following:๐1 โ ๐ = ๐1๐2 โ ๐ = ๐2
โฎ๐๐ โ ๐ = ๐๐
โข Now if we substitute ๐ = ๐:๐1 โ ๐ = 0๐2 โ ๐ = 0
โฎ๐๐ โ ๐ = 0
Null space of a matrix
โข The non-trivial solution for ๐ด๐ = ๐ will be perpendicular to all rows of ๐ด.
โข In other words, the null space of ๐ด is perpendicular to row space of ๐ด.
โข Example:
โข ๐ด =2 5 75 1 60 3 3
, Null space of ๐ด is the span of โ1โ11
.
2 5 7โ1โ11
= 0, 5 1 6โ1โ11
= 0, 0 3 3โ1โ11
= 0
Null space of a matrix
โข Cont. Example :โข In Figure below, you can see all the rows
are in the same plane.
โข In right Figure, you can see the row space and null space
from an appropriate perspective that shows they
are perpendicular.
Null space vs. Row space
โข Null space and row space, both are subset of โ๐.
โข Null space and row space, are perpendicular to each other.
โข Null space and row space, are complement of each other in โ๐.
โข Example:โข ๐ด is 4 ร 3 matrix. Itโs row space span a plane. What is the dimension of its
null space?
โข Null space and row space are bases for โ3. Since its row span a plane, then dim(Row(A))=2. Null(A)=3-2=1.
How to compute null space
โข Example: Find a spanning set for the null space of the matrix
๐ด =โ312
6โ2โ4
โ125
138
โ7โ1โ4
Solution: The first step is to find the general solution of ๐ด๐ฅ = 0 in terms of free variables. Row reduce the augmented matrix ๐ด 0 to reduce echelon form in order to write the basic variables in terms of free variables.
100
โ200
010
โ120
3โ20
000
๐ฅ1 โ 2๐ฅ2 โ ๐ฅ4 + 3๐ฅ5 = 0๐ฅ3 + 2๐ฅ4 โ 2๐ฅ5 = 0
0 = 0
How to compute null space
โข The general solution is ๐ฅ1 = 2๐ฅ2 + ๐ฅ4 โ 3๐ฅ5, ๐ฅ3 = โ2๐ฅ4 + 2๐ฅ5 with ๐ฅ2, ๐ฅ4 and ๐ฅ5 free. Next, decompose the vector giving the general solution into a linear combination of vectors where the weights are the free variables.
๐ฅ1๐ฅ2๐ฅ3๐ฅ4๐ฅ5
=
2๐ฅ2 + ๐ฅ4 โ 3๐ฅ5๐ฅ2
โ2๐ฅ4 + 2๐ฅ5๐ฅ4๐ฅ5
= ๐ฅ2
21000
+ ๐ฅ4
10โ210
+ ๐ฅ5
โ30201
= ๐ฅ2๐ข + ๐ฅ4๐ฃ + ๐ฅ5๐ค
Every linear combination of ๐ข, ๐ฃ and ๐ค is an element of null(A). Thus ๐ข, ๐ฃ, ๐ค is the spanning set for null(A).
๐ ๐ ๐