Krylov dimension from spectral components (source code)

= Krylov dimension from spectral components
{c}
{title2=$\dim\mathcal K_\infty(A,v)=\#\{\lambda:P_\lambda v\ne0\}$}

For a <diagonalizable> finite-dimensional operator, write $v=\sum_j u_j$ with nonzero $u_j$ in distinct <eigenspaces> of eigenvalues $\lambda_j$. Then $A^rv=\sum_j\lambda_j^ru_j$. The <Vandermonde matrix> of the first $k$ powers is invertible for $k$ distinct eigenvalues, so these powers span exactly the $k$ independent components $u_j$. Thus the stabilized <Krylov subspace> dimension is $k$. It counts distinct spectral components, not the number of nonzero coefficients in an arbitrary eigenbasis: $A=I$, $v=e_1+e_2$ has Krylov dimension one. Equivalently it is the minimum number of eigenvectors needed when those vectors may be chosen freely.