NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Eigenvalue and Generalized Eigenvalue Problems: Tutorial

Benyamin Ghojogh, Fakhri Karray, Mark Crowley

Abstract

Eigenvalue and generalized eigenvalue problems serve as the mathematical engines for many foundational machine learning algorithms. This tutorial bridges the gap between abstract linear algebra and practical optimization, demonstrating how common techniques—such as Principal Component Analysis (PCA) and Fisher Discriminant Analysis (FDA)—are formulated as eigenvalue problems. By connecting optimization objectives like variance maximization and reconstruction error minimization to their algebraic solutions, this paper provides a unified reference for researchers and practitioners.

Introduction

In the fields of science, engineering, and machine learning, eigenvalue problems are ubiquitous. They define the directions of maximum data variance in dimensionality reduction and determine class separability in discriminant analysis. Despite their importance, there is often a pedagogical gap: students frequently learn the mechanical definition of an eigenvalue ($Ax = \lambda x$) in isolation from the optimization contexts where these problems naturally arise.

This tutorial addresses that gap by explicitly connecting various optimization objectives—such as maximizing a Rayleigh quotient or minimizing a Frobenius norm—to their corresponding eigenvalue or generalized eigenvalue solutions.

Optimization Formulations

A central theme of this tutorial is that many seemingly distinct optimization forms reduce to standard eigenvalue problems through the use of Lagrangian multipliers. The paper systematizes five different optimization scenarios, including:

  1. Variance Maximization: Maximizing $x^T A x$ subject to the constraint $x^T x = 1$.
  2. Error Minimization: Minimizing the Frobenius norm of a matrix projection.

In these cases, the stationary points of the Lagrangian lead directly to the standard form $Ax = \lambda x$. Furthermore, the tutorial provides a rigorous proof for matrix-level optimization, explaining why the matrix of Lagrange multipliers results in a diagonal matrix $\Lambda$, which corresponds to the eigenvalues of the system.

Generalized Eigenvalue Problems

Beyond the standard form, many ML applications require solving generalized eigenvalue problems, expressed as: $$Ax = \lambda Bx$$ In this context, the constraint space is effectively "warped" by a second matrix $B$. This formulation is critical for algorithms like Fisher Discriminant Analysis (FDA), which seeks to maximize between-class scatter relative to within-class scatter.

Methods for Solving Generalized Problems

The tutorial outlines two primary approaches for solving the generalized matrix form $A\Phi = B\Phi\Lambda$:

  • The Inversion Approach ("Quick & Dirty"): This involves left-multiplying the equation by $B^{-1}$. However, if $B$ is singular (non-invertible), researchers often apply a numerical heuristic by adding a small value to the diagonal ($B + \epsilon I$) to force full rank. While computationally simple, this can introduce numerical instability.
  • Simultaneous Diagonalization (The Rigorous Solution): This more robust method involves two steps. First, the matrix $B$ is diagonalized. This transformation is then used to project $A$ into a new symmetric matrix $\breve{A}$. Finally, $\breve{A}$ is diagonalized to find the true generalized eigenvectors and eigenvalues, avoiding the pitfalls of the inversion method.

Key Insights in Machine Learning

The Rayleigh-Ritz Quotient

The tutorial highlights the Rayleigh-Ritz Quotient, $\frac{x^T A x}{x^T x}$, as a vital bridge in dimensionality reduction. Maximizing this quotient is mathematically equivalent to maximizing $x^T A x$ subject to $x^T x = 1$. This equivalence is the underlying mechanism for many spectral algorithms.

Unifying PCA and FDA

By framing these algorithms as eigenvalue problems, their relationship becomes clear:

  • PCA: Formulated as a standard eigenvalue problem on the data's covariance matrix to maximize variance or minimize reconstruction error.
  • FDA: Formulated as a generalized eigenvalue problem to optimize the ratio of scatter matrices.
  • Kernel Supervised PCA: Extends these concepts into high-dimensional kernel spaces to maximize dependence on labels, again resulting in a generalized eigenvalue problem.

The SVD Connection

Finally, the tutorial links Eigenvalue Decomposition (EVD) to Singular Value Decomposition (SVD). It proves that for any matrix $A$, the left and right singular vectors are simply the eigenvectors of $AA^T$ and $A^T A$, respectively. This connection ensures that the tools used for eigenvalue problems are directly applicable to the broader world of singular value problems.

Conclusion

By systematizing the relationship between optimization and linear algebra, this tutorial provides a clear roadmap for understanding the mathematical foundations of machine learning. Whether solving for the principal components of a dataset or the discriminant directions for classification, the underlying engine remains the same: the pursuit of eigenvalues.

Summary updated

BibTeX
@misc{ghojogh2019eigenvalue,
  author = {Benyamin Ghojogh and Fakhri Karray and Mark Crowley},
  title = {{Eigenvalue and Generalized Eigenvalue Problems: Tutorial}},
  year = {2019},
  eprint = {1903.11240},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.11240},
}
Figure