Escolar Documentos
Profissional Documentos
Cultura Documentos
Singular Value
Decomposition
Motivation
A : any matrix
with compl ete set of e-vectors
A SS 1
A : any matrix
A1 S1S 1
A LU
LUx b
Ly b
Ux y
Clearly
the winner
x S1S 1b
Assume A full rank
A : symmetric matrix
A : any matrix
A QQT
A UV
A1 Q1QT
T
1
A V U
x Q1QT b
x V 1U T b
2
orthonormal
basis in C(AT)
row
space
column
space
Rn
Ax=0
orthonormal
basis in C(A)
Rm
ATy=0
3
SVD (2X2)
I havent told
you how to
find vis (p.9)
Assume r 2
unit vectors in C ( A ) : v1 v2
T
Av1
Av1
Av1
, u2
Av 2
Av 2
Av 2
: represent the
length of images;
hence non-negative
u2
UV
AS=S , A=SS1
A=QQT
( )-1=( )T
Implication:
Matrix inversion
A UV T
Ax=b
UV
T 1
V U
A UV T
Ax b
UV x b
V x U b ... diagonal system
T
More on U and V
2
T V: eigenvectors of ATA
T
T
T
T
1
A A V U UV V
V
2
2
U: eigenvectors of AAT
Similarly,
2
T
T
T
T
1
AA UV V U U
U
2
2
SVD: A=UVT
1
1
1
5 3
A A
, v1
3 5
1
T
1 2
2
, v2
2
1 2
2 2
1
1
Av1
1 , u1
0
0
0
0
0
0
Av 2 2 , u2
2
1
1
1 0 2 2
A UV
0
1
0
T
STEPS:
1. Find e-vectors of ATA;
normalize the basis
2. Compute Avi, get i
If i 0, get ui
Else find ui from N(AT)
0 1 2 1
2 1 2 1
SVD Theory
AV U
Av j j u j , j 1,2,, r
Else, vj in C(AT)
[UTA=VT=0]
10
1
1
1
1
2
Av1 1u1
2 2 1 1
1 2
1 1
1 1
1 1 10
5
2
1
v2 v1 v2 N ( A) Av2 0 v2
2
Can also be
obtained from
e-vectors of ATA
1
1
1 1
u2 u1 u2 N ( A ) A u2 0 u A 0 u1
5 2
T
2 2
1 2 1 10
T
1 1 UV
1 2
5
T
2
0 1 1 1
1 1
0 2
11
Example (cont)
2 2
1 2 1 10 0 1 1 1
T
1 1 UV
1 2
1 1
5
2
0
0
A UV T u1
u1
1 0 v1T
u2
T
0 0 v2
1v1T
T
u2
u
v
1 1 1
0
Extend to Amxn
Avi i ui , i 1,, r
Av1 vr
vr 1 vn u1
Basis of N(A)
ur ur 1 um
Basis of N(AT)
Dimension Check
AV U
Amn U mm mnVnTn
A A
AA
T
nn
mm
UV V V
UV UV U V
UV
T T
T T
nn
mm
nn
T
nn
mm
T
mm
13
vr 1 vn u1 ur
ur 1 um
Summation of r
rank-one matrices!
v
vrT
A 1u1 r ur 0 0 T 1u1v1T r ur vrT
vr 1
Bases of N(A) and N(AT) T They are useful only for
vm
do not contribute
T
1
nullspace solutions
14
1 1 0
A
, r 2, A23V33 U 22 23
0 1 1
1 1 0
1 3 3 2
T
Av1
V : A A 1 2 1
6 3
6
0 1 1
1 1
Av2
1
1
1 3, v1
2
1
6
1
0
1
1
2 1, v2
0
2
1
1
1
0
1
3 0, v3
1
(nullspace
)
3
1
1 0
1 1
1
2
1
1, 1 3
1, 2 1
2
1
6
2
6
1
6
1
2
0
1
2
1
3
1
3
1
3
1 1 1 3
1 1
2
1
C(AT) N(A)
C(A)
1 0 1 1 1 3
1 1
2 1 1
1
1
6
1
2
1
3
2
6
0
1
3
1
2
1
2
1
3
15
1 0
A 1 1, r 2, A32V22 U 33 32
0 1
1
1
6
2
1
Av
1
V : AT A
2
2
1
1 2
1 3, v1
1
2
1
1
2 1, v2
1
2
1
1
1
1
2 3
6
1
1
1
2 , 1 3
6
1
1
Its alright if we fill N(AT) with 0 if
1
Av2
0 , 2 1 we only care about C(AT) and C(A),
2
1
the ones correspond to nonzero s
Av3 0 basis of N ( AT )... obtained in e - vector of AAT , or ortherwise
1 0
1 1 1 1 1
2 1 1
0 1
C(AT)
1 0
1 1
0 1
1
6
2
6
1
6
1
2
0
1
2
1
6
2
6
1
6
1
2
0
1
2
C(A)
1
3
3
1
3
1
3
1
3
1
3
1
3
N(AT)
1 1 1
1
1 1
2
16
Summary
17
SVD Applications
Image compression
Solve Ax=b for all cases (unique, many, no solutions; least
square solutions)
rank determination, matrix approximation,
18
UV x b Vx U
b
T
z d
If i 0 but d i 0,
solution does not exist
19
Ax=b (inconsistent)
2 2
8
A
,b
1 1
3
2 2
1 2 1 10
T
1 1 UV
1 2
5
0
10
0 1 1 1
0 2 1 1
0 z1
1 2 1 8 20 5
T
U b
z
1
2
3
5
0 2
2 5
No solution!
20
Ax=b (underdetermined)
2 2
8
A
,b
1 1
4
2 2
1 2 1 10
T
1 1 UV
1 2
5
0 1 1 1
0 2 1 1
10
0 z1
1 2 1 8 20 5
T
U b
5 1 2 4 0
0 z 2
z1 2 2
1 1 1 2 2 2
x particular Vz
z
1 1
2
0 2
2 0
2 1 2
xcomplete x particular xnull c
2
1 2
21
Pseudo Inverse
(Sec7.4, p.395)
The role of A:
A ui
A Vnn nmU mT m
v1 vr
11
vn
r1
u u u
r
m
1
23
x A b V U b
24
25
26
1 1
2
1 0 2 2 0 1 2 1 2
T
A UV
0
1
2 1 2 1 2
0
Ax b UV T x b x Vdiag (1 / i )U T b
1
x
1
2
2
1
1 2 2 2
0
1 2
0 1 0 0 1
1
0 1 2 1
2
27
Ex: under-determined
Ax b
1 1 0
0 1 1
1 1 0
2
x
0 1 1
0
1
1
1
6
2
3
1 1 1 3
2
1
0
1 1
6
3
2
1
1
1
1
6
2
3
1 1 0
0 1 1
1
2
1
2
1
2
1
2
1
6
1
2
1
3
2
6
0
1
3
1
6
1
2
1
3
x A b V U T b
1
6
2
6
1
6
1
2
0
1
2
y
z
1
3
1
2
1
2
1
2 3 22
2
3 2
1
0 1
2
3 2
43
2
0 23
1 2
2
2
1
2
28
Under-determined (cont)
x y 2
yz 0
Complete Solution :
2 1
x 0 c 1 Geometrically, a line in R 3
0 1
x A b gives a particular with smallest x
43
2
3
32
1
1
1
29
Ex: over-determined
1 0
1
A 1 1, b 2 , r 2, A32V22 U 33 32
0 1
1
1 0
1 1
0 1
A UV T
1
6
2
6
1
6
1
2
0
1
2
1
3
1
3
1
3
3
1 1 1
1 1
2
A V U T
Over-determined (cont)
x V U T b
1
1 1
1 1
Compare AT Ax AT b
1
3
16
1
2
x
1 1
1 1
1 1 2 3 2 53
1 1 1
2 3
0
y
1
2
z 1
1
6
1
2
x 2 y z
1
3
2
6
2 1 x1 3
1 2 x 1
2
x1 53
x 1
2 3
Same
result!!
31
1 1
3
2 2
1 2 1 10
T
1 1 UV
1 2
5
0 1 1 1
1 1
0 2
x V U T b
1
2
1
2
215
1
2 5
x
y 0
0
0 x
0 2
5
0 x
8 15
1
y 3 5
1
10
2
5
1
5
2 x 2 y 8
x y 3
8
y 3
1
5
1
10
1
10
8 19
10
19
3 10
32
Matrix Approximation
Ai U iV T
i : the rank i version of (by setting last m i ' s to zero)
Ai : the best rank i approximation to A in the sence of Euclidean distance
A 1u1v1T 2u2 v2T mum vmT
Storage save : rank one matrix (m n) numbers
Operation save : m n
Image Compression
Original
6464