Determining if a matrix is positive definite and symmetric

71 Views Asked by At

Consider the following outputs from Matlab:

» R = chol(A)

  R = 1. 4142 0. 7071                                        
            0 1. 2247 

» A - R'*R

ans = 
 1.0e-15 * 
 -0.4441    0
       0    0.2220 

I am trying to determine if the matrix $A$ is positive definite and symmetric.

A matrix $A\in\mathbb{R}^{n\times n}$ has a Cholesky factorisation $$A=R^TR$$ if and only if $A$ is symmetric and positive definite, where $R$ is an upper triangular matrix with positive diagonal entries.

By the theorem above, if $A$ was positive definite I would expect $A-R^TR=0$, which is not the case in the output above. If given $A$ explicity, it would be much easier to determine if the matrx was positive definite and symmetric. Though, I do not see how to determine what is required by what is given.

2

There are 2 best solutions below

4
On

As pointed out in the comments, 1.0e-15 = 0 for our purposes here. Since you have R, you can easily calculate the eigenvectors and eigenvalues of A as follows:

[V,D] = eig(R'*R)
0
On

OK. Well, the matrix $A$ is not a matrix of real numbers; it's a matrix of floats (or doubles). So the theorem, as stated, doesn't apply. Whether the examiners want to ignore that distinction, in which case it's reasonable to treat $10^{-15}$ as more-or-less zero, or carefully attend to that distinction, in which case I suppose the fact that $A - R'R$ is, strictly speaking, nonzero, you'd have to say that $A$ is not spd.

I guess I'd seek out a better quality of exam-writers. :(