Det: Compute the Determinant of a Matrix

Description Usage Arguments Value Author(s) Examples

Description

Det computes the determinant of a square matrix. This function first checks whether the matrix is full rank or not; if not, the value 0 is returned. This avoids relatively frequent numerical errors that produce a non-zero determinant when in fact it is zero. Only if the matrix is full rank does the algorithm proceed to compute the determinant. If the matrix is complex, the determinant is computed as the product of the eigenvalues; if the matrix is real, Det calls the base function det for maximum efficiency.

Usage

1
Det(M)

Arguments

M

a square matrix, real or complex.

Value

The determinant of M.

Author(s)

Albert Dorador

Examples

1
2
3
4
5
6
7
A <- matrix(c(1, 2, 2+3i, 5), ncol = 2) #complex matrix
B <- matrix(1:4, ncol = 2) #real matrix
S <- matrix(c(3, 4+3i, 0, 0), ncol = 2) #Singular matrix

Det(A)
Det(B)
Det(S)

complexplus documentation built on May 1, 2019, 9:10 p.m.

Related to Det in complexplus...