![]()
MATH347DS L06: The singular value decomposition
|
The singular value decomposition (SVD)
Motivation
Theorem
Another essential diagram: SVD finds orthonormal bases for
SVD computation
Rank-1 expansion of a matrix
SVD in image compression, analysis
The pseudo-inverse
![]()
Motivation singular value decomposition (SVD)
|
Motivation: FTLA does not specify bases for .
Question: Is there some “natural” basis for the fundamental matrix subspaces?
Consider linear mapping: , ,
The input is given in the identity matrix basis,
The output is also obtained in the identity matrix basis,
In these basis the effect of might be costly to compute
What would be simpler? One possibility: a simple scaling of each component suggested by
![]()
Stating desired behavior
|
Seek different bases for domain, codomain of , ,
an orthonormal basis in , ,
an orthonormal basis in , ,
impose that the effect of in the new bases is a simple component scaling
Note that
![]()
Can it be done? Yes: Singular value decomposition theorem
|
Theorem. (SVD) For any , , with , orthogonal, pseudo-diagonal , ,
The SVD is determined by eigendecomposition of , and
, an eigendecomposition of . The columns of are eigenvectors of and called right singular vectors of
, an eigendecomposition of . The columns of are eigenvectors of and called left singular vectors of
The matrix has zero elements except for the diagonal that contains , the singular values of , computed as the square roots of the eigenvalues of (or )
![]()
An all-encompassing diagram: SVD and matrix subspaces
|
SVD of reveals: , bases for
![]()
SVD Computation
|
From deduce , , hence is the eigenvector matrix of , and is the eigenvector matrix of
SVD computation is available in Julia, Octave, Matlab, Mathematica ...
∴ |
short(x) = round(x,digits=6); |
∴ |
A=[2 -1; -3 1]; F=svd(A); U=F.U; Σ=Diagonal(F.S); Vt=F.Vt; short.([A U*Σ*Vt]) |
(1)
∴ |
short.([U Σ Vt']) |
(2)
∴ |
SVD of diagram,
![]()
Additive decomposition of
|
, carry out block multiplication
The above is known as a “rank-one” expansion since . Note that and is a matrix whose columns are scalings of
SVD theorem: , Often
![]()
Low-rank matrix approximation
|
Full SVD
Truncated SVD
Many applications, e.g., image compression
![]()
Why does SVD image compression work?
|
Consider , data streams in time of inputs and outputs
Is there some function linking outputs to inputs?
Seek answer by first asking: is correlated to ?
Introduce mean values
is the expectation, a linear mapping, whose associated matrix is
Shift data such that . Define correlation coefficient
uncorrelated, if ; correlated, if ; anti-correlated, if .
![]()
Examples
|
Correlated signals
∴ |
t=0:0.01:1; x1=1.0*t; x2=t.^2; rho=transpose(x1)*x2/norm(x1)/norm(x2) |
∴ |
Uncorrelated signals
∴ |
m=size(x1)[1]; x3=2*(rand(m,1).-0.5)[:,1]; rho=transpose(x1)*x3/norm(x1)/norm(x3) |
∴ |
Anticorrelated signals
∴ |
x4=-t.^2; rho=transpose(x1)*x4/norm(x1)/norm(x4) |
![]()
Extend correlation to input, output vectors
|
Are input and output parameters , well chosen?
Perhaps components are redundant, a more economical description might be
Extend idea from correlation coefficient: take measurements
Choose origin such that
Covariance matrix (generalization of single variable variance)
![]()
Reduced description by truncation of covariance matrix SVD
|
SVDs: , ,
Take first column vectors of , ,
System description in terms of is more economical than that in terms of
In image compression, successive pixel columns are correlated and reduced descriptions are possible
![]()
SVD solution of linear algebra problems: linear systems, least
squares
|
Consider linear system , , . SVD solution steps:
Compute the SVD, ;
Find the coordinates of in the orthogonal basis , ;
Scale the coordinates of by the inverse of the singular values , , such that is satisfied;
Find the coordinates of in basis , .
What if , . If above procedure still works with a simple modification of step 3 with going now from 1 to
;
;
,
.
If , . If , the above steps give the best approximation of by linear combination of columns of in the 2-norm
![]()
Pseudo-inverse matrix
|
Since the steps to solve a linear system or find best approximation are identical define a matrix that carries out all steps:
Recall . Define
Gather all above steps into a single matrix called the pseudo-inverse of .
The solution then to a linear system (either exact solution of best approximation) is
In Julia, Matlab, Octave, above procedure is implemented through x=A\b.