I have a mathematical context--a computer program I am writing--in which, if I am dealing with scalars, I have a variance, and at a certain point, I (or rather the program) take its reciprocal, i.e. the variance's multiplicative inverse.
When instead I am dealing with vectors, I use a covariance matrix, and instead of the reciprocal, I take the inverse matrix--again, the (matrix-)multiplicative inverse.
The variance, or the covariance matrix changes over time as I run the same procedures repeatedly.
The procedure can result in a "variance" that's negative, which of course makes no sense. It can also result in a variance that's zero, which might be OK, except that then the program will divide by zero. This is not because of a bug in the code. It's just that the code wasn't intended to be used under certain conditions, but what those conditions are, isn't clear. (Except that it's clear that if the code generates a "variance" $< 0$, those weren't the right conditions!)
One way to avoid "variances" $\leq 0$ would be to force the procedure to return a value just above 0 when it would have otherwise returned a value $\leq 0$. Something like: if sigma <= 0, then assign 0.000001 to sigma. This is easy to implement.
My question: What would the covariance matrix analogue (or analogues) of the test for variance $\leq 0$ be, and why? I have a hypothesis that it's a test for whether the covariance matrix's determinant is greater than 0, but I'm not quite sure why that would make sense.
(I'm not sure whether I have given enough information to make the question answerable. I'm not sure whether I can give enough information, if not, so I hope that I have.)