HOME

TheInfoList



OR:

Rayleigh quotient iteration is an eigenvalue algorithm which extends the idea of the inverse iteration by using the Rayleigh quotient to obtain increasingly accurate eigenvalue estimates. Rayleigh quotient iteration is an iterative method, that is, it delivers a sequence of approximate solutions that converges to a true solution in the limit. Very rapid convergence is guaranteed and no more than a few iterations are needed in practice to obtain a reasonable approximation. The Rayleigh quotient iteration algorithm converges cubically for Hermitian or symmetric matrices, given an initial vector that is sufficiently close to an eigenvector of the
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** '' The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
that is being analyzed.


Algorithm

The algorithm is very similar to inverse iteration, but replaces the estimated eigenvalue at the end of each iteration with the Rayleigh quotient. Begin by choosing some value \mu_0 as an initial eigenvalue guess for the Hermitian matrix A. An initial vector b_0 must also be supplied as initial eigenvector guess. Calculate the next approximation of the eigenvector b_ by b_ = \frac,
where I is the identity matrix, and set the next approximation of the eigenvalue to the Rayleigh quotient of the current iteration equal to
\mu_ = \frac. To compute more than one eigenvalue, the algorithm can be combined with a deflation technique. Note that for very small problems it is beneficial to replace the matrix inverse with the adjugate, which will yield the same iteration because it is equal to the inverse up to an irrelevant scale (the inverse of the determinant, specifically). The adjugate is easier to compute explicitly than the inverse (though the inverse is easier to apply to a vector for problems that aren't small), and is more numerically sound because it remains well defined as the eigenvalue converges.


Example

Consider the matrix : A = \left begin 1 & 2 & 3\\ 1 & 2 & 1\\ 3 & 2 & 1\\ \end\right for which the exact eigenvalues are \lambda_1 = 3+\sqrt5, \lambda_2 = 3-\sqrt5 and \lambda_3 = -2, with corresponding eigenvectors :v_1 = \left \begin 1 \\ \varphi-1 \\ 1 \\ \end\right/math>, v_2 = \left \begin 1 \\ -\varphi \\ 1 \\ \end\right/math> and v_3 = \left \begin 1 \\ 0 \\ 1 \\ \end\right/math>. (where \textstyle\varphi=\frac2 is the golden ratio). The largest eigenvalue is \lambda_1 \approx 5.2361 and corresponds to any eigenvector proportional to v_1 \approx \left \begin 1 \\ 0.6180 \\ 1 \\ \end\right We begin with an initial eigenvalue guess of :b_0 = \left begin 1 \\ 1 \\ 1 \\ \end\right ~\mu_0 = 200. Then, the first iteration yields :b_1 \approx \left begin -0.57927 \\ -0.57348 \\ -0.57927 \\ \end\right ~\mu_1 \approx 5.3355 the second iteration, :b_2 \approx \left begin 0.64676 \\ 0.40422 \\ 0.64676 \\ \end\right ~\mu_2 \approx 5.2418 and the third, :b_3 \approx \left begin -0.64793 \\ -0.40045 \\ -0.64793 \\ \end\right ~\mu_3 \approx 5.2361 from which the cubic convergence is evident.


Octave implementation

The following is a simple implementation of the algorithm in
Octave In music, an octave ( la, octavus: eighth) or perfect octave (sometimes called the diapason) is the interval between one musical pitch and another with double its frequency. The octave relationship is a natural phenomenon that has been refer ...
. function x = rayleigh(A, epsilon, mu, x) x = x / norm(x); % the backslash operator in Octave solves a linear system y = (A - mu * eye(rows(A))) \ x; lambda = y' * x; mu = mu + 1 / lambda err = norm(y - lambda * x) / norm(y) while err > epsilon x = y / norm(y); y = (A - mu * eye(rows(A))) \ x; lambda = y' * x; mu = mu + 1 / lambda err = norm(y - lambda * x) / norm(y) end end


See also

* Power iteration * Inverse iteration


References

* Lloyd N. Trefethen and David Bau, III, ''Numerical Linear Algebra'', Society for Industrial and Applied Mathematics, 1997. . * Rainer Kress, "Numerical Analysis", Springer, 1991. {{Numerical linear algebra Numerical linear algebra Articles with example MATLAB/Octave code