Lanczos algorithm (source code)

= Lanczos algorithm
{c}
{title2=$Aq_j=\beta_{j-1}q_{j-1}+\alpha_jq_j+\beta_jq_{j+1}$}

For a real <symmetric matrix> $A$, the leading block $Q_k^TAQ_k$ of the <Arnoldi decomposition> is both symmetric and an <upper Hessenberg matrix>, hence a <tridiagonal matrix>. The resulting three-term recurrence is the Lanczos algorithm. If $A$ is a <symmetric positive-definite matrix>, its compression is too, since $y^TQ_k^TAQ_ky=(Q_ky)^TA(Q_ky)>0$ for nonzero $y$.