Linear Algebra
17.79 min read

Lagrange Applied to Quadratics — Eigenvalues Appear

Let us apply the Lagrange theorem to a beautiful constrained quadratic: minimize f(x)=12xtAxf(\mathbf{x}) = \frac{1}{2}\mathbf{x}^t A \mathbf{x} subject to g(x)=12xtx=1g(\mathbf{x}) = \frac{1}{2}\mathbf{x}^t \mathbf{x} = 1 (the unit sphere), where AA is a symmetric n×nn \times n matrix.

The Jacobians are Df(x)=xtADf(\mathbf{x}) = \mathbf{x}^t A (using symmetry of AA) and Dg(x)=xtDg(\mathbf{x}) = \mathbf{x}^t. The Lagrange condition λDg=Df\lambda Dg = Df becomes λxt=xtA\lambda \mathbf{x}^t = \mathbf{x}^t A.

Transposing: λx=Ax\lambda \mathbf{x}^{*} = A \mathbf{x}^{*}. But this is exactly the definition of an eigenvector equation! The constrained minimum x\mathbf{x}^{*} must be an eigenvector of AA, with Lagrange multiplier λ\lambda as its eigenvalue.

So to solve this constrained quadratic, look at the eigenvectors of AA. The minimum value of ff on the sphere is the smallest eigenvalue of AA divided by 2: f(x)=12λminf(\mathbf{x}^{*}) = \frac{1}{2}\lambda_{\min}.

Formal View

Theorem 17.4 — Quadratic Lagrange → Eigenvalue
Let AA be a symmetric n×nn \times n matrix. The constrained problem:
minx12xtAxs.t.12xtx=1\min_{\mathbf{x}} \frac{1}{2}\mathbf{x}^t A \mathbf{x} \quad \text{s.t.} \quad \frac{1}{2}\mathbf{x}^t \mathbf{x} = 1
has the Lagrange condition λx=Ax\lambda \mathbf{x}^{*} = A \mathbf{x}^{*} — so any constrained minimum x\mathbf{x}^{*} is an eigenvector of AA with eigenvalue λ\lambda.

Why This Matters

This shows that eigenvalue problems are naturally constrained optimization problems. PCA, spectral clustering, and many other algorithms are instances of this.

  • Principal Component Analysis: first PC maximizes variance on the unit sphere — eigenvector of the covariance matrix
  • Google PageRank: finding the dominant eigenvector of a stochastic matrix
  • Quantum mechanics: energy eigenstates are constrained minimizers of the Hamiltonian
  • Spectral graph algorithms: eigenvectors of graph Laplacians solve clustering problems

Quiz

Question 1

In the constrained quadratic problem min12xtAx\min \frac{1}{2}\mathbf{x}^t A \mathbf{x} s.t. x2=2\|\mathbf{x}\|^2 = 2, a constrained minimum x\mathbf{x}^{*} must be:

Question 2

What does the Lagrange multiplier λ\lambda represent in the quadratic constrained problem?

Question 3

The Jacobian of f(x)=12xtAxf(\mathbf{x}) = \frac{1}{2}\mathbf{x}^t A \mathbf{x} (with AA symmetric) is Df=xtADf = \mathbf{x}^t A.

Question 4

The minimum value of f(x)=12xtAxf(\mathbf{x}) = \frac{1}{2}\mathbf{x}^t A \mathbf{x} on the unit sphere is:

Question 5

In Principal Component Analysis (PCA), what plays the role of AA?

Common Mistakes

  • Forgetting to use the symmetry of AA when computing DfDf — symmetry is what makes Df(x)=xtADf(\mathbf{x}) = \mathbf{x}^t A work.
  • Confusing the Lagrange multiplier λ\lambda (an eigenvalue) with the minimum value of ff (12λ\frac{1}{2}\lambda).
  • Thinking this shows symmetric matrices always have real eigenvalues — we still need to argue existence (next section).