Lanczos algorithm

Lanczos algorithm

From Wikipedia, the free encyclopedia
The Lanczos algorithm is an iterative algorithm invented by Cornelius Lanczos that is an adaptation of power methods to findeigenvalues and eigenvectors of a square matrix or the singular value decomposition of a rectangular matrix. It is particularly useful for finding decompositions of very large sparse matrices. In Latent Semantic Indexing, for instance, matrices relating millions of documents to hundreds of thousands of terms must be reduced to singular-value form.
Peter Montgomery published in 1995 an algorithm, based on the Lanczos algorithm, for finding elements of the nullspace of a large sparse matrix over GF(2); since the set of people interested in large sparse matrices over finite fields and the set of people interested in large eigenvalue problems scarcely overlap, this is often also called the block Lanczos algorithm without causing unreasonable confusion. See Block Lanczos algorithm for nullspace of a matrix over a finite field.

Lanczos algorithm

Lanczos algorithm

From Wikipedia, the free encyclopedia
The Lanczos algorithm is an iterative algorithm invented by Cornelius Lanczos that is an adaptation of power methods to findeigenvalues and eigenvectors of a square matrix or the singular value decomposition of a rectangular matrix. It is particularly useful for finding decompositions of very large sparse matrices. In Latent Semantic Indexing, for instance, matrices relating millions of documents to hundreds of thousands of terms must be reduced to singular-value form.
Peter Montgomery published in 1995 an algorithm, based on the Lanczos algorithm, for finding elements of the nullspace of a large sparse matrix over GF(2); since the set of people interested in large sparse matrices over finite fields and the set of people interested in large eigenvalue problems scarcely overlap, this is often also called the block Lanczos algorithm without causing unreasonable confusion. See Block Lanczos algorithm for nullspace of a matrix over a finite field.

Arnoldi iteration

Arnoldi iteration

From Wikipedia, the free encyclopedia
In numerical linear algebra, the Arnoldi iteration is an eigenvalue algorithm and an important example of iterative methods. Arnoldi finds the eigenvalues of general (possibly non-Hermitianmatrices; an analogous method for Hermitian matrices is the Lanczos iteration. The Arnoldi iteration was invented by W. E. Arnoldi in 1951.
The term iterative method, used to describe Arnoldi, can perhaps be somewhat confusing. Note that all general eigenvalue algorithms must be iterative. This is not what is referred to when we say Arnoldi is an iterative method. Rather, Arnoldi belongs to a class of linear algebra algorithms (based on the idea of Krylov subspaces) that give a partial result after a relatively small number of iterations. This is in contrast to so-called direct methods, which must complete to give any useful results.
Arnoldi iteration is a typical large sparse matrix algorithm: It does not access the elements of the matrix directly, but rather makes the matrix map vectors and makes its conclusions from their images. This is the motivation for building the Krylov subspace.

Gram–Schmidt process

 the Gram–Schmidt process is a method for orthonormalising a set of vectors in an inner product space, most commonly theEuclidean space Rn. The Gram–Schmidt process takes a finitelinearly independent set S = {v1, …, vk} for k ≤ n and generates an orthogonal set S′ = {u1, …, uk} that spans the same k-dimensional subspace of Rn as S.
The method is named for Jørgen Pedersen Gram and Erhard Schmidt but it appeared earlier in the work of Laplace and Cauchy. In the theory of Lie group decompositions it is generalized by theIwasawa decomposition.
The application of the Gram–Schmidt process to the column vectors of a full column rank matrix yields the QR decomposition (it is decomposed into an orthogonal and a triangular matrix).

The Gram–Schmidt process

We define the projection operator by
mathrm{proj}_{mathbf{u}},(mathbf{v}) = {langle mathbf{v}, mathbf{u}rangleoverlangle mathbf{u}, mathbf{u}rangle}mathbf{u} ,
where 〈u, v〉 denotes the inner product of the vectors u and v. This operator projects the vector v orthogonally onto the vector u.
The Gram–Schmidt process then works as follows:
 begin{align} mathbf{u}_1 & = mathbf{v}_1, & mathbf{e}_1 & = {mathbf{u}_1 over |mathbf{u}_1|} \ mathbf{u}_2 & = mathbf{v}_2-mathrm{proj}_{mathbf{u}_1},(mathbf{v}_2), & mathbf{e}_2 & = {mathbf{u}_2 over |mathbf{u}_2|} \ mathbf{u}_3 & = mathbf{v}_3-mathrm{proj}_{mathbf{u}_1},(mathbf{v}_3)-mathrm{proj}_{mathbf{u}_2},(mathbf{v}_3), & mathbf{e}_3 & = {mathbf{u}_3 over |mathbf{u}_3|} \ mathbf{u}_4 & = mathbf{v}_4-mathrm{proj}_{mathbf{u}_1},(mathbf{v}_4)-mathrm{proj}_{mathbf{u}_2},(mathbf{v}_4)-mathrm{proj}_{mathbf{u}_3},(mathbf{v}_4), & mathbf{e}_4 & = {mathbf{u}_4 over |mathbf{u}_4|} \ & {}   vdots & & {}   vdots \ mathbf{u}_k & = mathbf{v}_k-sum_{j=1}^{k-1}mathrm{proj}_{mathbf{u}_j},(mathbf{v}_k), & mathbf{e}_k & = {mathbf{u}_kover |mathbf{u}_k |}. end{align}

The first two steps of the Gram–Schmidt process
The sequence u1, …, uk is the required system of orthogonal vectors, and the normalized vectors e1, …, ek form an orthonormal set. The calculation of the sequence u1, …, uk is known as Gram–Schmidt orthogonalization, while the calculation of the sequence e1, …,ek is known as Gram–Schmidt orthonormalization as the vectors are normalized.
To check that these formulas yield an orthogonal sequence, first compute 〈u1u2〉 by substituting the above formula for u2: we get zero. Then use this to compute 〈u1u3〉 again by substituting the formula for u3: we get zero. The general proof proceeds bymathematical induction.
Geometrically, this method proceeds as follows: to compute ui, it projects vi orthogonally onto the subspace U generated by u1, …,ui−1, which is the same as the subspace generated by v1, …, vi−1. The vector ui is then defined to be the difference between vi and this projection, guaranteed to be orthogonal to all of the vectors in the subspace U.
The Gram–Schmidt process also applies to a linearly independent infinite sequence {vi}i. The result is an orthogonal (or orthonormal) sequence {ui}i such that for natural number n: the algebraic span of v1, …, vn is the same as that of u1, …, un.
If the Gram–Schmidt process is applied to a linearly dependent sequence, it outputs the 0 vector on the ith step, assuming that vi is a linear combination of v1, …, vi−1. If an orthonormal basis is to be produced, then the algorithm should test for zero vectors in the output and discard them because no multiple of a zero vector can have a length of 1. The number of vectors output by the algorithm will then be the dimension of the space spanned by the original inputs.

Numerical stability

When this process is implemented on a computer, the vectors uk are often not quite orthogonal, due to rounding errors. For the Gram–Schmidt process as described above (sometimes referred to as “classical Gram–Schmidt”) this loss of orthogonality is particularly bad; therefore, it is said that the (classical) Gram–Schmidt process is numerically unstable.
The Gram–Schmidt process can be stabilized by a small modification. Instead of computing the vector uk as
 mathbf{u}_k = mathbf{v}_k - mathrm{proj}_{mathbf{u}_1},(mathbf{v}_k) - mathrm{proj}_{mathbf{u}_2},(mathbf{v}_k) - cdots - mathrm{proj}_{mathbf{u}_{k-1}},(mathbf{v}_k),
it is computed as
 begin{align} mathbf{u}_k^{(1)} &= mathbf{v}_k - mathrm{proj}_{mathbf{u}_1},(mathbf{v}_k), \ mathbf{u}_k^{(2)} &= mathbf{u}_k^{(1)} - mathrm{proj}_{mathbf{u}_2} , (mathbf{u}_k^{(1)}), \ & ,,, vdots \ mathbf{u}_k^{(k-2)} &= mathbf{u}_k^{(k-3)} - mathrm{proj}_{mathbf{u}_{k-2}} , (mathbf{u}_k^{(k-3)}), \ mathbf{u}_k^{(k-1)} &= mathbf{u}_k^{(k-2)} - mathrm{proj}_{mathbf{u}_{k-1}} , (mathbf{u}_k^{(k-2)}).  end{align}
Each step finds a vector  mathbf{u}_k^{(i)}  orthogonal to  mathbf{u}_k^{(i-1)} . Thus  mathbf{u}_k^{(i)}  is also orthogonalized against any errors introduced in computation of  mathbf{u}_k^{(i-1)} . This approach (sometimes referred to as “modified Gram–Schmidt”) gives the same result as the original formula in exact arithmetic and introduces smaller errors in finite-precision arithmetic.


Algorithm

The following algorithm implements the stabilized Gram–Schmidt orthonormalization. The vectors v1, …, vk are replaced by orthonormal vectors which span the same subspace.
for j from 1 to k do

for i from 1 to j − 1 do

 mathbf{v}_j leftarrow mathbf{v}_j - mathrm{proj}_{mathbf{v}_{i}} , (mathbf{v}_j)  (remove component in direction vi)
next i
 mathbf{v}_j leftarrow frac{mathbf{v}_j}{|mathbf{v}_j|}  (normalize)
next j
The cost of this algorithm is asymptotically 2nk2 floating point operations, where n is the dimensionality of the vectors (Golub & Van Loan 1996, §5.2.8)