det | R Documentation |
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.
det(x, ...) determinant(x, logarithm = TRUE, ...)
x |
numeric matrix: logical matrices are coerced to numeric. |
logarithm |
logical; if |
... |
Optional arguments. At present none are used. Previous
versions of |
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.
For det
, the determinant of x
. For determinant
, a
list with components
modulus |
a numeric value. The modulus (absolute value) of the
determinant if |
sign |
integer; either +1 or -1 according to whether the determinant is positive or negative. |
(x <- matrix(1:4, ncol = 2)) unlist(determinant(x)) det(x) det(print(cbind(1, 1:3, c(2,0,1))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.