# Can state covariance matrix in Unscented Kalman filter contain negative values?

On the one hand covariance matrix can't contain negative values by definition, but as far as state covariance matrix innovated by subtraction:

$$\mathbf{P} = \bar{\mathbf P} - \mathbf K\mathbf P_{z}\mathbf K^\mathsf T$$

it's possible to get negative value.

Can state covariance matrix in Unscented Kalman filter contain negative values?

## 1 Answer

actually a covariance matrix can have negative values off the diagonal. variables can be negatively correlated, but the diagonal terms are variances which must be positive.

The update you show can be a problem which is why updates of $P^{-1}$ are preferred.