det(x) determinant(x, logarithm=T, tune)
NB
as described
in
.laenv
.
x
.
determinant returns a list with components:
x
or its logarithm.
A logical attribute
"logarithm"
is included
to indicate whether the true modulus or its logarithm is given.
x
.
For complex matrices, this will usually be a complex number with unit modulus.
The determinant is computed from an LU factorization obtained via the function dgetrf or zgetrf from LAPACK (Anderson et al. 1994).
The
determinant
is based on the
generic function
det
and its method
det.Matrix.
These functions were available in library Matrix in versions of S-PLUS
prior to S-PLUS 6.0.
The
det
function is just a wrapper that
calls
determinant
and returns only
the determinant value.
Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition. SIAM, Philadelphia.
Golub, G., and Van Loan, C. F. (1989). Matrix Computations, 2nd edition. Johns Hopkins, Baltimore.
x <- matrix(sample(-3:3, size=9, replace=T), nrow=3, ncol=3) det(x) determinant(x, log=F)$modulus # Same value det(diag(1:5)) # prod(1:5)