outline chapter 6: lecture 25 - university of...

3
Ch. 6: Lec. 25 The fundamental theorem of linear algebra Approximating matrices with SVD The basic idea Guess who? Bonus example 1 Bonus example 2 Frame 1/16 Chapter 6: Lecture 25 Linear Algebra, Course 124B, Fall, 2008 Prof. Peter Dodds Department of Mathematics & Statistics University of Vermont Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. Ch. 6: Lec. 25 The fundamental theorem of linear algebra Approximating matrices with SVD The basic idea Guess who? Bonus example 1 Bonus example 2 Frame 2/16 Outline The fundamental theorem of linear algebra Approximating matrices with SVD The basic idea Guess who? Bonus example 1 Bonus example 2 Ch. 6: Lec. 25 The fundamental theorem of linear algebra Approximating matrices with SVD The basic idea Guess who? Bonus example 1 Bonus example 2 Frame 3/16 All the way with A x = b: Applies to any m × n matrix A. Symmetry of A and A T . Where x lives: Row space C(A T ) R n . (Right) Nullspace N (A) R n . dim C(A T ) + dim N (A) = r +(n - r )= n Orthogonality: C(A T ) N (A)= R n Where b lives: Column space C(A) R m . Left Nullspace N (A T ) R m . dim C(A) + dim N (A T ) = r +(m - r )= m Orthogonality: C(A) N (A T )= R m Ch. 6: Lec. 25 The fundamental theorem of linear algebra Approximating matrices with SVD The basic idea Guess who? Bonus example 1 Bonus example 2 Frame 4/16 Best solution x * when b = p + e: Space Left Null R m 0 0 d = m - r d = r Row Space Column Space R n Null Space x n x r A x n = 0 A x r = p Ax * = p d = n - r d = r x * = x r + x n p b e

Upload: others

Post on 31-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Outline Chapter 6: Lecture 25 - University of Vermontpdodds/teaching/courses/2008-08UVM-124/docs/... · 2009-01-14 · Chapter 6: Lecture 25 Linear Algebra, Course 124B, Fall, 2008

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 1/16

Chapter 6: Lecture 25Linear Algebra, Course 124B, Fall, 2008

Prof. Peter Dodds

Department of Mathematics & StatisticsUniversity of Vermont

Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 2/16

Outline

The fundamental theorem of linear algebra

Approximating matrices with SVDThe basic ideaGuess who?Bonus example 1Bonus example 2

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 3/16

All the way with A~x = ~b:I Applies to any m × n matrix A.I Symmetry of A and AT.

Where ~x lives:I Row space C(AT) ⊂ Rn.I (Right) Nullspace N(A) ⊂ Rn.I dim C(AT) + dim N(A) = r + (n − r) = nI Orthogonality: C(AT)

⊗N(A) = Rn

Where ~b lives:I Column space C(A) ⊂ Rm.I Left Nullspace N(AT) ⊂ Rm.I dim C(A) + dim N(AT) = r + (m − r) = mI Orthogonality: C(A)

⊗N(AT) = Rm

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 4/16

Best solution ~x∗ when ~b = ~p + ~e:

Space

Left Null

Rm

~0

~0

d = m− r

d = r

Row SpaceColumn Space

Rn

Null Space

~xn

~xr

A ~xn = ~0

A~xr = ~p

A~x∗ = ~p

d = n− r

d = r

~x∗ = ~xr + ~xn

~p

~b

~e

Page 2: Outline Chapter 6: Lecture 25 - University of Vermontpdodds/teaching/courses/2008-08UVM-124/docs/... · 2009-01-14 · Chapter 6: Lecture 25 Linear Algebra, Course 124B, Fall, 2008

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 5/16

Fundamental Theorem of Linear Algebra

Now we see:I Each of the four fundamental subspaces has a ‘best’

orthonormal basisI The vi span Rn

I We find the vi as eigenvectors of ATA.I The ui span Rm

I We find the ui as eigenvectors of AAT.

Happy bases

I {v1, . . . , vr} span Row spaceI {vr+1, . . . , vn} span Null spaceI {u1, . . . , ur} span Column spaceI {ur+1, . . . , um} span Left Null space

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 6/16

Fundamental Theorem of Linear Algebra

How A~x works:I A = UΣV T

I A sends each ~vi ∈ C(AT) to its partner ~ui ∈ C(A) witha stretch/shrink factor σi > 0.

I A is diagonal with respect to these bases and haspositive entries (all σi > 0).

I When viewed the right way, any A is a diagonalmatrix Σ.

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 8/16

Image approximation (80x60)

Idea: use SVD to approximate images

I Interpret elements of matrix A as color values of animage.

I Truncate series SVD representation of A:

A = UΣV T =r∑

i=1

σi ui vTi

I Use fact that σ1 > σ2 > . . . > σr > 0.

I Rank r = min(m, n).I Rank r = # of pixels on shortest side.I For color: approximate 3 matrices (RGB).

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 10/16

Image approximation (80x60)

A =123456789102030405060∑

i=1

σi ui vTi

Page 3: Outline Chapter 6: Lecture 25 - University of Vermontpdodds/teaching/courses/2008-08UVM-124/docs/... · 2009-01-14 · Chapter 6: Lecture 25 Linear Algebra, Course 124B, Fall, 2008

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 11/16

Decay of sigma values: Einstein

0 20 40 600

2000

4000

6000

8000

10000

k

σ k

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 12/16

Image approximation (480x615)

A =123456789102030405060480∑

i=1

σi ui vTi

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 14/16

Image approximation (480x640)

A =123456789102030405060100200320480∑

i=1

σi ui vTi

Ch. 6: Lec. 25

The fundamentaltheorem of linearalgebra

Approximatingmatrices with SVDThe basic idea

Guess who?

Bonus example 1

Bonus example 2

Frame 16/16

Image approximation (480x640)

A =123456789102030405060100200320480∑

i=1

σi ui vTi