Last chance! 50% off unlimited learning
Sale ends in
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, ...)
TRUE
(default) return the
logarithm of the modulus of the determinant.det
allowed an optional method
argument.
This argument will be ignored but will not produce an error.det
, the determinant of x
. For determinant
, a
list with components
logarithm
is FALSE
; otherwise the
logarithm of the modulus.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.
(x <- matrix(1:4, ncol = 2))
unlist(determinant(x))
det(x)
det(print(cbind(1, 1:3, c(2,0,1))))
Run the code above in your browser using DataLab