Power iteration
Eigenvalue algorithm
In mathematics, power iteration (also known as the power method) is an eigenvalue algorithm: given a diagonalizable matrix , the algorithm will produce a number
, which is the greatest (in absolute value) eigenvalue of
, and a nonzero vector
, which is a corresponding eigenvector of
, that is,
.
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 by a vector, so it is effective for a very large sparse matrix with appropriate implementation. The speed of convergence is like
where
is the number of iterations, and
and
are, respectively, the eigenvalue of largest absolute value and an eigenvalue of second-largest absolute value (see a later section). In other words, convergence is exponential with base being the spectral gap.
01The method
The power iteration algorithm starts with a vector , 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 is multiplied by the matrix
and normalized.
If we assume has an eigenvalue that is strictly greater in magnitude than its other eigenvalues, i.e.,
and the starting vector has a nonzero component in the direction of an eigenvector associated with the dominant eigenvalue, then a subsequence
converges to an eigenvector associated with the dominant eigenvalue.
Without the two assumptions above, the sequence does not necessarily converge. In this sequence,
,
where is an eigenvector associated with the dominant eigenvalue, and
. The presence of the term
implies that
does not converge unless
. Under the two assumptions listed above, the sequence
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 from numpy import typing as npt def random_vector(dimension: int) -> npt.NDArray[np.float64]: rng = np.random.default_rng() return rng.random(dimension) def power_method( A: npt.NDArray[np.float64], num_iterations: int, ) -> npt.NDArray[np.float64]: if A.shape[0] != A.shape[1]: raise ValueError("A must be a square matrix.") # Choose a random initial vector to reduce the chance # that it is orthogonal to the dominant eigenvector. b_k = random_vector(A.shape[1]) # Normalize the initial vector. b_k /= np.linalg.norm(b_k) for _ in range(num_iterations): # Multiply by the matrix. b_k1 = A @ b_k # Compute the length of the new vector. b_k1_norm = np.linalg.norm(b_k1) # Stop if the new vector is within machine precision of 0. if np.isclose(b_k1_norm, 0.0): raise ValueError("Power method produced the zero vector.") # Normalize the vector for the next iteration. b_k = b_k1 / b_k1_norm # Return the approximate dominant eigenvector. return b_kThe vector converges 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

02Analysis
Let be decomposed into its Jordan canonical form:
, where the first column of
is an eigenvector of
corresponding to the dominant eigenvalue
. Since generically, the dominant eigenvalue of
is unique, the first Jordan block of
is the
matrix
where
is the largest eigenvalue of
in magnitude. The starting vector
can be written as a linear combination of the columns of
:
By assumption, has a nonzero component in the direction of the dominant eigenvector, so
.
The computationally useful recurrence relation for can be rewritten as:
where the expression: is more amenable to the following analysis:
The expression above simplifies as
The limit follows from the fact that the eigenvalue of is less than 1 in magnitude, so
It follows that:
Using this fact, can be written in a form that emphasizes its relationship with
when
is large:
where and
as
The sequence 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
may not converge,
is nearly an eigenvector of
for large
.
Alternatively, if is diagonalizable, then the following proof yields the same result:
Let be the
eigenvalues (counted with multiplicity) of
in the order of descending absolute value (equalities allowed), that is
, and let
be the corresponding eigenvectors. Suppose that
is the dominant eigenvalue, so that
for all
.
The initial vector can be written:
If is chosen randomly (with uniform probability), then
with probability 1. Now,
On the other hand:
Therefore, converges to (a multiple of) the eigenvector
. The convergence is geometric, with ratio
Thus, the method converges slowly if there is an eigenvalue close in magnitude to the dominant eigenvalue.
03Applications
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 explicitly, but can instead access a function evaluating matrix-vector products
. 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 . Other algorithms look at the whole subspace generated by the vectors
. This subspace is known as the Krylov subspace. It can be computed by Arnoldi iteration or Lanczos iteration.
Gram iteration is a super-linear and deterministic method to compute the largest eigenpair.
Sources and credits
This article is adapted from the Wikipedia article “Power iteration”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Images, from Wikimedia Commons:
- Animation of the Power Iteration Algorithm.gif by Alexmath1994, CC BY-SA 4.0
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.