I have a real square matrix X which I need to perform a Singular Value Decomposition on. Now, performing the operation
X=USV^T
as U and V are orthogonal, we know that det(X)=±det(S) and det(S) is non-negative as singular values are non-negative.
Now, I need to know the sign of the determinants of U and V (which is the same as knowing the determinants, of course). However, the naive approach costs me 2 O(N^3)
I was wondering whether someone knows of a way to either
- Infer the sign of the determinants of
UandVas a bi-product of the SVD-implementation innumpy,scipyor a similar library in Python, without having to calldet(U)anddet(V). - Calculate the determinant of an orthogonal matrix which is faster than the default implementation of
det(U), based on the fact thatU/Vis orthogonal.