Inferensys

Glossary

Rayleigh Quotient

The Rayleigh quotient is a scalar value associated with a given vector and a Hermitian matrix, providing an estimate for an eigenvalue and serving as the foundation for the Rayleigh quotient iteration algorithm.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
MATHEMATICAL FOUNDATION

What is Rayleigh Quotient?

The Rayleigh quotient is a fundamental scalar function in linear algebra that provides an estimate for an eigenvalue of a Hermitian (or real symmetric) matrix, given a non-zero vector. It serves as the cornerstone for the Rayleigh quotient iteration, a powerful algorithm for eigenvalue computation, and is intrinsically linked to variational principles in spectral theory.

The Rayleigh quotient ( R(A, x) ) for a Hermitian matrix ( A ) and a non-zero vector ( x ) is defined as ( R(A, x) = \frac{x^* A x}{x^* x} ), where ( x^* ) denotes the conjugate transpose. This scalar provides a quadratic form-based estimate for an eigenvalue of ( A ). A key property is that when ( x ) is an eigenvector of ( A ), the Rayleigh quotient equals the corresponding eigenvalue. For any other vector, it yields a weighted average of eigenvalues, bounded by the minimum and maximum eigenvalues of the matrix.

In computational practice, the Rayleigh quotient is the foundation for the Rayleigh quotient iteration, an iterative algorithm that converges cubically to an eigenvector-eigenvalue pair. This makes it far more efficient than basic power iteration. Its stationary points correspond precisely to eigenvectors, and its value is minimized (or maximized) by the corresponding eigenvector, a principle central to variational characterizations of eigenvalues. This property is critical in low-rank factorization and model compression, where approximating dominant eigen-subspaces is essential.

MATHEMATICAL FOUNDATIONS

Key Properties of the Rayleigh Quotient

The Rayleigh quotient is a scalar function that provides a variational characterization of eigenvalues for Hermitian (or real symmetric) matrices. Its properties are central to eigenvalue algorithms and optimization problems in machine learning.

01

Definition and Formula

For a given Hermitian matrix (A \in \mathbb{C}^{n \times n}) and a non-zero vector (x \in \mathbb{C}^{n}), the Rayleigh quotient (R(A, x)) is defined as:

[ R(A, x) = \frac{x^* A x}{x^* x} ]

where (x^*) denotes the conjugate transpose of (x). For real symmetric matrices and real vectors, this simplifies to (\frac{x^T A x}{x^T x}). This scalar provides an estimate for an eigenvalue of (A).

02

Stationary Points at Eigenvectors

A fundamental property is that the Rayleigh quotient's stationary points occur precisely at the eigenvectors of (A). This means the gradient (\nabla_x R(A, x)) is zero when (x) is an eigenvector. At such a point, the value of the quotient equals the corresponding eigenvalue:

[ R(A, v_i) = \lambda_i ]

where (A v_i = \lambda_i v_i). This makes it a crucial tool for iterative eigenvalue algorithms like Rayleigh quotient iteration.

03

Min-Max Theorem (Courant-Fischer)

The Courant-Fischer Min-Max Theorem provides a variational characterization of eigenvalues using the Rayleigh quotient. For a Hermitian matrix with eigenvalues (\lambda_1 \leq \lambda_2 \leq ... \leq \lambda_n), the (k)-th eigenvalue is given by:

[ \lambda_k = \min_{\dim(S)=k} \max_{x \in S, x \neq 0} R(A, x) ]

and equivalently,

[ \lambda_k = \max_{\dim(S)=n-k+1} \min_{x \in S, x \neq 0} R(A, x) ]

where (S) ranges over subspaces. This shows eigenvalues are solutions to constrained optimization problems.

04

Bounded by Extreme Eigenvalues

The Rayleigh quotient is bounded by the smallest and largest eigenvalues of (A). For any non-zero vector (x), the following inequality holds:

[ \lambda_{\min}(A) \leq R(A, x) \leq \lambda_{\max}(A) ]

The minimum value (\lambda_{\min}) is achieved at the corresponding eigenvector, and the maximum value (\lambda_{\max}) is achieved at its eigenvector. This property is used in spectral clustering and principal component analysis (PCA), where the first principal component maximizes the Rayleigh quotient of the covariance matrix.

05

Foundation for Iterative Algorithms

The Rayleigh quotient is the foundation for powerful iterative eigenvalue algorithms. The most notable is Rayleigh Quotient Iteration (RQI), a cubically convergent algorithm for finding an eigenpair.

  • Process: Given an estimate (x_k), compute the shift (\sigma_k = R(A, x_k)), then solve ((A - \sigma_k I) x_{k+1} = x_k) for the next iterate.
  • Convergence: With a good initial guess, RQI converges cubically to an eigenpair, making it significantly faster than the linearly convergent power iteration.
  • Use Case: It is used in large-scale eigenvalue problems where only a few eigenpairs are needed, such as in low-rank matrix approximations.
06

Connection to Generalized Eigenproblems

The Rayleigh quotient naturally extends to the generalized eigenvalue problem (A x = \lambda B x), where (A) and (B) are Hermitian and (B) is positive definite. The generalized Rayleigh quotient is:

[ R(A, B, x) = \frac{x^* A x}{x^* B x} ]

Its stationary points give the generalized eigenvectors, and its min-max properties characterize the generalized eigenvalues. This form is essential in Fisher's Linear Discriminant Analysis (LDA), where the goal is to maximize the Rayleigh quotient of between-class to within-class scatter matrices.

RAYLEIGH QUOTIENT

Frequently Asked Questions

The Rayleigh quotient is a fundamental scalar function in linear algebra and numerical analysis, providing a crucial link between vectors and the eigenvalues of Hermitian (or real symmetric) matrices. It is the cornerstone of iterative eigenvalue algorithms and plays a significant role in model compression techniques like low-rank factorization.

The Rayleigh quotient is a scalar value, denoted as R(A, x), that provides an estimate for an eigenvalue of a Hermitian (or real symmetric) matrix A given a non-zero vector x. It is calculated as the ratio R(A, x) = (x* A x) / (x* x), where x* denotes the conjugate transpose of x. For real vectors and matrices, this simplifies to the dot product form (xᵀ A x) / (xᵀ x). This quotient yields a real number because A is Hermitian, and its value lies between the smallest and largest eigenvalues of A. It is the foundation for the Rayleigh quotient iteration, an algorithm for finding eigenvectors and eigenvalues.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.