Concept

π‘π‘˜+1=π΄π‘π‘˜

Convergent rate

πœ†2πœ†1

where πœ†2 is eigenvalue having 2nd largest modulus

Limitations

  • may not converge
  • bad initial guess vector
  • more than on eigenvector, so it will converge to linear combination of those two

Variants

normalized power iteration

Concept

π‘¦π‘˜=𝐴π‘₯π‘˜βˆ’1 π‘₯π‘˜=π‘¦π‘˜β€–π‘¦π‘˜β€–βˆž

where every iteration it been multiply by a matrix 𝐴 and normalized.
It’s goal is to find a eigenvector of 𝐴.

Code

import numpy as np
 
def power_iter(A, num_iter, tol=1e-6):
	x_k = np.random.rand(A.shape[1])
	for _ in range(num_iter):
		y_k = np.dot(A, x_k)
		x_k_o = x_k
		x_k = y_k / np.linalg.norm(y_k)
		if np.linalg.norm(x_k - x_k_o) < tol:
			break
	return x_k

power iteration with Shift

in order to accelerate the convergence speed, we can pick a shift 𝜎 where 𝐴′=π΄βˆ’πœŽπΌ and

πœ†2βˆ’πœŽπœ†1βˆ’πœŽ<πœ†2πœ†1

everything else keep same. After all, you need to add shift into result.