# A question about derivation of kalman gain

I read the derivation of Kalman gain. In the derivation, we have: $$(\mathbf{H}\mathbf{P_{n,n-1}})^T = \mathbf{K_n}(\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H}^T+\mathbf{R_n})$$ where $$\mathbf{H}$$ is observation matrix, $$\mathbf{P_{n,n-1}}$$ is the predicted estimate uncertainty, $$\mathbf{R_n}$$ is the measurement uncertainty, and $$\mathbf{K_n}$$ is our desired Kalman gain. Then, $$\mathbf{K_n} = (\mathbf{H}\mathbf{P_{n,n-1}})^T(\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H}^T+\mathbf{R_n})^{-1}$$ My question is why $$\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H}^T+\mathbf{R_n}$$ must have inverse?

Claim: $$\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H}^T+\mathbf{R_n}$$ is the addition of two P.D. matrices, and is therefore P.D.
Now you need to figure out yourself why $$\mathbf{P_{n,n-1}}$$ and $$\mathbf{R_n}$$ are P.D.?
Since $$\mathbf{P_{n,n-1}}$$ and $$\mathbf{R_n}$$ are covariance matrices, they are positive (semi)definite. (We believe in this case, they are positve definite). And one can show that $$\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H^T}$$ preserves positive (semi)definite, and addition of two positive definite matrix is still postive definite. Thus $$\mathbf{H}\mathbf{P_{n,n-1}}\mathbf{H^T}+\mathbf{R_n}$$ is positive definite. And positive definiteness implies all positive eigenvalue(s).