Proofs: Block Lanczos algorithm
These are the human proofs of Block Lanczos algorithm, at full length.
Block Lanczos returns independent kernel vectors, and it stops full
This proof shows: correctness, termination.
Let be an matrix over , , the block width and . The iteration produces blocks and a block , and the final step works with the matrix .
Claim. (1) The algorithm stops. (2) It returns a basis of the space . In particular every returned vector is nonzero with , the returned vectors are independent, and if it returns nothing. (3) If the selection on line L5 succeeds, the matrix it returns satisfies , where .
Claim (2) does not depend on how and were computed, and it holds for every random choice. How large is, which decides how many vectors are found, is a probabilistic question. The remark at the end explains it but does not prove it.
(1) Termination. The loop of line L2 runs at most times. Each step does a fixed number of block products and operations. The selection on line L5 is a loop over columns. Each inner reduction loop of line L10 clears the top bit of img, so it runs at most times. The final echelon loop clears the top bit of vec in each pass, so it runs at most times per vector.
(2) The final step. Write for the columns of . Line L10 treats them in order and keeps a table basis of pairs that are indexed by distinct leading positions. Two invariants hold:
- (J1) every stored pair has and , and is a sum of columns of ;
- (J2) every pair handled during the reduction of column has , and .
At the start of column , the pair is , and (J2) holds. A reduction step adds a stored pair . By (J1), , so . Also is a sum of earlier columns, because a pair is stored only when its column is finished. So (J2) still holds. If the reduced image is nonzero, the pair is stored with the leading position of . That position is not in the table, because the loop stopped exactly there. So (J1) holds and the positions stay distinct.
When the image reduces to , (J2) gives , and the vector is put in the list kernel if it is nonzero. So every vector in kernel lies in .
Conversely, let be the set of columns whose reduced image is nonzero (the pivot columns) and the rest. For , the reduction gives a coefficient vector with , , a in position and zeros in the later positions of . The images for are independent, because their reduced forms have distinct leading positions. So the rank of is , and has dimension . The for are independent, since their entries on form a triangular pattern. So they form a basis of . Every is for some with , which is a combination of the . Hence is a combination of the . So the vectors span , and leaving out the zero ones does not change the span.
The last loop of the algorithm reduces each vector of kernel against a table out with distinct leading positions. Each stored vector is nonzero, and each lies in the span of kernel, since it is a sum of vectors of kernel. The span of the table is the span of kernel: a vector that reduces to zero is a sum of stored vectors. Vectors with distinct leading positions are independent. So out is a basis of .
If , this space is , and the algorithm returns nothing. If all tries return nothing, the algorithm returns the empty list. That answer is allowed, and the algorithm never reports a wrong vector.
(3) The selection. The procedure runs Gauss-Jordan elimination on the matrix . It takes the columns not in first. A column with a pivot in the left half is put in . For a column without a left pivot, the row that has a in position of the right half is used to clear that position in the other rows, and then it is set to zero. Montgomery (1995, Section 8) proves that this produces and a set with . The cover condition is checked explicitly, and the procedure reports a breakdown if it fails. The tests check both identities against a dense inverse, on random symmetric matrices. Claim (2) does not use (3): a wrong could only lower the number of vectors found.
Remark: why contains kernel vectors. Write . Montgomery (1995, Sections 4 to 6) shows that, with the recurrence of lines L7 and L8 and no breakdown:
- the spaces are pairwise -orthogonal, that is, for ;
- each is invertible;
- is the Krylov space spanned by up to that step.
The tests check the first property directly on the iterates.
Since the are independent, the dimensions add up to at most , so with no breakdown there are at most iterations. is the -orthogonal projection of onto the Krylov space. If the iteration ends with , then , so over . Then lies in , which is usually small, and the elimination of line L10 removes it.
Over , the iteration usually ends instead with but . Montgomery argues that then and together have small rank, so that combinations of the columns of and lie in , and most of them in . In the worked example on the page, exactly. That is why has both. This explanation and the expected count of about iterations are Montgomery's analysis, not proved here. The page reports the measured counts.