Is non semi-positive definite matrix invertible? I'm aware that positive definite matrix is invertible. I've also read that a matrix is semi-positive definite if and only if the matrix is invertible.
Then, is my matrix invertible when it is not positive definite, nor not semi-positive definite?
One more question - I've encountered a situation in which I have non-positive definite matrix due to floating point precision issues: some of my elements were $-1.623$e-16. 
I am computing a covariance matrix, so I know that my matrix should theoretically be semi-positive definite. Therefore, $-1.623$e-16 is negative due to rounding errors. In a situation like this, is it safe to replace it with $0$? 
Thanks,
 A: If your question is a mathematical question (and not a computing one), then yes a non positive semidefinite matrix can be invertible. 
For example, if a $n\times n$ real matrix has $n$ eigenvalues and none of which is zero, then this matrix is invertible. If these eigenvalues are all negative, then the matrix is negative definite and so, in particular, not positive semidefinite. And if some eigenvalues are positive and the remaining eigenvalues are negative, then the matrix is neither positive definite nor negative definite nor positive semidefinite nor negative semidefinite; nonetheless, the matrix is still invertible.
A: In general, you should not try and make too many connections between positive definiteness and invertibility. For instance, 
\begin{equation*}
\begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}
\end{equation*}
is an SPD matrix that is not invertible.
Some sources:


*

*https://textbooks.math.gatech.edu/ila/diagonalization.html

*http://www.math.lsa.umich.edu/~speyer/417/SpectralTheorem.pdf (in particular, read how qualified and limited the statement is)

