Implement the power iteration method to find the dominant eigenvector of a matrix. This task involves understanding the underlying concept of eigenvalues and eigenvectors, which are crucial in linear algebra and have numerous applications in computer vision and machine learning.
The power iteration method is an iterative algorithm that finds the eigenvector corresponding to the largest eigenvalue of a matrix A. The process involves starting with a random vector v0 and iteratively updating it using the matrix A. The key idea is to repeatedly apply the matrix A to the current vector and normalize the result.
Here are the general steps:
This technique is widely used in principal component analysis (PCA).
power_iteration([[2, 0], [0, 1]], [1, 1], 10)
[1.0, 0.0]
Converges to eigenvector [1, 0] for eigenvalue 2