Symmetric Matrices and Quadratic Forms

Use an orthonormal eigenbasis to classify quadratic energy and optimization models.

Builds on Complex Numbers and Oscillatory Modes

The bigger question: Which directions keep their identity as a system evolves?

On this page

A stronger diagonalization theorem

Every real symmetric matrix A=ATA=A^T has real eigenvalues and an orthonormal eigenvector basis. Thus A=QΛQTA=Q\Lambda Q^T with QTQ=IQ^TQ=I. This is the spectral theorem. Orthogonal coordinate changes preserve lengths and angles, unlike general basis changes.

A quadratic form is q(x)=xTAxq(x)=x^TAx. Its value depends only on the symmetric part (A+AT)/2(A+A^T)/2, so symmetric matrices capture all real quadratic forms. In eigen-coordinates y=QTxy=Q^Tx, it becomes q=∑iλiyi2q=\sum_i\lambda_i y_i^2.

Visual guide

VISUAL GUIDEOrthogonal principal directions of a quadratic form
The contour x² + 2xy + 3y² = 1 is an ellipse. A symmetric matrix has perpendicular eigenvectors, which align with the ellipse’s principal axes. Rotating into that basis removes the mixed term.-1.5-1.2-0.75-0.6000.750.61.51.2xy
  • Quadratic-form contour
The contour x² + 2xy + 3y² = 1 is an ellipse. A symmetric matrix has perpendicular eigenvectors, which align with the ellipse’s principal axes. Rotating into that basis removes the mixed term.

Worked example: classify an energy

For A=(2112)A=\begin{pmatrix}2&1\\1&2\end{pmatrix}, eigenvalues are 33 and 11. Its quadratic form 2x12+2x1x2+2x222x_1^2+2x_1x_2+2x_2^2 becomes 3y12+y223y_1^2+y_2^2 in diagonal coordinates. It is strictly positive for every nonzero vector, so AA is positive definite.

All positive eigenvalues mean positive definite; all nonnegative mean positive semidefinite. Mixed positive and negative eigenvalues mean indefinite. A zero eigenvalue creates a flat direction, so nonnegative alone is insufficient for strict positivity.

PAUSE & THINKA quick check, not a grade

Try it yourself.

Choose an answer and explain your reasoning to yourself. Use a hint if you get stuck.

A real symmetric matrix has all eigenvalues strictly positive. What can you say about xᵀAx for x≠0?

Hint 1 · Find a starting point

Use an orthonormal eigenbasis.

Hint 2 · Take the next step

The quadratic form becomes a sum of positive eigenvalues times squared coordinates.

Show the reasoning

Answer: It is strictly positive.

At least one coordinate is nonzero, so the weighted sum is positive: A is positive definite.

Before moving on: what would make one of the other answers wrong? Saying why is part of understanding.

Worked example: an optimization model

Consider E(x)=12xTAx−bTxE(x)=\tfrac12x^TAx-b^Tx with symmetric positive definite AA. Its gradient is Ax−bAx-b. The unique critical point solves Ax=bAx=b, and it is the global minimizer because

E(x∗+h)−E(x∗)=12hTAh>0(h≠0).E(x_*+h)-E(x_*)=\tfrac12h^TAh>0\quad(h\ne0).

For A=diag⁡(2,4)A=\operatorname{diag}(2,4) and b=(2,8)Tb=(2,8)^T, the minimizer is (1,2)T(1,2)^T. If AA were indefinite, a stationary point would not be a minimum.

This connects linear systems to spring energies, least squares and second-derivative tests. In least squares, ATAA^TA is always positive semidefinite and becomes positive definite exactly when AA has independent columns.

Practice

  1. Classify diag⁡(2,0)\operatorname{diag}(2,0).
  2. Classify diag⁡(1,−3)\operatorname{diag}(1,-3).
  3. Why is xTATAx≥0x^TA^TAx\ge0 for every real xx?
Show worked solutions
  1. Positive semidefinite, not definite, because the vertical direction has zero quadratic value.
  2. Indefinite: the coordinate directions give values of opposite signs.
  3. It equals (Ax)T(Ax)=∥Ax∥2(Ax)^T(Ax)=\|Ax\|^2.
MAKE IT YOURS

Pause before the next idea.

Can you explain how the visualization connects to this lesson’s goal? If a step still feels uncertain, put this lesson on your review list and try the check again another day.

Optional marks, not a grade. Saved in this browser only. Open notebook →