is.positive.definite {matrixcalc} | R Documentation |
This function returns TRUE of the argument, a square matrix x, is positive definite. The user chooses between a test of the eigenvalues of x or a Choleski decomposition of x.
is.positive.definite(x, tol, method = c("eigen", "chol"))
x |
a matrix |
tol |
a numeric tolerance level usually left out |
method |
a character string that specifies the method used |
For the eigenvalue approach, the eigenvalues should be positive. The Choleski decomposition only works for positive definite symmetric matrices.
TRUE or FALSE.
Frederick Novomestky fnovomes@poly.edu
Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.
A <- diag( 1, 3 ) is.positive.definite( A ) B <- matrix( c( 1, 2, 3, 4 ), nrow=2, byrow=TRUE ) is.positive.definite( B )