spd_test


spd_test, a MATLAB code which performs a few tests on a real matrix to determine whether it is symmetric positive definite (SPD).

A real or complex matrix A is positive definite if it is true that for every nonzero complex vector x, the product:

x* * A * x > 0,
where, in particular, we are requiring that this product be a real number.

It turns out that if a matrix is positive definite in this sense, then it must also be Hermitian, or, if it is real, it must also be symmetric. The phrase "symmetric positive definite" arises so often that it is usually abbreviated as "SPD".

A real matrix A is restricted positive definite if it is true that for every nonzero real vector x:

x' * A * x > 0.
It turns out that this test is significantly weaker than when complex vectors are used. A real matrix which passes this test is not necessarily symmetric.

Here is a simple example of a restricted positive definite matrix which is not symmetric:

        1  1
       -1  1
      
because x' * A * x = x12+x22.

Simple facts about a symmetric positive definite matrix A:

Languages:

spd_test is available in a MATLAB version.

Related Data and Programs:

test_matrix, a MATLAB code which defines test matrices for which the condition number, determinant, eigenvalues, eigenvectors, inverse, null vectors, P*L*U factorization or linear system solution are known. Examples include the Fibonacci, Hilbert, Redheffer, Vandermonde, Wathen and Wilkinson matrices.

Source Code:


Last revised on 29 September 2022.