Statistical Methods
Check the dimensions and orientation of SVD factors
Define the task
A singular-value decomposition represents a matrix as U times a diagonal singular-value matrix times the transpose of V. Save the dimensions of the original matrix and every returned factor. A reduced decomposition can have fewer columns than a full decomposition while still reconstructing the same matrix.
Carry out the check
Check that singular values are nonnegative and that the retained columns of U and V are orthonormal. Multiply the factors in the documented order and inspect the reconstruction residual. A reconstruction based on only the first components deliberately approximates the input. Record the retained rank and the amount of discarded variation before interpreting that approximation.
Worked hypothetical example
For a hypothetical diagonal matrix with entries 3 and 1, identity factors and singular values (3,1) reconstruct the matrix exactly. Retaining only the first component gives a diagonal matrix with entries 3 and 0. The squared Frobenius reconstruction error is 1, equal to the square of the discarded singular value. Factor signs may change together without changing the reconstructed matrix.
Method checked 12 November 2026 against R documentation: Singular Value Decomposition of a Matrix.