ufs_ispositive, ufs_isnonnegative, ufs_type - check a quadratic form for definiteness
Calling sequence:
ufs_ispositive(M)
ufs_isnonnegative(M)
ufs_type(M)
Parameters:
M -
a symmetric matrix defining a quadratic form
Synopsis:
ufs_ispositive checks whether
is positive definite or not.
ufs_isnonnegative checks whether
is positive semidefinite or not.
ufs_type calculates the definiteness type of
. This function returns either `indefinite`, `non negative definite` or `positive definite`.
The argument must be a symmetric matrix, otherwise an error occurs.
Example:
> A:=matrix([[2,-2,0,0,1],[-2,2,0,0,-1],[0,0,2,2,0],[0,0,2,2,0],[1,-1,0,0,2]]);
> ufs_ispositive(A);
> ufs_isnonnegative(A);
> ufs_type(A);