[TOC]
svd
Singular value decomposition
Introduction
Let be a real matrix. Then, there exist orthogonal matrices and such that
where is the transpose of . The matrix , where . The real numbers are called the singular values of .
If is complex, there exist unitary matrices and such that
where is the conjugate transpose of . The real numbers are called the singular values of .
Thin SVD
The following results hold for real . Similar results hold for complex as well and hence we omit the discussion here.
If with , then
where
- contains the first columns of .
- contains the first columns and first rows of .
If with , then
where
- contains the first columns of .
- contains the first columns and first rows of .
Usages
s = svd(A)
s = svd(A,0)
s = svd(A,'econ')
A is a real or complex matrix. It should not contain Inf nor NaN.
- It returns the column vector of singular values, i.e., , where and .
[U,S,V] = svd(A)
A is a real or complex matrix. It should not contain Inf nor NaN.
- It returns the matrices , and in Equation (1) or (2).
[U,S,V] = svd(A,0)
A is a real or complex matrix. It should not contain Inf nor NaN.
- When , it returns , and of Equation (3)
- When , it returns , and of Equation (1) or (2).
[U,S,V] = svd(A, 'econ')
A is a real or complex matrix. It should not contain Inf nor NaN.
- When , it returns , and of Equation (3).
- When , it returns , and of Equation (1) or (2).
- When , it returns , and of Equation (4).