Power iteration

In mathematics, power iteration (also known as the power method) is an eigenvalue algorithm: given a diagonalizable matrix formula_1, the algorithm will produce a number formula_2, which is the greatest (in absolute value) eigenvalue of formula_1, and a nonzero vector formula_4, which is a corresponding eigenvector of formula_2, that is, formula_6.
The algorithm is also known as the Von Mises iteration.
Power iteration is a very simple algorithm, but it may converge slowly. The most time-consuming operation of the algorithm is the multiplication of matrix formula_1 by a vector, so it is effective for a very large sparse matrix with appropriate implementation.
The method.
The power iteration algorithm starts with a vector formula_8, which may be an approximation to the dominant eigenvector or a random vector. The method is described by the recurrence relation
So, at every iteration, the vector formula_10 is multiplied by the matrix formula_1 and normalized. 
If we assume formula_1 has an eigenvalue that is strictly greater in magnitude than its other eigenvalues and the starting vector formula_8 has a nonzero component in the direction of an eigenvector associated with the dominant eigenvalue, then a subsequence formula_14 converges to an eigenvector associated with the dominant eigenvalue.
Without the two assumptions above, the sequence formula_14 does not necessarily converge. In this sequence,
where formula_17 is an eigenvector associated with the dominant eigenvalue, and formula_18. The presence of the term formula_19 implies that formula_20 does not converge unless formula_21. Under the two assumptions listed above, the sequence formula_22 defined by
converges to the dominant eigenvalue (with Rayleigh quotient).
One may compute this with the following algorithm (shown in Python with NumPy):
import numpy as np
def power_iteration(A, num_simulations: int):
 # Ideally choose a random vector
 # To decrease the chance that our vector
 # Is orthogonal to the eigenvector
 b_k = np.random.rand(A.shape[1])
 for _ in range(num_simulations):
 # calculate the matrix-by-vector product Ab
 b_k1 = np.dot(A, b_k)
 # calculate the norm
 b_k1_norm = np.linalg.norm(b_k1)
 # re normalize the vector
 b_k = b_k1 / b_k1_norm
 return b_k
power_iteration(np.array(0.5, 0.5], [0.2, 0.8), 10)
The vector formula_10 to an associated eigenvector. Ideally, one should use the Rayleigh quotient in order to get the associated eigenvalue.
This algorithm is used to calculate the "Google PageRank".
The method can also be used to calculate the spectral radius (the eigenvalue with the largest magnitude, for a square matrix) by computing the Rayleigh quotient
Analysis.
Let formula_1 be decomposed into its Jordan canonical form: formula_27, where the first column of formula_28 is an eigenvector of formula_1 corresponding to the dominant eigenvalue formula_30. Since the dominant eigenvalue of formula_1 is unique, the first Jordan block of formula_32 is the formula_33 matrix formula_34 where formula_30 is the largest eigenvalue of "A" in magnitude. The starting vector formula_8 can be written as a linear combination of the columns of "V":
By assumption, formula_38 has a nonzero component in the direction of the dominant eigenvalue, so formula_39.
The computationally useful recurrence relation for formula_40 can be rewritten as:
where the expression: formula_42 is more amenable to the following analysis.
The expression above simplifies as formula_44
The limit follows from the fact that the eigenvalue of formula_46 is less than 1 in magnitude, so
It follows that:
Using this fact, formula_49 can be written in a form that emphasizes its relationship with formula_50 when "k" is large:
where formula_52 and formula_53 as formula_44
The sequence formula_55 is bounded, so it contains a convergent subsequence. Note that the eigenvector corresponding to the dominant eigenvalue is only unique up to a scalar, so although the sequence formula_56 may not converge,
formula_49 is nearly an eigenvector of "A" for large "k".
Alternatively, if "A" is diagonalizable, then the following proof yields the same result
Let λ1, λ2, ..., λ"m" be the m eigenvalues (counted with multiplicity) of A and let "v"1, "v"2, ..., "v""m" be the corresponding eigenvectors. Suppose that formula_58 is the dominant eigenvalue, so that formula_59 for formula_60.
The initial vector formula_8 can be written:
If formula_8 is chosen randomly (with uniform probability), then "c"1 ≠ 0 with probability 1. Now,
On the other hand:
Therefore, formula_10 converges to (a multiple of) the eigenvector formula_17. The convergence is geometric, with ratio
where formula_69 denotes the second dominant eigenvalue. Thus, the method converges slowly if there is an eigenvalue close in magnitude to the dominant eigenvalue.
Applications.
Although the power iteration method approximates only one eigenvalue of a matrix, it remains useful for certain computational problems. For instance, Google uses it to calculate the PageRank of documents in their search engine, and Twitter uses it to show users recommendations of whom to follow. The power iteration method is especially suitable for sparse matrices, such as the web matrix, or as the matrix-free method that does not require storing the coefficient matrix formula_1 explicitly, but can instead access a function evaluating matrix-vector products formula_71. For non-symmetric matrices that are well-conditioned the power iteration method can outperform more complex Arnoldi iteration. For symmetric matrices, the power iteration method is rarely used, since its convergence speed can be easily increased without sacrificing the small cost per iteration; see, e.g., Lanczos iteration and LOBPCG.
Some of the more advanced eigenvalue algorithms can be understood as variations of the power iteration. For instance, the inverse iteration method applies power iteration to the matrix formula_72. Other algorithms look at the whole subspace generated by the vectors formula_10. This subspace is known as the Krylov subspace. It can be computed by Arnoldi iteration or Lanczos iteration.