mata a = 2,9,4\7,5,3\6,1,8 det(a) svd(a, u=., s=., v=.) // Notice that to reconstruct the matrix, v is not transposed here, // while it is with -matrix svd- in Stata. u*diag(s)*v