5.2 rank of a matrix. set-up recall block multiplication:

29
5.2 Rank of a Matrix

Upload: casey-stanley

Post on 14-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

5.2 Rank of a Matrix

Page 2: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Set-upRecall block multiplication: A C1 C2 ... Cn

R1

R2

...

Rm

A

x1

x2

...

xn

C1 C2 ... Cn

x1

x2

...

xn

x1C1 ... xnC

y1 y2 ... ym

R1

R2

...

Rm

y1R1 y2R2 ... ymRm

Page 3: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 1

The following conditions are equivalent for an n x n matrix A:

1. The rows of A are linearly independent in n.

2. The rows of A span n.

3. The columns of A are linearly independent in n.

4. The columns of A span n.

5. A is invertible.

Page 4: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Proof of Theorem 1

To prove that 5 statements are equivalent, we can prove that

(1)(2)(3)(4)(5)(1) or could do:

(1)(2)(5)(3)(4)(1) which we will do.

Proof: (1) (2) given the rows are linearly independent in n and we know dim n = n, we know then that the rows must form a basis, and thus span n.

Page 5: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Proof of Theorem 1 (cont)

(2) (5) If we can find a matrix B such that BA = I, then we know A is invertible. Let row i of B be K = [k1 k2 … kn]Then I = BA results in:Row i of I = row i of BA = KA = k1 k2 ... kn

R1

R2

...

Rn

k1R1 ... knRn

Since the rows of A span n, we know that such ki exist (we know we can create any vector in n using linear combinations of the rows in A).

Therefore, each row of B can be found making A invertible.

Page 6: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Proof of Theorem 1 (cont)

We will now show (5)(1) and leave (3) and (4) for hw.(5) (1): Let k1R1+…+knRn = 0 where Ri is the ith row of A. Let K = [k1 k2 … kn] so KA = k1R1+…+knRn = 0 Right multiply by A-1 to get K=0, which means k1=…=kn = 0which means that the rows of A are linearly independent.

Page 7: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

A use of Theorem 1

So now to show that an (n x n) matrix is invertible, we just need to show that the rows are linearly independent or that they span n.

Or to show that the rows are linearly independent or that the rows span n, we could show that the matrix is invertible.

Page 8: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Example 1

Show that {(1,2,-1), (3,1,-4), (1,1,7)} is a basis for 3.

We just need to show that the matrix with these vectors as rows is invertible which can be done by showing that it has rank 3, or by showing that the determinant is not zero, etc.

Page 9: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

DefinitionIf A is an m x n matrix, the rows of A are vectors in n, and the subspace of n spanned by these rows is called the row space of A (row A).

The space spanned by the columns of A is called the column space of A (col A).

Page 10: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 2A (m x n), U (p x m),V (n x q)

1. row(UA) row A with equality if U is invertible (& square)

2. col(AV) col A with equality if V is invertible (& square)

Page 11: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Proof of Theorem 2Proof: R1,R2,…,Rm are rows of A

row i of mtx U is: U i u i 1 u i 2 ... u im row i of UA = UiA=

ui1 ui2 ... uim

R1

R2

...

Rm

u i1R1 ui2R2 ...uimRm

So the rows of UA are in the row space of A, which means that row (UA) row A.If U is invertible: row A = row[U-1(UA)] row UA (same logic as above) so row A = row (UA).(same for part 2)

Page 12: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 3-Rank TheoremA (m x n)

Then, dim(row A) = dim(col A)

Also, A can be carried to row echelon form matrix R, and if r is the number of nonzero rows in R,

1. The r nonzero rows are a basis of (row A)

2. If the leading 1’s are in columns j1,j2,…,jr, then

{j1,j2,…,jr} is a basis of (col A)

Page 13: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 3-ProofR = UA (U is the product of elementary matrices and is invertible).

row A = row R (by theorem 2) since U is invertible

For a matrix in row echelon form, the rows form a basis for the rows since they span the rows and are linearly independent. Since row A = row R, the nonzero rows also form a basis for A.

Page 14: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 3-Proof (cont)(2)

A C1 C2 ... Cn R UA U C1 C2 ... Cn UC1 UC2 ... UCn

B={UCj1, UCj2,…,UCjr} is the set of columns of R w/ a leading 1.

In homework, you will prove that for a matrix is ref, the columns with leading 1’s form a basis of col R (since they’re li). So B is a basis for R.

Page 15: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 3-Proof (cont)Since {UCj1, UCj2,…,UCjr} is LI, a

U C j1 C j 2 ... C jr is.LIa1UC j 1 a2UC j 2 ... arUC jr 0 a1 ... ar 0

U(a1C j1 a2C j 2 ...a rC jr) 0

(a1C

j1a

2Cj 2

... arCjr) 0 a

1... a

r0

So {Cj1, Cj2,…,Cjr} is LI and it spans A so it is a basis of col A.

dim(rowA)=r=dim(colA) and is called the rank �

Page 16: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

CorollaryIf A can be carried to R in ref by elementary row ops, then the rank of A is equal to the number of nonzero rows of R.

Page 17: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Example

Find basis for row and col space of A and find rank

A

2 4 6 8

2 1 3 2

4 5 9 10

0 1 1 2

Note that the basis of row space comes from ref, and the basis of col space comes from initial state.

Page 18: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Corollaries

Cor 2: If A is mxn, then rank A ≤m and rank A≤ n

Cor 3: If A is any matrix, rank A = rank AT

Cor 4: A (m x n), U (m x m) and V (n x n) invertible, then

rank A = rank (UA) = rank (AV) ( by theorem 2)

Cor 5: A (n x n) is invertible iff rank A = n.

Page 19: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Example

Find basis of U=span {(1,-1,0,3),(2,1,5,1),(4,-2,5,7)}

Can just write in matrix form and row reduce.

Page 20: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 4

A (m x n) has rank r iff there exist invertible matrices U (mxm) and V(nxn) such that

UAV Ir 0

0 0

Where Ir is the r x r identity matrix

Proof the row operations that take A to R (rref) also carry Im to Invertible U such that UA = R so A Im R U

R has r nonzero rows, which contain columns of Ir.

Page 21: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 4

Then take RT and put it in rref using U1 so then

U1RT

Ir 0

0 0

Let V=U1T and we have:

UAV RU1

T (U1RT )T

Ir 0

0 0

T

Ir 0

0 0

And also rank A = r if these U and V exist (by Cor 4)

Page 22: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Use of this

Now we can find these U and V which will reduce A to this form.1) Find U from A Im R U

2) Find V from RT In Ir 0

0 0

V T

Page 23: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Example

Find invertible matrices U and V such that

UAV Ir 0

0 0

,r rankA

A 1 1 1

2 2 4

Page 24: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Definition

A (mxn). The set of solutions to AX=0 is a subspace of n called the null space of A (null A)

Page 25: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 5

A (m x n) and r = rank A. Then dim (null A) = n-rProof: Recall that when you solve a homogeneous system, you either get a unique solution if the A is invertible (in which case the set of solutions contains no parameters and thus dim (nullA) = 0.Or, A could reduce to have fewer equations than variables in which case the solution will be of a form like: x1

x2

x3

s

2

0

1

t

1

1

2

Which has dim = 2 = # parameters

So we just need to find the number of parameters.

Page 26: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 5-Proof-formal

A (m x n) and r = rank A. Then dim (null A) = n-rProof: null (A) = {X | AX = 0}. Let UAV

Ir 0

0 0

,U,V ..invertible

null(A) = null(UA) since U is invertible

dim(null(UA)) = dim(null(UAV)) since V invertible

So dim (null(A))=dim(null(UAV))

UAV is in rref so dim (null(UAV)) = n-r (# var-rank)=# parameters.

Page 27: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Example

Find the basis of the nullspace of A

3 1 1

2 0 1

4 2 1

1 1 1

Just find the sol’n to the homogeneous system and then the dimension is the number of parameters, and the vectors will form the basis.`

Page 28: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 6The following conditions are equivalent for an (m x n) matrix.1. Rank A = m2. The rows of A are LI3. If YA = 0 with Y in m, then Y=04. AAT is invertible

Proof: (1)(2) rank A = m implies the m rows form a basis for row A which implies that the rows are LI(2)(3) YA = y1R1+y2R2+…+ymRm = 0 implies y1=y2=..=ym= 0Since the rows of A are LI, so Y = 0.

Page 29: 5.2 Rank of a Matrix. Set-up Recall block multiplication:

Theorem 6 (proof cont)(3)(4) We will show that Y(AAT) implies Y=0(YA)(YA)T = YAATYT =0YT=0So YA = 0 (since (YA)(YA)T =0 and a AAT=0 implies A=0) so Y = 0 (given in 3)

(4)(1) Just need to show that {R1,R2,…,Rm} is LILet x1R1+…+xmRm = 0. X x1 ... xm So XA = 0.

So XAAT = 0

So X=0 since AAT is invertible

So all x’s are 0 and rows are li �