# Is the covariance matrix in the extended Kalman filter guaranteed to be positive definite (ignoring numerical errors)?

I understand that due to numerical errors (e.g., round off error and machine precision) that the covariance matrix may not be positive definite, but if computers had infinite precision, is the covariance positive definite?

Along this line, are the noise matrices required to be positive definite as well if this is the case? This seems like a requirement just to be able to compute the residual covariance, but if I search EKF, the definiteness isn't mentioned for any of the matrices (except for the case of numerical errors).

It is always guaranteed to be positive semi definite.

That being said you have to somewhat deliberately set up your system to be that way. So essentially yes it is always positive definite.

Reasoning:

Since we are ignoring machine precision the only way for a matrix to be positive semidefinite(PSD) is if all of your matrices end up being positive semidefinite. This includes your covariances, Propogation matrix, and information matrix. If one of them ends up being definite(PD) then the result will be positive definite.

$$PSD + PD = PD$$

A semidefinite matrix occurs when you have problems with your observability. Essentially you are trying to measure something that is impossible for you to observe. Crazy example would be you are tracking a robot position with IMU+GPS and additionally are trying to estimate temperature. Your IMU+GPS combination can not observe the temperature so it is unobservable.

Along this line, are the noise matrices required to be positive definite as well if this is the case? This seems like a requirement just to be able to compute the residual covariance, but if I search EKF, the definiteness isn't mentioned for any of the matrices (except for the case of numerical errors).

Again you could potentially make one of your noise matrices positive semidefinite, but then you are probably making some sort of modeling mistake. A covariance matrix is only positive semidefinite if one of the variables is a linear combination of the others.