det {base}
Description
det calculates the determinant of a matrix. determinant is a generic function that returns separately the modulus of the determinant, optionally on the logarithm scale, and the sign of the determinant.
Usage
det(x, ...) determinant(x, logarithm = TRUE, ...)
Arguments
- x
- numeric matrix.
- logarithm
- logical; if
TRUE(default) return the logarithm of the modulus of the determinant. - ...
- Optional arguments. At present none are used. Previous versions of
detallowed an optionalmethodargument. This argument will be ignored but will not produce an error.
Details
The determinant function uses an LU decomposition and the det function is simply a wrapper around a call to determinant.
Often, computing the determinant is not what you should be doing to solve a given problem.
Values
For det, the determinant of x. For determinant, a list with components
- modulus
- a numeric value. The modulus (absolute value) of the determinant if
logarithmisFALSE; otherwise the logarithm of the modulus. - sign
- integer; either +1 or -1 according to whether the determinant is positive or negative.
Examples
Documentation reproduced from R 2.15.3. License: GPL-2.
