Symmetric Matrices and Positive Definiteness


Why do some optimizers care about curvature, not just slope?

Vishnu Boddeti

Example 1

Curvature changes what counts as a safe optimization step

Why do some optimizers care about curvature, not just slope?

same gradient: ∇f = 0 minimum curves upward maximum curves downward saddle up in one direction down in another
  • A zero gradient identifies a stationary point, but not whether it is a minimum, maximum, or saddle.
  • The missing information is how the objective curves in every direction.

The Hessian and positive definiteness

symmetric Hessian H = a b b d H = Hᵀ positive definite: all λ > 0 bowl indefinite: mixed signs saddle
  • The Hessian $H$ collects second partial derivatives and is symmetric: $H = H^\top$.
  • Near a critical point, $f(x) \approx f(0) + \tfrac12 x^\top Hx$.
  • A strict local minimum requires $x^\top Hx > 0$ for every $x \neq 0$—equivalently, every eigenvalue is positive.
  • Mixed eigenvalue signs produce a saddle.

Change $H$ and classify the critical point

A strict local minimum needs positive curvature in every direction, so both eigenvalues must be positive.

Example 2

Power iteration isolates the strongest curvature direction

What does power iteration have to do with the top Hessian eigenvector?

each step multiplies by H, then normalizes dominant eigendirection v₀ v₁ v₂ v₃ direction converges; normalization controls length
  • Repeated multiplication amplifies the component associated with the eigenvalue of largest magnitude.
  • Normalizing after every multiplication keeps only the evolving direction.

Power iteration targets the largest eigenvalue magnitude

current: shallow direction vk multiply by H after H: rotated + stretched Hvk normalize after normalize: same angle vk+1 = Hvk / ‖Hvk‖
  • The target is the eigenvector whose eigenvalue has the largest magnitude, not necessarily the largest value.
  • Convergence requires a unique largest magnitude and a nonzero starting component in that eigendirection.
  • A magnitude tie has no unique target; a missing component cannot be recovered.

Apply power iteration and track alignment with the target

Repeated multiplication amplifies the component along the unique dominant-magnitude eigendirection.

Example 3

Covariance and PSD curvature encode nonnegative energy

Why must covariance and local-minimum curvature be positive semidefinite?

1direction v → 2energy vᵀAv → 3variance orcurvature vᵀAv ≥ 0 for every direction v
  • For a covariance matrix, every projected variance must be nonnegative.
  • At a local minimum, positive-semidefinite curvature means no direction bends downward.

Increase movement along a direction and compare energy with the stability margin

Move the control to compare the two normalized responses.
Large curvature raises quadratic energy quickly and reduces the displacement that remains locally stable.

Example 4

Trust regions bound risky agent-policy changes

How can a positive-definite metric limit a risky agent-policy update?

1candidate updateΔθ → 2quadratic costΔθᵀFΔθ → 3accept only ifcost ≤ ε the budget forms an ellipsoid in update space
  • A trust region measures policy change using a local quadratic metric rather than raw parameter distance.
  • Positive definiteness gives every nonzero update a positive cost and turns the allowed set into an ellipsoid.

Tighten the trust region and compare protection with update freedom

Move the control to compare the two normalized responses.
The metric penalizes directions according to behavioral sensitivity, not merely the number of changed parameters.

Practice problems

Each scenario hides a mathematical structure from this lecture. Identify the structure, justify it, and work through the resulting problem.

Problem 1 Principal component analysis

Choose the most informative one-dimensional embedding

A device can transmit only one number from a two-feature embedding. You get to choose the viewing direction, and you want that single number to retain as much variation in the data as possible.

Model evidence

The centered embedding covariance is $S=\begin{bmatrix}4&2\\2&1\end{bmatrix}$. A unit direction $u$ retains variance $u^\top Su$.

  1. Which direction captures the most variance without requiring a search over all angles?
  2. How much variance is retained, and how much is discarded?
  3. Where does symmetry of the covariance matrix enter the argument?
Problem 2 Kernel methods

Is a proposed similarity table a valid kernel?

A custom similarity function gives two examples a self-similarity of one and a cross-similarity of $\rho$. Before feeding the table to a kernel method, you should check whether such a geometry can exist at all.

Model evidence

$K_\rho=\begin{bmatrix}1&\rho\\\rho&1\end{bmatrix}$.

  1. For which values of $\rho$ is the table a positive-semidefinite Gram matrix?
  2. Which coefficient direction collapses at each boundary value?
  3. Why does $|\rho|>1$ describe an impossible similarity geometry?
Problem 3 Model diagnostics

Find the most amplified failure mode

A red team may perturb the model in any unit-length direction. Its symmetric sensitivity matrix assigns a failure score to each choice. Which direction is the model most vulnerable to, and which is safest?

Model evidence

$H=\begin{bmatrix}2&1\\1&2\end{bmatrix}$ and the failure score is $r(v)=v^\top Hv$ for $\|v\|_2=1$.

  1. Which unit perturbation achieves the largest score, and what is that score?
  2. Which unit perturbation achieves the smallest score?
  3. How can you prove that no other unit direction beats the reported maximum?