Please note that I have nearly zero background on numerical methods.
I understand the shift invert method as described in SciPy Tutorial
The main argument of the above link is as follows. Suppose we want to solve a generalized eigenvalue problem $A\mathbf x = \lambda M \mathbf x$. Then, the shift invert method transforms the problem into $$(A-\sigma M)^{-1} M\mathbf x = \frac{1}{\lambda-\sigma} \mathbf x.$$
My question: What if $A - \sigma M$ is not invertible? In particular, I am interested in the case $M=I$ and $\sigma=0$. Then, the above equation reduces to $A^{-1}\mathbf x = \lambda^{-1} \mathbf x$. But, I know that $A$ has zero as an eigenvalue, so the above-mentioned problem happens indeed!
The motivation of question is as follows. Using eigsh
function in SciPy, I obtained that the eigenvalue with the smallest magnitude is of order $10^{-4}$, but it is supposed to be zero!
I used $\sigma=0$ in the eigsh
function parameter, and my matrix is sparse Hermitian with size $10000\times 10000$.