The determinant of a Vandermonde matrix with consecutive integer elements increases super-factorially with the dimension of the matrix! For a 30 x 30 integer Vandermonde matrix, the determinant is too large to represent as a standard double-precision floating-point number.Ī Vandermonde matrix is not symmetric, so let's construct a Vandermonde matrix and compute its log-determinant by using the LOGABSDET function. The function returns a vector with two elements: the first element is the logarithm, the second is the sign of the determinant. SAS/IML 13.1 supports the LOGABSDET function, which computes the logarithm of the absolute value of the determinant for any square matrix. This computation, along with the sign of the determinant, enables you to reconstruct the determinant of any matrix. The log function is undefined for nonpositive values, but the log of the absolute value of the determinant always exists.
The Cholesky decomposition exists only for symmetric positive definite matrices, which means that this implementation cannot be used to compute the log-determinant of an arbitrary square matrix.įor an arbitrary square matrix, the determinant can be negative or zero. My algorithm used the ROOT function in SAS/IML to compute a Cholesky decomposition of the covariance matrix.
This computation is often required to evaluate a log-likelihood function.
A few years ago I wrote an article that shows how to compute the log-determinant of a covariance matrix in SAS.