8

I am generating correlation matrix by some new algorithm. Generated matrix is non positive semi-definite matrix.

I'm getting a few negative eigenvalues. The rest of eigenvalues are quite equal to the ideal matrix.

Can I use that non positive semi-definite matrix? If not, why?

If my estimated correlation matrix has all positive but complex value and imaginary terms are close to zero then is it possible?

Vanita
  • 81
  • 1
  • 4
  • 1
    One of a number of very similar questions on CV http://stats.stackexchange.com/q/69114/3277. – ttnphns Nov 25 '14 at 13:26
  • 1
    it cannot be correct, so the algorithm has some issues. – Xi'an Nov 25 '14 at 16:59
  • 3
    Near-duplicates: [Is every correlation matrix positive definite?](http://stats.stackexchange.com/questions/182875/is-every-correlation-matrix-positive-definite) which has more focus on the definite versus semi-definite angle, and [Is every covariance matrix positive definite?](http://stats.stackexchange.com/questions/56832/is-every-covariance-matrix-positive-definite) which is relevant because a covariance is essentially a rescaled correlation. – Silverfish Nov 21 '15 at 21:19
  • 2
    Possible duplicate of [Is every covariance matrix positive definite?](http://stats.stackexchange.com/questions/56832/is-every-covariance-matrix-positive-definite) – James LT Apr 03 '17 at 18:10

3 Answers3

9

A correlation matrix is really the covariance matrix of a bunch of variables which have been rescaled to have variance one.

But every population covariance matrix is positive semi-definite, and if we rule out weird cases (such as with missing data, or "numerical fuzz" turning a small eigenvalue to a negative one), so is every sample covariance matrix.

So if a matrix is supposed to be a correlation matrix, it should be positive semi-definite.

Note that the semi-definite is important here. In the bivariate case, take your two variables to be perfectly positively correlated and then the correlation matrix is $\pmatrix{1 & 1 \\ 1& 1}$ which has eigenvalues of $2$ and $0$: the zero eigenvalue means it is not positive definite.

Silverfish
  • 20,678
  • 23
  • 92
  • 180
5

Negative eigenvalues would imply that by the diagonalizing transformation the random vector would have negative variance in some components. Negative variances do never exist.

Horst Grünbusch
  • 5,020
  • 17
  • 22
1

A correlation matrix is positive semi-definite, period. Numerics, however, might refuse to acknowledge that mathematical fact depending on how you arrive at the numeric representation of the correlation matrix.

The solution is to choose a representation of your matrix that cannot fail to be positive semi-definite by representing the matrix in a suitable decomposed form. I am not up to scratch, but there are things like LUD decompositions or square root forms that essentially are unable to represent anything but truly positive semi-definite matrices and which you can usually update incrementally similarly to how you would update the full matrix, possibly even easier.

user95848
  • 11
  • 1