IsPositiveDefinite: Test for a Positive Definite Matrix

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/IsPositiveDefinite.R

Description

IsPositiveDefinite() returns TRUE if A is a positive definite matrix, and FALSE otherwise.

Usage

1
IsPositiveDefinite(A, tol = 1e-08)

Arguments

A

Input.

tol

Numeric. Tolerance.

Details

An m \times m symmetric matrix \mathbf{A} is positive definite if all of its eigenvalues are positive.

A is considered to be a positive definite matrix if NONE of its eigenvalues are less than or equal to a tolerance value.

Value

Logical.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other predicate functions: IsDiagonal(), IsIdempotent(), IsInvertible(), IsMatrix(), IsNilpotent(), IsOrthogonal(), IsScalar(), IsSingular(), IsSquareMatrix(), IsSymmetric(), IsVector(), MatrixCheck()

Examples

1
2
3
4
5
# TRUE
IsPositiveDefinite(diag(2))

# FALSE
IsPositiveDefinite(matrix(1:9, ncol = 3))

jeksterslab/matrixR documentation built on Feb. 22, 2021, 8:10 a.m.