is_sym_pos_def: Check if a matrix is symmetric positive-definite

View source: R/is_sym_pos_def.R

is_sym_pos_defR Documentation

Check if a matrix is symmetric positive-definite

Description

Checks a matrix to determine if it is symmetric positive-definite.

Usage

is_sym_pos_def(x)

Arguments

x

A numeric matrix which should be checked to see if it is symmetric positive-definite.

Value

TRUE if the supplied matrix is symmetric positive-definite, FALSE otherwise.

Examples

is_sym_pos_def(matrix(c(2.51, 2.01, 2.01, 1.74), 2, 2)) # => TRUE
is_sym_pos_def(matrix(c(1, 1, 1, 1), 2, 2)) # => FALSE


toniprice/jute documentation built on Jan. 11, 2023, 8:23 a.m.