Learn R Programming

calibrator (version 1.2-9)

is.positive.definite: Is a matrix positive definite?

Description

Returns TRUE if and only if a matrix is positive definite.

Usage

is.positive.definite(a, ...)

Arguments

a

Matrix to be tested

...

Extra arguments passed to eigen(), such as symmetric.

Author

Robin K. S. Hankin

Details

A wrapper for eigen() (a matrix is positive definite if all its eigenvalues are positive). This function is included for convenience only.

Examples

Run this code
is.positive.definite(diag(3),sym=TRUE)
is.positive.definite(diag(6)-0.1)

Run the code above in your browser using DataLab