det {Matrix}R Documentation

Calculate the Determinant of a Matrix

Description

determinant calculates the determinant (or its logarithm) of a matrix

Usage

## S3 method for class 'Matrix':
determinant(x, logarithm = TRUE, ...)

Arguments

x numeric matrix.
logarithm logical. When TRUE, the default, the logarithm of the determinant is returned. When FALSE, the determinant of x is returned.
... further arguments passed to or from other methods.

Details

determinant is a generic function with special methods for different types of matrices or decompositions. Use methods("determinant") to list all the methods for the determinant generic.

Value

determinant return a list with two elements

modulus a numeric value. The modulus (absolute value) of the determinant or the logarithm of the modulus. The value of the logarithm argument is included as an attribute.
sign a numeric value, which is +/- 1 according to whether the determinant is positive or negative.

normal-bracket32bracket-normal

Note

Often, computing the determinant is not what you should be doing to solve a given problem.

See Also

det

Examples

h9 <- hilbert(9)
determinant(h9)
determinant(h9, log = FALSE)

[Package Contents]