SVD Matrix question


c-r-a-z-y
12-08-2005, 09:52 PM
Hi,

I read some paper about the singular value decomposition and decided to check out the numerical recipes implementation. The matrix A is decomposed in 3 matrices:

A = U * S * W^T
(n x m) (m x m) (n x m) (n x n)

The matrix is a squared matrix containing m*m elements. The implented matrix in numerical recipes only has (m x n). Are there some elements missing?

Kevin Dolan
12-09-2005, 09:53 AM
In most SVD implementations, only part of the larger of U or V will actually be stored. If m>n, then usually U will be stored as (mxn).

If you work out the math, you will see that when you multiply out the factors, the last m-n columns of U just end up getting multiplied by zero, since S is diagonal. Therefore the overal effect is the same as if U were simply an (mxn) matrix.

Not only does this save on storage, but it also eliminates a bunch of unnecessary multiplications and additions.

Kevin

lioreldar
12-26-2005, 09:28 AM
Hi All,

I was thinking about writing an efficient SVD. Looking at the NR code I realized that in effect, the matrices U and V were computed twice. Once while turning A to a bi-diagonal matrix, with U and V held implicitly in the off-diagonal elements, and a second time when U and V were computed explicitly.

My question is: is anyone aware of the reason why, if U and V are needed explicitly, should we not compute them on the fly while bi-diagonalizing A in in the first place.

Thanks,
Lior Eldar