1.6 KiB
eigenvalues → power method
we iterate on the xk+1 = A x_k
y = Av_0 v_1 = \frac{1}{|| y ||} (y) λ_0 = v_0^T A v_0 = v_0^T y
Find the largest eigenvalue;
while (error > tol && iter < max_iter) {
v_1 = (1 / magnitude(y)) * y;
w = m_dot_v(a, v_1);
lambda_1 = v_dot_v(transpose(v_1), w);
error = abs(lambda_1 - lambda_0);
iter++;
lambda_0 = lambda_1;
y = v_1;
}
return [lambda_1, error];
Find the smallest eigenvalue:
We know:
If λ_1 is the largest eigenvalue of $A$ then \frac{1}{λ_1} is the smallest eigenvalue of $A^{-1}$.
If λ_n is the smallest eigenvalue of $A$ then \frac{1}{λ_n} is the largest eigenvalue of $A^{-1}$.
However, calculating $A^{-1}$ is inefficient
So, transform $w = A^{-1} v_1 \Rightarrow$ Solve $Aw = v_1$ with LU or GE (line 3 of above snippet).
And, transform $y = A^{-1} v_0 \Rightarrow$ Solve $Ay = v_0$ with LU or GE.
Conclusions
We have the means to compute the approximations of λ_1 and λ_n.
(λ_1 → power method)
(λ_n → inverse power method)
Eigenvalue Shifting
If (λ, v) is an eigen pair, (v ≠ 0)
Av = λv
Thus for any μ ∈ R
(Av - μ I v) = (A - μ I)v = λ v - μ I v = (λ - μ)v ⇒ λ - μ is an eigenvalue of (A - μ I)
(A - μ I)v = (λ - μ)v
Idea is to choose μ close to our eigenvalue. We can then inverse iterate to construct an approximation of λ - μ and then add μ back to get λ.
v_0 = a_1 v_1 + a_2 v_2 + ⋯ + a_n v_n A v_0 = a_1 (λ_1 v_1) + ⋯