Function semidefiniteness()
passes all its arguments
to isSemidefinite()
.
It is only kept for backward-compatibility
and may be removed in the future.
If argument positive
is set to FALSE
,
isSemidefinite()
checks for negative semidefiniteness
by checking for positive semidefiniteness
of the negative of argument m
, i.e. -m
.
If method "det"
is used
(default for matrices with up to 12 rows/columns),
isSemidefinite()
checks whether all principal minors
(not only the leading principal minors)
of the matrix m
(or of the matrix -m
if argument positive
is FALSE
)
are larger than -tol
.
Due to rounding errors,
which are unavoidable on digital computers,
the calculated determinants of singular (sub-)matrices
(which should theoretically be zero)
can considerably deviate from zero.
In order to reduce the probability of incorrect results
due to rounding errors,
isSemidefinite()
does not calculate the determinants
of (sub-)matrices with reciprocal condition numbers
smaller than argument tol
but sets the corresponding principal minors to (exactly) zero.
The number of principal minors of an \(N \times N\) matrix is
\(\sum_{k=1}^N ( N\) choose \( k )\),
which gets very large for large matrices.
Therefore, it is not recommended to use method "det"
for matrices with, say, more than 12 rows/columns.
If method "eigen"
(default for matrices with 13 or more rows/columns) is used,
isSemidefinite()
checks whether all eigenvalues
of the matrix m
(or of the matrix -m
if argument positive
is FALSE
)
are larger than -tol
.
Due to rounding errors,
which are unavoidable on digital computers,
those eigenvalues of a singular matrix
that should theoretically be zero
can considerably deviate from zero.
In order to reduce the probability of incorrect results
due to rounding errors,
isSemidefinite()
does not calculate the eigenvalues
of an \(N \times N\) matrix with reciprocal condition number
smaller than argument tol
but checks whether all \(N\)
\((N-1) \times (N-1)\) submatrices
with row \(i\) and column \(i\), \(i = 1, ..., N\), removed
are positive semidefinite.
If necessary, this procedure is done recursively.
Please note that a matrix can be
neither positive semidefinite nor negative semidefinite.