Every quadratic form can be written using a matrix:
\[ Q(x) = x^T A x, \quad x = \begin{pmatrix}x_1\\\vdots\\x_n\end{pmatrix}, \]
where \(A\) is an \(n\times n\) matrix. Note: \(x^TAx = x^T\left(\frac{A+A^T}{2}\right)x\), so we may (and usually will) assume \(A\) is symmetric.
2. Symmetric Matrices & Associated Bilinear Form
If \(A\) is symmetric, define the bilinear form \(B(x,y)=x^T A y\). Then \(Q(x)=B(x,x)\). Key facts:
Eigenvalues of a real symmetric matrix are real.
There exists an orthogonal matrix \(P\) with \(P^T A P = D\) diagonal (spectral theorem).
Diagonal entries of \(D\) are eigenvalues of \(A\).
3. Diagonalization & Principal Axes Theorem
Principal Axes Theorem: For a real symmetric matrix \(A\), there is an orthogonal change of variables \(x = P y\) (so \(P^TP=I\)) such that:
\[ Q(x) = x^T A x = y^T D y = \lambda_1 y_1^2 + \dots + \lambda_n y_n^2, \]
where \(D = \operatorname{diag}(\lambda_1,\dots,\lambda_n)\) and the \(\lambda_i\) are eigenvalues of \(A\). So quadratic forms are reduced to sums of scaled squares in an orthonormal basis.
How to diagonalize in practice:
Find symmetric matrix \(A\) for the form.
Compute eigenvalues and orthonormal eigenvectors of \(A\).
Form orthogonal matrix \(P\) with eigenvectors as columns; then \(P^T A P = D\).
4. Sylvester's Law of Inertia
Sylvester's law states that under any real non-singular change of variables \(x = S y\) (with \(S\) invertible, not necessarily orthogonal), the numbers of positive, negative and zero coefficients in the diagonalized form (the inertia) are invariant. These counts are called the inertia or the signature of the quadratic form.
Eigenvalues are \(\lambda_1=5\) and \(\lambda_2=2\) (both > 0); hence \(A\) is positive definite.
c. Sylvester's Criterion (Leading Principal Minors)
A symmetric matrix is positive definite iff all its leading principal minors are positive. That is, the determinants of the top-left \(k\times k\) submatrices must all be > 0 for \(k=1,\dots,n\).
Second (full matrix determinant): \(\det(A)=4-1=3>0\).
So by Sylvester's criterion, \(A\) is positive definite.
d.Cholesky Decomposition Test
A symmetric matrix \(A\) is positive definite iff there exists a lower-triangular matrix \(L\) with positive diagonal entries such that
\[ A = L L^T. \]
A real symmetric matrix \(A\in\mathbb{R}^{n\times n}\) is positive semidefinite (PSD) if it satisfies any of the equivalent conditions below (adapted for semidefinite case):
a.Quadratic Form Test
\(A\) is PSD iff for every vector \(x\in\mathbb{R}^n\):
\[ x^T A x \ge 0. \]
Eigenvalues are \(1\) and \(0\) (nonnegative) → PSD.
c.Principal Minors (Necessary Condition)
For PSD matrices, all principal minors (determinants of principal submatrices) must be \(\ge0\). This is necessary but not sufficient in higher dimensions.
All principal minors are \(\ge0\) but one should prefer eigenvalue check for sufficiency.
d.Factorization / Decomposition
A symmetric PSD matrix admits a decomposition \(A = B B^T\) for some (possibly rank-deficient) matrix \(B\). Equivalently, an \(LDL^T\) decomposition exists with diagonal \(D\) having nonnegative entries.
So eigenvalues \(\lambda_1=0,\ \lambda_2=5\). Eigenvectors: for \(\lambda=5\), solve \((A-5I)v=0\) gives \(v=(1,1)^T\). For \(\lambda=0\), eigenvector \(v=(1,-2)^T\).
Orthonormalize to get \(P\). Transform \(x=Py\) to obtain \(Q=5y_2^2+0\cdot y_1^2\). Since there is both positive and zero eigenvalue, the form is positive semidefinite (not definite).
Matrix: \(A=\begin{pmatrix}1 & 1 & 0\\1 & 1 & 0\\0 & 0 & 1\end{pmatrix}\). The first 2×2 block has eigenvalues 0 and 2 with eigenvectors \((1,-1,0)^T\) and \((1,1,0)^T\). The \(x_3\) direction has eigenvalue 1. Thus diagonal form: \(2y_1^2 + 1\cdot y_2^2 + 0\cdot y_3^2\) up to ordering.
Example 4 — 2×2: diagonalization with arithmetic
Reduce \(Q(x,y)=x^2+6xy+10y^2\) and classify.
Solution (step-by-step)
Matrix form: \(A=\begin{pmatrix}1 & 3\\3 & 10\end{pmatrix}\) because the cross-term 6xy is split as 3 in each off-diagonal entry.
Both eigenvalues are positive (since \(11-\sqrt{117}>0\) because \(\sqrt{117}\approx10.82\)), hence \(A\) is positive definite.
Eigenvectors: compute for each eigenvalue by solving \((A-\lambda I)v=0\). Normalize to get orthonormal \(P\) and diagonal \(D\). The diagonal form will be \(\lambda_1 y_1^2 + \lambda_2 y_2^2\) with both \(\lambda_i>0\).
Example 5 — 3×3: full eigen-decomposition (explicit)
Take \(A=\begin{pmatrix}1 & 2 & 0\\2 & 1 & 0\\0 & 0 & 3\end{pmatrix}\). We'll find eigenvalues and orthonormal eigenvectors.
Solution
Block structure: top-left 2×2 block is \(B=\begin{pmatrix}1&2\\2&1\end{pmatrix}\). Characteristic polynomial of \(B\):
So eigenvalues for the block are \(3\) and \(-1\). Eigenvectors for the 2×2 block:
For \(\lambda=3\): solve \((B-3I)v=0\) gives \(\begin{pmatrix}-2&2\\2&-2\end{pmatrix}v=0\) so \(v=(1,1)^T\).
For \(\lambda=-1\): \(v=(1,-1)^T\).
Extend to 3×3 by adding the \(x_3\) axis (eigenvalue 3). Thus eigenvalues: \(3\) (twice) and \(-1\) (once). One must orthonormalize the eigenvectors: for example take
Note: \(u_1\) and \(u_3\) correspond to eigenvalue 3, so there is a two-dimensional eigenspace for \(\lambda=3\). Choose any orthonormal basis of that eigenspace. The diagonal form becomes \(3y_1^2+3y_2^2-1\cdot y_3^2\) (ordering may vary). Signature: (2,1,0) — two positives, one negative.
7. Practical tips & computational remarks
When \(A\) has symbolic entries, try completing the square or block elimination before computing messy eigenvalues.
For numerical matrices, rely on software (e.g., NumPy's eig or eigh for symmetric) to compute eigenpairs reliably.
Use Sylvester's criterion (leading principal minors) for testing positive-definiteness when eigen-decomposition is expensive.
8. Exercises (with answers hidden)
Classify the quadratic form \(Q(x,y)=x^2+6xy+10y^2\). (Hint: diagonalize or complete square.)
Show that \(Q(x)=2x_1^2+2x_1x_2+2x_2^2\) is positive semidefinite and find its rank.
Find the signature (\(n_+,n_-,n_0\)) of the quadratic form given by \(A=\begin{pmatrix}0 & 1 & 0\\1 & 0 & 0\\0 & 0 & -2\end{pmatrix}.\)
Use Sylvester's criterion to determine if \(A=\begin{pmatrix}2 & -1 & 0\\-1 & 2 & -1\\0 & -1 & 2\end{pmatrix}\) is positive definite.
Matrix \(=2\begin{pmatrix}1 & 1/2\\1/2 & 1\end{pmatrix}\) has eigenvalues 0 and 3 → positive semidefinite; rank = 1? (verify). [Careful: compute actual eigenvalues: characteristic gives \(\lambda(\lambda-3)=0\) so rank = 1? check calculation in full notes].
Matrix has eigenvalues \{1,-1,-2\} so signature is (1,2,0) — one positive, two negative, no zero. (Compute eigenvalues of the 2×2 block: \(\begin{pmatrix}0&1\\1&0\end{pmatrix}\) has eigenvalues \(1,-1\)).
Leading principal minors: 2 > 0, \(\det\begin{pmatrix}2&-1\\-1&2\end{pmatrix}=3>0\), full det = 4 >0 → positive definite by Sylvester.
Lecture 9 — Quadratic Forms: Full Notes
9. Interactive Quadratic Form Calculator
Enter a 2×2 or 3×3 symmetric matrix (rows separated by semicolons, entries separated by spaces):