det {base} | R Documentation |
det
calculates the determinant of a matrix either by QR
decomposition or from the eigenvalues, see qr
and
eigen
.
det(x, method = c("qr","eigenvalues"))
z |
numeric matrix. |
method |
"qr" (default) or "eigenvalues" |
Often, computing the determinant is not what you should be doing to solve a given problem.
The "qr"
method is much faster for large matrices.
(x <- matrix(1:4, ncol=2)) det(x) det(x, method="eigenvalues") det(print(cbind(1,1:3,c(2,0,1))))