Every real matrix separates into orthogonal changes of direction and nonnegative axis scalings.
The symmetric positive-semidefinite matrix AᵀA has orthonormal eigenvectors, which form V. Their nonnegative eigenvalue square roots are singular values. For nonzero σᵢ, set uᵢ=Avᵢ/σᵢ and complete an orthonormal basis when a singular value is zero. This handles singular, reflected, and repeated-value cases.
Orthogonal factors are not always rotations; reflections are allowed.