matrix svd decomposition problem
-
I downloaded several SVD c++ code, but they all have same error. by SVD theory, a matrix A(mxn) (m: rows, n: columns) can be decomposed as A(mxn) = U(mxm) * S(mxn) * V'(nxn) (U, S and V are matrices) U and V must be orthogonal matrices: U x U' = U' x U = E, V x V' = V' x V = E (E is identity matrix) Problem: if m > n, those codes generate U' x U = E (correct), but U' x U != E (error). they are all correct for V. Because all of codes have the same error, I think U should be this way even it is not satisfy SVD theory. Or all codes are wrong (sounds not reasonable.) How do you think about? maybe I have to download more C++ source codes to test? .
-
I downloaded several SVD c++ code, but they all have same error. by SVD theory, a matrix A(mxn) (m: rows, n: columns) can be decomposed as A(mxn) = U(mxm) * S(mxn) * V'(nxn) (U, S and V are matrices) U and V must be orthogonal matrices: U x U' = U' x U = E, V x V' = V' x V = E (E is identity matrix) Problem: if m > n, those codes generate U' x U = E (correct), but U' x U != E (error). they are all correct for V. Because all of codes have the same error, I think U should be this way even it is not satisfy SVD theory. Or all codes are wrong (sounds not reasonable.) How do you think about? maybe I have to download more C++ source codes to test? .
-
I downloaded several SVD c++ code, but they all have same error. by SVD theory, a matrix A(mxn) (m: rows, n: columns) can be decomposed as A(mxn) = U(mxm) * S(mxn) * V'(nxn) (U, S and V are matrices) U and V must be orthogonal matrices: U x U' = U' x U = E, V x V' = V' x V = E (E is identity matrix) Problem: if m > n, those codes generate U' x U = E (correct), but U' x U != E (error). they are all correct for V. Because all of codes have the same error, I think U should be this way even it is not satisfy SVD theory. Or all codes are wrong (sounds not reasonable.) How do you think about? maybe I have to download more C++ source codes to test? .
Quote:
if m > n, those codes generate U' x U = E (correct), but U' x U != E (error).
Probably you meant
if m > n, those codes generate U' x U = E (correct), but U x U' != E (error).
Anyway, if
U' x U = E
thenU' = U-1
, thereforeU x U' = E
.THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
-
Quote:
if m > n, those codes generate U' x U = E (correct), but U' x U != E (error).
Probably you meant
if m > n, those codes generate U' x U = E (correct), but U x U' != E (error).
Anyway, if
U' x U = E
thenU' = U-1
, thereforeU x U' = E
.THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite
You are right, I should go back to school now. thanks.
-
You are right, I should go back to school now. thanks.
You are welcome. Don't become discouraged, maybe rounding made things more complex in your case.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?! -- C++ FQA Lite