Linear Algebra

Generalized Eigenvalue Problem

Solve A v=lambda B v for symmetric 2x2 A and positive diagonal B.

By Riano · Published · Updated · Report a correction

A metric changes the eigenvector normalization

The symmetric generalized problem is Av = λBv, where B = diag(b1,b2) must be positive definite. Set C = B−1/2AB−1/2. Solve Cu = λu with Euclidean unit vectors, then v = B−1/2u satisfies vTBv = 1. The app sorts eigenvalues and makes the first nonzero vector component positive.

Two modes when B = I

Take A = [[2,1],[1,2]] and B = I. The characteristic equation is (2−λ)2−1 = 0, giving λ = 1 and 3.

  1. For λ = 1, (A−I)v = 0 requires v1+v2 = 0. The normalized, sign-selected vector is [1,−1]/√2.
  2. For λ = 3, (A−3I)v = 0 requires v1 = v2. The vector is [1,1]/√2.
  3. In either case vTBv = 1. Direct multiplication gives Av−λBv = [0,0].
  4. If B changes to 2I with the same A, the eigenvalues become 1/2 and 3/2, and the sign-selected vectors become [1,−1]/2 and [1,1]/2. They have Euclidean squared length 1/2 but B-norm squared 1.

Reproduce and compare both eigenpairs

Open Generalized Eigenvalue Problem. The plot uses one shared auto-fit scale for the green v and blue Av; pixel lengths across settings do not establish vector magnitudes.

  1. Use Reset, then set A11 to 2, A12 to 1 and A22 to 2.
  2. Set b1 and b2 to 1. Select Lower in Eigenpair: λ = 1 and v ≈ [0.707107,−0.707107]. Check norm 1 and near-zero residual.
  3. Select Upper: λ = 3 and v ≈ [0.707107,0.707107].
  4. Set b1 = b2 = 2. The eigenvalues become 0.5 and 1.5, while the selected upper vector is [0.5,0.5] and its B-norm remains 1.
  5. Set b1 to 0. The app reports that the metric is not positive definite and hides eigenpairs. Reset restores the original valid diagonal example.

The positive-metric domain

This is a bounded real symmetric 2×2 calculation with positive diagonal B, not an indefinite or nonsymmetric eigensolver. At a repeated eigenvalue, whitened coordinate axes are one valid B-orthonormal basis; a direction is not unique. Vector components are rounded to six decimals, while norms and residuals use unrounded vectors. With unequal metric weights Av need not be parallel to v: the defining equality is with λBv.

The symmetric generalized problem

SciPy, scipy.linalg.eigh states Av = λBv, positive-definite B and B-normalized eigenvectors. The small analytic whitening calculation and numerical examples here are independently worked for this module; no SciPy dependency is used.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Generalized Eigenvalue Problem module.

Try Generalized Eigenvalue Problem on Riano →

More in Linear Algebra