GenericLinearAlgebra.jl icon indicating copy to clipboard operation
GenericLinearAlgebra.jl copied to clipboard

SVD U is not always orthonormal

Open chriscoey opened this issue 4 years ago • 1 comments

using GenericLinearAlgebra
A = zeros(BigFloat, 2, 2)
F = GenericLinearAlgebra.svd(A, full = false)

LinearAlgebra.SVD{BigFloat, BigFloat, Matrix{BigFloat}}
U factor:
2×2 Matrix{BigFloat}:
 0.0  0.0
 0.0  0.0
singular values:
2-element Vector{BigFloat}:
 0.0
 0.0
Vt factor:
2×2 Matrix{BigFloat}:
 1.0  0.0
 0.0  1.0

U is not orthonormal, though Vt is. It would be more convenient and consistent with e.g. LAPACK if U and Vt are both always orthonormal.

chriscoey avatar Nov 15 '21 16:11 chriscoey

Yeah. It definitely should be. Not sure what is going wrong here. I'll take a look.

andreasnoack avatar Nov 15 '21 16:11 andreasnoack

This was fixed in 85e8031de66020819bb61146163ed51f9fa3e006

andreasnoack avatar May 17 '23 09:05 andreasnoack