solve.svd.Matrix(a, b, tol=0, transpose=F)
m <- sample(1:9, 1); n <- sample(1:9, 1) a <- Matrix( sample(-9:9, m*n, replace = T), nrow = m, ncol = n) b <- rnorm(m) z <- svd(a) # singular-value decomp of a t(a) %*% (a %*% solve(a,b) - b) # residual for normal equations (solve(a) %*% b) - solve(a,b)