column and row space of a matrix

17
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

Upload: others

Post on 12-Jan-2022

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Column and row space of a matrix

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

Page 2: Column and row space of a matrix

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.

Page 3: Column and row space of a matrix

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

โ‹ฎ๐’“๐‘š โˆ™ ๐’™ = ๐‘๐‘š

Page 4: Column and row space of a matrix

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 ๐ด.

Page 5: Column and row space of a matrix

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.

Page 6: Column and row space of a matrix

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

๐’ƒโ€ฒ

Page 7: Column and row space of a matrix

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).

Page 8: Column and row space of a matrix

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.๐’‚

๐‘œ๐‘Ÿ๐‘–๐‘”๐‘–๐‘›

๐‘๐’‚

Page 9: Column and row space of a matrix

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.

๐’‚

๐‘œ๐‘Ÿ๐‘–๐‘”๐‘–๐‘›

๐’ƒ

Page 10: Column and row space of a matrix

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

๐’‚

๐‘œ๐‘Ÿ๐‘–๐‘”๐‘–๐‘›

๐’ƒ๐’„

Page 11: Column and row space of a matrix

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

.

Page 12: Column and row space of a matrix

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

Page 13: Column and row space of a matrix

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

Page 14: Column and row space of a matrix

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.

Page 15: Column and row space of a matrix

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.

Page 16: Column and row space of a matrix

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

Page 17: Column and row space of a matrix

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).

๐’– ๐’— ๐’˜