The Rayleigh–Ritz method is a direct numerical method of approximating eigenvalues, which originated in the context of solving physical boundary-value problems. It is named after Lord Rayleigh and Walther Ritz. In this method, an infinite-dimensional linear operator is approximated by a finite-dimensional compression, enabling the use of a numerical eigenvalue algorithm.
It is used in all applications that involve approximating eigenvalues and eigenvectors, often under different names. In quantum mechanics, where a system of particles is described using a Hamiltonian, it uses trial wave functions to approximate the ground-state eigenfunction. In the context of the finite-element method, it is mathematically the same as the Ritz-Galerkin method. In mechanical and structural engineering, it is used to approximate the eigenmodes and resonant frequencies of a structure. A related adaption of Rayleigh-Ritz known as Hamiltonian truncation can be used in quantum field theory.
Naming and attribution
The origin of this technique has been debated by historians. It has been called Ritz method after Walther Ritz, who published the numerical procedure 1908 and 1909. Lord Rayleigh wrote a paper congratulating Ritz on his work in 1911, but stating that he himself had used Ritz's method in many places in his book, Theory of Sound (1877), and elsewhere. According to Richard Courant, both Lord Rayleigh and Walther Ritz independently invented the idea of utilizing the equivalence between the boundary-value problems of partial differential equations on the one hand and problems of the calculus of variations on the other to numerically compute the solutions, by substituting for the variational problems simpler approximating extremum problems in which only a finite number of parameters need to be determined. Historian Jesper Lützen, who had examined the unpublished manuscripts of Joseph Liouville, discovered that Liouville had already known of this method as early as 1845.
Method Let be a linear operator on a Hilbert space , with inner product . Now consider a finite set of functions . Depending on the application these functions may be:
A subset of the orthonormal basis of the original operator; A space of splines (as in the Galerkin method); A set of functions which approximate the eigenfunctions of the operator.
One could use the orthonormal basis generated from the eigenfunctions of the operator, which will produce diagonal approximating matrices, but in this case we would have already had to calculate the spectrum.
We now approximate by , which is defined as the matrix with entries
and solve the eigenvalue problem . It can be shown that the matrix is the compression of to .
For differential operators (such as Sturm-Liouville operators), the inner product can be replaced by the weak formulation .
If a subset of the orthonormal basis was used to find the matrix, the eigenvectors of will be linear combinations of orthonormal basis functions, and as a result they will be approximations of the eigenvectors of .
Properties Spectral pollution It is possible for the Rayleigh–Ritz method to produce values which do not converge to actual values in the spectrum of the operator as the truncation gets large. These values are known as spectral pollution. In some cases (such as for the Schrödinger equation), there is no approximation which both includes all eigenvalues of the equation, and contains no pollution.
The spectrum of the compression (and thus pollution) is bounded by the numerical range of the operator; in many cases it is bounded by a subset of the numerical range known as the essential numerical range.
For matrix eigenvalue problems In numerical linear algebra, the Rayleigh–Ritz method is commonly applied to approximate an eigenvalue problem
for the matrix of size using a projected matrix of a smaller size , generated from a given matrix with orthonormal columns. The matrix version of the algorithm is the most simple:
Compute the matrix , where denotes the complex-conjugate transpose of Solve the eigenvalue problem Compute the Ritz vectors and the Ritz value Output approximations , called the Ritz pairs, to eigenvalues and eigenvectors of the original matrix .
If the subspace with the orthonormal basis given by the columns of the matrix contains vectors that are close to eigenvectors of the matrix , the Rayleigh–Ritz method above finds Ritz vectors that well approximate these eigenvectors. The easily computable quantity determines the accuracy of such an approximation for every Ritz pair.
In the easiest case , the matrix turns into a unit column-vector , the matrix is a scalar that is equal to the Rayleigh quotient , the only solution to the eigenvalue problem is and , and the only Ritz vector is itself. Thus, the Rayleigh–Ritz method turns into computing of the Rayleigh quotient if .
Another useful connection to the Rayleigh quotient is that for every Ritz pair , allowing to derive some properties of Ritz values from the corresponding theory for the Rayleigh quotient. For example, if is a Hermitian matrix, its Rayleigh quotient (and thus its every Ritz value) is real and takes values within the closed interval of the smallest and largest eigenvalues of .
Example The matrix
has eigenvalues and the corresponding eigenvectors
Let us take
then
with eigenvalues and the corresponding eigenvectors
so that the Ritz values are and the Ritz vectors are
We observe that each one of the Ritz vectors is exactly one of the eigenvectors of for the given as well as the Ritz values give exactly two of the three eigenvalues of . A mathematical explanation for the exact approximation is based on the fact that the column space of the matrix happens to be exactly the same as the subspace spanned by the two eigenvectors and in this example.
For matrix singular value problems Truncated singular value decomposition (SVD) in numerical linear algebra can also use the Rayleigh–Ritz method to find approximations to left and right singular vectors of the matrix of size in given subspaces by turning the singular value problem into an eigenvalue problem.
Using the normal matrix The definition of the singular value and the corresponding left and right singular vectors is and . Having found one set (left of right) of approximate singular vectors and singular values by applying naively the Rayleigh–Ritz method to the Hermitian normal matrix or , whichever one is smaller size, one could determine the other set of left of right singular vectors simply by dividing by the singular values, i.e., and . However, the division is unstable or fails for small or zero singular values.
An alternative approach, e.g., defining the normal matrix as of size , takes advantage of the fact that for a given matrix with orthonormal columns the eigenvalue problem of the Rayleigh–Ritz method for the matrix
can be interpreted as a singular value problem for the matrix . This interpretation allows simple simultaneous calculation of both left and right approximate singular vectors as follows.
Compute the matrix . Compute the thin, or economy-sized, SVD with matrix , diagonal matrix , and matrix . Compute the matrices of the Ritz left and right singular vectors. Output approximations , called the Ritz singular triplets, to selected singular values and the corresponding left and right singular vectors of the original matrix representing an approximate Truncated singular value decomposition (SVD) with left singular vectors restricted to the column-space of the matrix .
The algorithm can be used as a post-processing step where the matrix is an output of an eigenvalue solver, e.g., such as LOBPCG, approximating numerically selected eigenvectors of the normal matrix .
Example The matrix
has its normal matrix
singular values and the corresponding thin SVD
where the columns of the first multiplier from the complete set of the left singular vectors of the matrix , the diagonal entries of the middle term are the singular values, and the columns of the last multiplier transposed (although the transposition does not change it)
are the corresponding right singular vectors.
Let us take
with the column-space that is spanned by the two exact right singular vectors
corresponding to the singular values 1 and 2.
Following the algorithm step 1, we compute
and on step 2 its thin SVD with
Thus we already obtain the singular values 2 and 1 from and from the corresponding two left singular vectors as and , which span the column-space of the matrix , explaining why the approximations are exact for the given .
Finally, step 3 computes the matrix
recovering from its rows the two right singular vectors as and . We validate the first vector:
and
Thus, for the given matrix with its column-space that is spanned by two exact right singular vectors, we determine these right singular vectors, as well as the corresponding left singular vectors and the singular values, all exactly. For an arbitrary matrix , we obtain approximate singular triplets which are optimal given in the sense of optimality of the Rayleigh–Ritz method.
Applications and examples
In quantum physics In quantum physics, where the spectrum of the Hamiltonian is the set of discrete energy levels allowed by a quantum mechanical system, the Rayleigh–Ritz method is used to approximate the energy states and wavefunctions of a complicated atomic or nuclear system. In fact, for any system more complicated than a single hydrogen atom, there is no known exact solution for the spectrum of the Hamiltonian.
In this case, a trial wave function, , is tested on the system. This trial function is selected to meet boundary conditions (and any other physical constraints). The exact function is not known; the trial function contains one or more adjustable parameters, which are varied to find a lowest energy configuration.
It can be shown that the ground state energy, , satisfies an inequality:
That is, the ground-state energy is less than this value. The trial wave-function will always give an expectation value larger than or equal to the ground-energy.
If the trial wave function is known to be orthogonal to the ground state, then it will provide a boundary for the energy of some excited state.
The Ritz ansatz function is a linear combination of N known basis functions , parametrized by unknown coefficients:
With a known Hamiltonian, we can write its expected value as
The basis functions are usually not orthogonal, so that the overlap matrix S has nonzero nondiagonal elements. Either or (the conjugation of the first) can be used to minimize the expectation value. For instance, by making the partial derivatives of over zero, the following equality is obtained for every k = 1, 2, ..., N:
which leads to a set of N secular equations:
In the above equations, energy and the coefficients are unknown. With respect to c, this is a homogeneous set of linear equations, which has a solution when the determinant of the coefficients to these unknowns is zero:
which in turn is true only for N values of . Furthermore, since the Hamiltonian is a hermitian operator, the H matrix is also hermitian and the values of will be real. The lowest value among (i=1,2,..,N), , will be the best approximation to the ground state for the basis functions used. The remaining N-1 energies are estimates of excited state energies. An approximation for the wave function of state i can be obtained by finding the coefficients from the corresponding secular equation.
In mechanical engineering The Rayleigh–Ritz method is often used in mechanical engineering for finding the approximate real resonant frequencies of multi degree of freedom systems, such as spring mass systems or flywheels on a shaft with varying cross section. It is an extension of Rayleigh's method. It can also be used for finding buckling loads and post-buckling behaviour for columns.