This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/det.html
det {base}R Documentation

Calculate the Determinant of a Matrix

Description

det calculates the determinant of a matrix either by QR decomposition or from the eigenvalues, see qr and eigen.

Usage

det(x, method = c("qr", "eigenvalues"), tol = 1e-07)

Arguments

x

numeric matrix.

method

"qr" (default) or "eigenvalues".

tol

tolerance, used only for method "qr".

Value

The determinant, or zero if qr determines the matrix to be numerically singular.

Note

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.

See Also

eigen, qr, svd

Examples

(x <- matrix(1:4, ncol=2))
det(x)
det(x, method="eigenvalues")

det(print(cbind(1,1:3,c(2,0,1))))

[Package base version 1.5.0 ]