# Ways to fix block Lanczos tridiagonalisation numerical instability for matrix with degenerate, closely spaced eigenvalues?

I want to run a block Lanczos block-tridiagonalization on a hermitian, sparse matrix (of relatively small size $$\sim 10^2 \times 10^2$$). However the matrix typically has many eigenvalues that are highly degenerate, and the eigenvalues are closely spaced. I only care about the invariant subspace of the initial vectors, so it is desired for the procedure to terminate when the elements of the subdiagonal become close to zero.

However, when I try a block Lanczos tridiagonalization in this way, it is numerically unstable because of the above mentioned eigenvalue structure (as e.g. discussed in the answer here). I am already re-orthogonalising all vectors at each step of the Lanczos procedure.

Are there any techniques with which to make the block Lanczos iteration more stable under these circumstances? Is this already implemented in a code?

• At that size you might as well switch to a dense algorithm (readily available in LAPACK), if Lanczos is giving you trouble. Commented Feb 12, 2023 at 16:55
• Thank you @rchilton1980! Yes indeed, the matrix size is not much of an issue - I'm using block Lanczos, because I require the Krylov basis / the block tridiagonalisation similarity matrix of the Krylov basis (this stems from a physics problem, specifically this Block-Lanczos Density Matrix Renormalisation Group technique) - my apologies for the naive question, but were you referring to an alternative, dense algorithm giving this as well? Or were you thinking of a entirely different algorithm, for e.g. just eigenvalues? Commented Feb 13, 2023 at 11:40