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 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 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): #!/usr/bin/env python3 import numpy as np def power_iteration(A, num_iterations: 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_iterations): # 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 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 be decomposed into its Jordan canonical form: , where the