I have a covariance matrix:
$\operatorname{cov}(\mathbf{X}, \mathbf{X}) = \operatorname{E}[(\mathbf{X} - \operatorname{E}[\mathbf{X}])(\mathbf{X} - \operatorname{E}[\mathbf{X}])^T]$
According to Wikipedia, it should be a positive semi-definite matrix.
Under what circumstances will it be positive semi-definite rather than positive definite?
The reason I am asking is because I see that a common thing to do when implementing an Unscented Kalman Filter is to implement the square-root of the covariance matrix using the matlab command:
sqrt_P = gamma * chol(P_a, 'lower')
where gamma is a scaling factor and P_a is the state covariance matrix.
I understand that for chol() to work, it needs to be positive definite:
>> help chol
CHOL Cholesky factorization.
CHOL(A) uses only the diagonal and upper triangle of A.
The lower triangle is assumed to be the (complex conjugate)
transpose of the upper triangle. If A is positive definite, then
R = CHOL(A) produces an upper triangular R so that R'*R = A.
If A is not positive definite, an error message is printed.
So, what are the dangers in assuming that it isn't positive semi-definite? Will it only be semi-definite when (for example) it is the zero matrix, or when there are fully correlated states?
ADDENDUM:
In the original post, there was a reference to "if the states are fully correlated". This was rather fast and loose with the notation. There is a discussion and an answer on it here.