Chapter 10 · Inner Product Spaces and Quadratic Forms

10.3 Quadratic Forms: Reduction and Classification

A quadratic form is a symmetric matrix in disguise. Completing squares or rotating to principal axes turns it into a sum of signed squares, and Sylvester's law of inertia says the numbers of plus and minus signs never depend on how you do it — they classify forms, conics and quadrics completely.

Expressions such as $5x^2-4xy+8y^2$ or $x^2+4xy+2xz+3y^2-6yz-2z^2$ appear everywhere: as the second-order term of a Taylor expansion (deciding maxima, minima and saddles), as kinetic and potential energy in mechanics, as the variance $\operatorname{Var}(a^TX)=a^T\Sigma a$ of a linear combination of random variables, and as the equations of conics and quadric surfaces. The cross terms $xy$, $yz$, … hide what the expression really does. The goal of this section is to remove them by a change of variables, and then to read off everything from the signs that remain.

There are two ways to do it. Lagrange's reduction completes squares — fast, exact, rational arithmetic, but the new variables are not perpendicular. The principal axes theorem rotates the coordinates using the spectral theorem of §10.2 — geometric, but it needs the eigenvalues. The two routes give different coefficients, yet Sylvester's law of inertia guarantees that the numbers of positive, negative and zero coefficients are always the same. These three numbers (equivalently rank and signature) classify real quadratic forms completely. CSIR NET asks for exactly these things: the rank, index or signature of a given form, positive definiteness for a parameter, the number of congruence classes, and the type of a conic or quadric.

Conventions. Vectors in $\mathbb{R}^n$ are columns, $x=(x_1,\dots,x_n)^T$. A real symmetric matrix is positive definite etc. exactly as in Definition 10.10 of §10.2. Fields have characteristic $\ne2$ throughout (we divide by $2$); in practice $\mathbb{F}=\mathbb{R}$ or $\mathbb{C}$.

Bilinear Forms, Quadratic Forms and Their Matrices

📘 Definition 10.12 — Bilinear forms, quadratic forms and their matrices

Let $V$ be an $n$-dimensional vector space over $\mathbb{F}$. A bilinear form on $V$ is a map $B:V\times V\to\mathbb{F}$ that is linear in each variable separately; it is symmetric if $B(x,y)=B(y,x)$ and skew-symmetric if $B(x,y)=-B(y,x)$. The matrix of $B$ in a basis $v_1,\dots,v_n$ is $M=(B(v_i,v_j))$; then $B(x,y)=[x]^TM[y]$, and $B$ is symmetric iff $M$ is.

A quadratic form is a function $q(x)=B(x,x)$ with $B$ symmetric bilinear. On $\mathbb{F}^n$, $$q(x)=x^TAx=\sum_ia_{ii}x_i^2+2\sum_{i\lt j}a_{ij}x_ix_j,\qquad A=A^T,$$ so the coefficient of $x_i^2$ is $a_{ii}$ but the coefficient of $x_ix_j$ ($i\ne j$) is $2a_{ij}$: cross-term coefficients are halved when they are put in the matrix. $A$ is the matrix of $q$; $\operatorname{rank}A$ is the rank of $q$, and $q$ is nondegenerate if $A$ is invertible.

📐 Theorem 10.35 — Forms and symmetric matrices; change of variables
  1. (Polarisation) A quadratic form determines its symmetric bilinear form: $B(x,y)=\tfrac12\big(q(x+y)-q(x)-q(y)\big)$. So symmetric bilinear forms, quadratic forms and symmetric matrices correspond one-to-one (once a basis is fixed).
  2. For any square $M$, $x^TMx=x^T\tilde Mx$ with $\tilde M=\tfrac12(M+M^T)$; the skew-symmetric part $\tfrac12(M-M^T)$ contributes nothing. In particular, if $A$ is symmetric and $x^TAx=0$ for all $x$, then $A=0$.
  3. If the variables are changed by $x=Py$ with $P$ invertible, then $q(x)=y^T(P^TAP)y$: the new matrix is $P^TAP$. Equivalently, if $P$ is the transition matrix from a basis $\mathcal B$ to a basis $\mathcal B'$, the matrix of $B$ changes from $M$ to $P^TMP$.

Proof. (1) By bilinearity and symmetry, $q(x+y)=B(x,x)+2B(x,y)+B(y,y)$; solve for $B(x,y)$, dividing by $2$. (2) $x^TMx$ is a $1\times1$ matrix, so it equals its transpose $x^TM^Tx$; average the two. If $A$ is symmetric with $q\equiv0$, then $B\equiv0$ by (1), i.e. $a_{ij}=B(e_i,e_j)=0$. (3) $(Py)^TA(Py)=y^T(P^TAP)y$; and $(P^TAP)^T=P^TA^TP=P^TAP$ is again symmetric. For bases: if $[x]_{\mathcal B}=P[x]_{\mathcal B'}$ then $B(x,y)=[x]_{\mathcal B'}^TP^TMP[y]_{\mathcal B'}$. ∎

Compare with linear operators: a change of basis turns the matrix of an operator into $P^{-1}AP$ (similarity, §8.2), but the matrix of a bilinear form into $P^TAP$. The two coincide exactly when $P^T=P^{-1}$, i.e. for orthogonal changes of basis — which is why the spectral theorem serves both.

📘 Definition 10.13 — Congruence
Square matrices $A,B\in M_n(\mathbb{F})$ are congruent if $B=P^TAP$ for some invertible $P\in M_n(\mathbb{F})$. Congruence is an equivalence relation, and two symmetric matrices are congruent exactly when they represent the same quadratic form in two bases. (For Hermitian forms $x^*Ax$ on $\mathbb{C}^n$ one uses $*$-congruence $B=P^*AP$; everything below holds for them with $P^*$ in place of $P^T$.)
📐 Theorem 10.36 — Invariants of congruence that are easy to compute
If $B=P^TAP$ with $P$ invertible, then $\operatorname{rank}B=\operatorname{rank}A$ and $\det B=(\det P)^2\det A$. Hence over $\mathbb{R}$ the sign of the determinant is a congruence invariant (but the determinant itself, the trace and the eigenvalues are not).

Proof. Multiplying by invertible matrices does not change rank (§8.3), and $\det(P^TAP)=(\det P)^2\det A$ by the product rule, since $\det P^T=\det P$. Over $\mathbb{R}$, $(\det P)^2\gt0$. For the last remark: $P=2I$ gives $P^TAP=4A$, which changes the determinant, trace and eigenvalues. ∎

✏️ Example 1 — From a form to its matrix and back
(a) Find the symmetric matrix of $q(x,y,z)=x^2+4xy+2xz+3y^2-6yz-2z^2$, its rank and the sign of its determinant. (b) Find the symmetric matrix $A$ with $x^TMx=x^TAx$ for $M=\begin{pmatrix}1&4\\2&3\end{pmatrix}$, and the bilinear form that $q(x)=x^TMx$ determines.
(a) Matrix Squares go on the diagonal; each cross coefficient is halved and placed in two symmetric positions: $$A=\begin{pmatrix}1&2&1\\2&3&-3\\1&-3&-2\end{pmatrix}.$$ Check: $x^TAx=x^2+3y^2-2z^2+2(2xy+1\cdot xz-3yz)$ ✓.
(a) Invariants $\det A=1(-6-9)-2(-4+3)+1(-6-3)=-15+2-9=-22\ne0$: rank $3$, determinant negative. Every matrix congruent to $A$ has negative determinant (Theorem 10.36).
(b) $A=\tfrac12(M+M^T)=\begin{pmatrix}1&3\\3&3\end{pmatrix}$: indeed $x^TMx=x_1^2+(4+2)x_1x_2+3x_2^2=x_1^2+6x_1x_2+3x_2^2$. The symmetric bilinear form is $B(x,y)=x^TAy=x_1y_1+3(x_1y_2+x_2y_1)+3x_2y_2$. Note that $(x,y)\mapsto x^TMy$ is a different, non-symmetric bilinear form with the same quadratic form.

Diagonalisation: Lagrange's Reduction and the Principal Axes Theorem

📐 Theorem 10.37 — Every symmetric matrix is congruent to a diagonal matrix
Let $\operatorname{char}\mathbb{F}\ne2$. Every symmetric bilinear form on $V$ has a basis $e_1,\dots,e_n$ with $B(e_i,e_j)=0$ for $i\ne j$ (an orthogonal basis for $B$); equivalently every symmetric $A\in M_n(\mathbb{F})$ is congruent to a diagonal matrix. Consequently:
  1. over $\mathbb{R}$, $A$ is congruent to $\operatorname{diag}(I_{n_+},-I_{n_-},0_{n_0})$ for some $n_+,n_-,n_0\ge0$;
  2. over $\mathbb{C}$, $A$ is congruent to $\operatorname{diag}(I_r,0_{n-r})$ with $r=\operatorname{rank}A$.

Proof. Induction on $n$; $n=1$ is trivial, and if $B\equiv0$ any basis works. Otherwise there is $v$ with $q(v)=B(v,v)\ne0$: indeed some $B(x,y)\ne0$, and if $q(x)=q(y)=0$ then $q(x+y)=2B(x,y)\ne0$ (here $\operatorname{char}\ne2$ is used). Let $e_1=v$ and $W=\{x:B(x,v)=0\}$, the kernel of the nonzero linear functional $x\mapsto B(x,v)$; so $\dim W=n-1$, and $v\notin W$, hence $V=\operatorname{span}(v)\oplus W$. By induction, $B|_{W\times W}$ has a basis $e_2,\dots,e_n$ of $W$ with $B(e_i,e_j)=0$ ($i\ne j$); also $B(e_1,e_j)=0$ for $j\ge2$ by definition of $W$. In such a basis the matrix is $\operatorname{diag}(d_1,\dots,d_n)$. Over $\mathbb{R}$ replace $e_i$ by $e_i/\sqrt{|d_i|}$ when $d_i\ne0$ and reorder: the diagonal becomes $\pm1$'s and $0$'s. Over $\mathbb{C}$ every nonzero $d_i$ has a square root, so $e_i/\sqrt{d_i}$ makes the entry $1$; the number of $1$'s is the rank. ∎

🧭 Problem-solving strategy — Lagrange's reduction (completing squares)
  1. A square term is present, say $a_{11}\ne0$: collect every term containing $x_1$ and write them as $a_{11}\left(x_1+\tfrac{a_{12}}{a_{11}}x_2+\cdots+\tfrac{a_{1n}}{a_{11}}x_n\right)^2$ minus the correction terms. The rest involves only $x_2,\dots,x_n$; repeat.
  2. No square terms but some $x_ix_j$ with coefficient $c\ne0$: substitute $x_i=u+v$, $x_j=u-v$, so $cx_ix_j=c(u^2-v^2)$ and a square appears; continue with step 1.
  3. Record the new variables $y_1,y_2,\dots$ (they are linear forms in $x$, triangular in shape, hence independent) and the coefficients $d_1,d_2,\dots$ of $q=\sum d_ky_k^2$.
  4. Read off rank $=\#\{d_k\ne0\}$, $n_+=\#\{d_k\gt0\}$, $n_-=\#\{d_k\lt0\}$. Check: the product of the $d_k$ has the sign of $\det A$ (if the substitution matrix has determinant $\pm1$, it equals $\det A$).
✏️ Example 2 — Lagrange reduction, with and without square terms
Reduce to a sum of signed squares and find rank and inertia: (a) $q=x^2+4xy+2xz+3y^2-6yz-2z^2$ (Example 1); (b) $q=2xy+2yz+2zx$.
(a) $x$ first The terms with $x$ are $x^2+4xy+2xz=(x+2y+z)^2-4y^2-z^2-4yz$. So $$q=(x+2y+z)^2-y^2-10yz-3z^2 .$$
(a) then $y$ $-y^2-10yz=-(y+5z)^2+25z^2$, so $q=(x+2y+z)^2-(y+5z)^2+22z^2$. With $u=x+2y+z$, $v=y+5z$, $w=z$ (a unit upper triangular substitution, determinant $1$): $q=u^2-v^2+22w^2$.
(a) Read off Rank $3$, two positive and one negative coefficient. Check: $1\cdot(-1)\cdot22=-22=\det A$ ✓.
(b) No squares Put $x=u+v$, $y=u-v$, $z=w$: $2xy=2u^2-2v^2$ and $2yz+2zx=2w(x+y)=4uw$. So $q=2u^2+4uw-2v^2=2(u+w)^2-2w^2-2v^2$: one positive and two negative squares, rank $3$. (Check with eigenvalues: the matrix $J-I$ has eigenvalues $2,-1,-1$ — again one positive, two negative.)
📐 Theorem 10.38 — The principal axes theorem (orthogonal reduction)
Let $A\in M_n(\mathbb{R})$ be symmetric with eigenvalues $\lambda_1,\dots,\lambda_n$ and an orthonormal eigenbasis $q_1,\dots,q_n$ (Theorem 10.24 of §10.2), and let $Q=[q_1\cdots q_n]$. The orthogonal change of variables $x=Qy$ gives $$x^TAx=\lambda_1y_1^2+\lambda_2y_2^2+\cdots+\lambda_ny_n^2 .$$ The lines $\mathbb{R}q_i$ are the principal axes of $q$. Moreover $\lambda_{\min}\|x\|^2\le x^TAx\le\lambda_{\max}\|x\|^2$ for all $x$.

Proof. $Q^TAQ=\operatorname{diag}(\lambda_i)$ by the real spectral theorem, so $x^TAx=y^T(Q^TAQ)y=\sum\lambda_iy_i^2$; and $\|y\|=\|x\|$ since $Q$ is orthogonal, which gives the bounds (Theorem 10.32 of §10.2). ∎

✏️ Example 3 — Principal axes of an ellipse
Show that $5x^2-4xy+8y^2=36$ is an ellipse; find its principal axes, its semi-axes and its area.
Matrix $A=\begin{pmatrix}5&-2\\-2&8\end{pmatrix}$, $\operatorname{tr}A=13$, $\det A=36$: eigenvalues $4$ and $9$, both positive.
Axes $\lambda=4$: $(A-4I)v=0$ gives $x-2y=0$, $q_1=\tfrac1{\sqrt5}(2,1)$. $\lambda=9$: $-4x-2y=0$, $q_2=\tfrac1{\sqrt5}(1,-2)$. They are perpendicular, as they must be.
Normal form With $x=Qy$: $4Y_1^2+9Y_2^2=36$, i.e. $\dfrac{Y_1^2}{9}+\dfrac{Y_2^2}{4}=1$: an ellipse with semi-axes $3$ (along $(2,1)$) and $2$ (along $(1,-2)$); area $\pi\cdot3\cdot2=6\pi$.
Check The point $3q_1=\left(\tfrac6{\sqrt5},\tfrac3{\sqrt5}\right)$ gives $5\cdot\tfrac{36}5-4\cdot\tfrac{18}{5}+8\cdot\tfrac95=36-14.4+14.4=36$ ✓. In general the semi-axes of $x^TAx=1$ are $1/\sqrt{\lambda_i}$: the larger eigenvalue gives the shorter axis.
Interactive 1 — The Level Curves of $ax^2+2hxy+by^2$

Choose the matrix $A=\begin{pmatrix}a&h\\h&b\end{pmatrix}$. The solid curve is $q=1$, the blue dashed curve is $q=-1$, and the amber lines are $q=0$ (when it is more than a point). The green lines are the principal axes (eigenvectors of $A$). Press Play to sweep $h$ with $a=1$, $b=2$: the ellipse stretches along an axis, breaks into two parallel lines exactly when $\det A=ab-h^2=0$, and becomes a hyperbola when $\det A\lt0$ — the type depends only on the signs of the eigenvalues.

a, h, b—
eigenvalues—
D₁ = a, D₂ = ab − h²—
inertia (n₊, n₋, n₀)—

Sylvester's Law of Inertia: Rank, Index and Signature

📐 Theorem 10.39 — Sylvester's law of inertia
Let $q$ be a real quadratic form on an $n$-dimensional real space $V$. In every basis in which $q$ is diagonal, $q=\sum d_ky_k^2$, the number $n_+$ of positive $d_k$, the number $n_-$ of negative $d_k$ and the number $n_0$ of zero $d_k$ are the same. In matrix language: if a real symmetric $A$ is congruent to $\operatorname{diag}(I_{p},-I_{m},0)$ and to $\operatorname{diag}(I_{p'},-I_{m'},0)$, then $p=p'$ and $m=m'$.

Proof. Rank is a congruence invariant (Theorem 10.36), so $n_+ + n_-=\operatorname{rank}A$ is the same in both diagonal forms, and so is $n_0=n-\operatorname{rank}A$. It remains to show $p=p'$. Suppose a basis $b_1,\dots,b_n$ gives $q=y_1^2+\cdots+y_p^2-y_{p+1}^2-\cdots-y_{p+m}^2$ and a basis $b_1',\dots,b_n'$ gives $q=z_1^2+\cdots+z_{p'}^2-z_{p'+1}^2-\cdots-z_{p'+m'}^2$, and suppose $p\gt p'$. Let $$W=\operatorname{span}(b_1,\dots,b_p),\qquad W'=\operatorname{span}(b'_{p'+1},\dots,b'_n).$$ On $W\setminus\{0\}$, $q=y_1^2+\cdots+y_p^2\gt0$; on $W'$, $q=-z_{p'+1}^2-\cdots-z_{p'+m'}^2\le0$. But $\dim W+\dim W'=p+(n-p')\gt n$, so $W\cap W'$ contains some $x\ne0$, for which $q(x)\gt0$ and $q(x)\le0$ — a contradiction. Hence $p\le p'$, and by symmetry $p=p'$; then $m=m'$ from the ranks. ∎

📘 Definition 10.14 — Inertia, index and signature
For a real quadratic form $q$ (or real symmetric matrix $A$), the triple $(n_+,n_-,n_0)$ of Theorem 10.39 is its inertia. We call $n_+$ the index (the number of positive squares), $r=n_++n_-$ the rank, and $s=n_+-n_-$ the signature. Rank and signature determine the inertia: $n_+=\tfrac{r+s}2$, $n_-=\tfrac{r-s}2$. Warning: conventions vary — some texts call the pair $(n_+,n_-)$ the signature, and a few use "index" for $n_-$ (as in Morse theory). In an exam, read which one is meant; the inertia triple removes all ambiguity.
📐 Theorem 10.40 — Classification up to congruence; counting the classes
  1. Two real symmetric $n\times n$ matrices are congruent over $\mathbb{R}$ if and only if they have the same inertia, i.e. the same rank and signature. Each class contains exactly one matrix $\operatorname{diag}(I_{n_+},-I_{n_-},0_{n_0})$.
  2. The number of congruence classes of real symmetric $n\times n$ matrices is the number of triples $n_++n_-+n_0=n$, namely $\dfrac{(n+1)(n+2)}{2}$; of rank $r$ there are $r+1$ classes, so $n+1$ classes of invertible ones.
  3. Over $\mathbb{C}$, two complex symmetric matrices are congruent ($B=P^TAP$) iff they have the same rank: $n+1$ classes. Hermitian matrices under $*$-congruence ($P^*AP$) are classified by inertia, exactly as in the real case.

Proof. (1) By Theorem 10.37(1) each real symmetric $A$ is congruent to some $\operatorname{diag}(I_{n_+},-I_{n_-},0)$, and by Theorem 10.39 the pair $(n_+,n_-)$ does not depend on the reduction. Congruence is an equivalence relation, so matrices with the same normal form are congruent, and matrices with different normal forms are not (their normal forms would be congruent to each other, contradicting Theorem 10.39). (2) Choosing $(n_+,n_-,n_0)$ with sum $n$ is choosing $2$ "bars" among $n+2$ positions: $\binom{n+2}{2}$ ways. With $n_++n_-=r$ fixed, $n_+$ ranges over $0,\dots,r$. (3) Theorem 10.37(2) gives the normal form $\operatorname{diag}(I_r,0)$, and rank is invariant. For Hermitian forms, the proofs of Theorems 10.37 and 10.39 go through verbatim with $x^*Ax$, which is real. ∎

📐 Theorem 10.41 — Inertia from eigenvalues, and the index as a dimension
For a real symmetric $A$: $n_+$ and $n_-$ are the numbers of positive and negative eigenvalues of $A$ (with multiplicity), and $n_0=\dim\ker A$. Moreover $$n_+=\max\{\dim W:\ q(x)\gt0\text{ for all }x\in W\setminus\{0\}\},$$ and similarly for $n_-$ with $q\lt0$. Consequently two real symmetric matrices with the same numbers of positive and of negative eigenvalues are congruent, while congruent matrices may have entirely different eigenvalues.

Proof. The principal axes reduction (Theorem 10.38) is a congruence with $P=Q$, producing the diagonal $\operatorname{diag}(\lambda_1,\dots,\lambda_n)$; by Sylvester's law its sign counts are the inertia. For the maximum: the span of the eigenvectors with positive eigenvalues has dimension $n_+$ and $q\gt0$ on it. If $\dim W\gt n_+$, then $W$ meets the span of the remaining $n-n_+$ eigenvectors (where $q\le0$) in a nonzero vector, exactly as in the proof of Theorem 10.39, so $q$ is not positive on $W$. ∎

✏️ Example 4 — Same inertia, different numbers; counting classes
(a) For the form of Example 1, compare the Lagrange coefficients with the eigenvalues of $A$. (b) List the congruence classes of real symmetric $2\times2$ matrices, give a representative of each, and count the classes for $3\times3$ and for $4\times4$ matrices of rank $2$.
(a) Lagrange gave $q=u^2-v^2+22w^2$: coefficients $(1,-1,22)$. The eigenvalues of $A=\begin{pmatrix}1&2&1\\2&3&-3\\1&-3&-2\end{pmatrix}$ are approximately $4.943$, $1.101$, $-4.044$ (sum $2=\operatorname{tr}A$, product $-22=\det A$). Completely different numbers — but in both lists two are positive and one is negative: inertia $(2,1,0)$, rank $3$, signature $1$.
(b) $2\times2$ Six classes, one for each $(n_+,n_-,n_0)$: $(2,0,0)$: $I$; $(0,2,0)$: $-I$; $(1,1,0)$: $\operatorname{diag}(1,-1)$ (also contains $\begin{pmatrix}0&1\\1&0\end{pmatrix}$); $(1,0,1)$: $\operatorname{diag}(1,0)$; $(0,1,1)$: $\operatorname{diag}(-1,0)$; $(0,0,2)$: $0$. Formula: $\tfrac{3\cdot4}{2}=6$ ✓.
(b) Counts $3\times3$: $\tfrac{4\cdot5}{2}=10$ classes. $4\times4$ of rank $2$: $n_+\in\{0,1,2\}$, so $3$ classes.
Moral Congruence keeps only the signs; similarity keeps the eigenvalues themselves. For real symmetric matrices, orthogonal similarity is both at once.
Interactive 2 — Three Routes to a Diagonal Form, One Inertia

Each step of Lagrange's reduction is a congruence $M\mapsto E^TME$: one row operation and the same column operation. The amber row and column belong to the pivot being cleared; green diagonal cells are finished coefficients $d_k$. When no diagonal entry is available, the method first adds one row and column to another (the substitution $x_i=u+v$). The three routes eliminate the variables in different orders and produce different coefficients — compare the sign patterns in the table with each other and with the eigenvalues.

route · step—
coefficients so far—
eigenvalues—
inertia—
✏️ Example 5 — Congruence versus similarity: prove or disprove
Let $A,B$ be real symmetric $n\times n$ matrices. Prove or disprove: (a) if $A$ and $B$ are congruent, they are similar; (b) if $A$ and $B$ are similar, they are congruent; (c) $A$ is congruent to $-A$; (d) if $n=2$ and $\det A,\det B\gt0$, then $A$ and $B$ are congruent; (e) any two positive definite $n\times n$ matrices are congruent.
(a) False $\operatorname{diag}(1,4)=P^TIP$ with $P=\operatorname{diag}(1,2)$, but $I$ is similar only to itself.
(b) True Similar matrices have the same eigenvalues, so $A=Q_1DQ_1^T$ and $B=Q_2DQ_2^T$ with the same $D$; then $B=(Q_1^TQ_2)^TA(Q_1^TQ_2)$ — even an orthogonal congruence.
(c) False in general $-A$ has inertia $(n_-,n_+,n_0)$, so $A\cong-A$ iff $n_+=n_-$. Thus $I_2\not\cong-I_2$, while $\operatorname{diag}(1,-1)\cong\operatorname{diag}(-1,1)$. For odd $n$ and invertible $A$ it is never true.
(d) False $I$ and $-I$ both have determinant $1$ but inertias $(2,0,0)$ and $(0,2,0)$. For $2\times2$ matrices, $\det\gt0$ means "definite", but not which sign.
(e) True Both have inertia $(n,0,0)$, so both are congruent to $I$ (Theorem 10.40). Concretely, $A=LL^T$ (Cholesky) gives $L^{-1}AL^{-T}=I$.

Definiteness, and the Classification of Conics and Quadrics

📘 Definition 10.15 — Definiteness of a real quadratic form
A real quadratic form $q(x)=x^TAx$ ($A=A^T$) is positive definite if $q(x)\gt0$ for all $x\ne0$, positive semidefinite if $q(x)\ge0$ for all $x$, negative (semi)definite if $-q$ is positive (semi)definite, and indefinite if it takes both signs. In terms of inertia: positive definite $\iff(n,0,0)$; positive semidefinite $\iff n_-=0$; indefinite $\iff n_+\ge1$ and $n_-\ge1$. The leading principal minors of $A$ are $D_k=\det(a_{ij})_{i,j\le k}$, $k=1,\dots,n$ (put $D_0=1$); a principal minor is the determinant of any submatrix $(a_{ij})_{i,j\in I}$.
📐 Theorem 10.42 — Sylvester's criterion
Let $A$ be a real symmetric (or complex Hermitian) $n\times n$ matrix.
  1. $A$ is positive definite if and only if $D_1\gt0,\ D_2\gt0,\ \dots,\ D_n\gt0$.
  2. $A$ is negative definite if and only if $(-1)^kD_k\gt0$ for every $k$ (the signs alternate, starting with $D_1\lt0$).
  3. $A$ is positive semidefinite if and only if every principal minor is $\ge0$. Non-negative leading minors are not enough.

Proof. (1) ⇒: each leading block $A_k$ is positive definite (Theorem 10.28 of §10.2), so $D_k=\det A_k$, the product of its positive eigenvalues, is positive. ⇐: induction on $n$; $n=1$ is clear. Write $A=\begin{pmatrix}A_{n-1}&b\\b^T&c\end{pmatrix}$. By induction $A_{n-1}$ is positive definite, in particular invertible. With $P=\begin{pmatrix}I&-A_{n-1}^{-1}b\\0&1\end{pmatrix}$ (determinant $1$), $$P^TAP=\begin{pmatrix}A_{n-1}&0\\0&c-b^TA_{n-1}^{-1}b\end{pmatrix},$$ so $D_n=\det A=D_{n-1}\,(c-b^TA_{n-1}^{-1}b)$ and the Schur complement $s=c-b^TA_{n-1}^{-1}b=D_n/D_{n-1}$ is positive. For $y=(y',y_n)$, $y^TP^TAPy=y'^TA_{n-1}y'+sy_n^2\gt0$ unless $y=0$; since $P$ is invertible, $A$ is positive definite. (2) Apply (1) to $-A$, whose $k$-th leading minor is $(-1)^kD_k$. (3) ⇒: every principal submatrix of a positive semidefinite matrix is positive semidefinite, and its determinant is a product of non-negative eigenvalues. ⇐: for $\varepsilon\gt0$, each leading minor of $A+\varepsilon I$ is $\det(A_k+\varepsilon I)=\varepsilon^k+\varepsilon^{k-1}E_1+\cdots+E_k$, where $E_j\ge0$ is the sum of the $j\times j$ principal minors of $A_k$; so it is positive and $A+\varepsilon I\succ0$ by (1). Letting $\varepsilon\to0$ in $x^T(A+\varepsilon I)x\gt0$ gives $x^TAx\ge0$. The example $\operatorname{diag}(0,-1)$ has $D_1=D_2=0$ but is not positive semidefinite; its principal minor $-1$ detects it. ∎

📐 Theorem 10.43 — Jacobi's theorem: inertia from leading minors
If $D_1,\dots,D_n$ are all nonzero, then $A=LDL^T$ with $L$ unit lower triangular and $D=\operatorname{diag}\!\left(\dfrac{D_1}{D_0},\dfrac{D_2}{D_1},\dots,\dfrac{D_n}{D_{n-1}}\right)$. Hence $$x^TAx=\sum_{k=1}^n\frac{D_k}{D_{k-1}}\,y_k^2$$ for suitable new variables $y=L^Tx$, and $n_-$ equals the number of sign changes in the sequence $1,D_1,D_2,\dots,D_n$.

Proof. Perform Lagrange's reduction in the natural order $x_1,x_2,\dots$: each step is a congruence by a unit upper triangular matrix $P$ (adding multiples of earlier variables to later ones), and for such $P$ the leading $k\times k$ block of $P^TAP$ is $P_k^TA_kP_k$, whose determinant is again $D_k$. After $k-1$ steps the leading $k\times k$ block is $\operatorname{diag}(d_1,\dots,d_{k-1},m)$, so $d_1\cdots d_{k-1}m=D_k$. Inductively $d_1\cdots d_{k-1}=D_{k-1}\ne0$, so the next pivot is $m=D_k/D_{k-1}\ne0$ and the process never stalls. The ratio $D_k/D_{k-1}$ is negative exactly when $D_{k-1}$ and $D_k$ have opposite signs. ∎

✏️ Example 6 — Classifying a conic with linear terms
Identify the curve $3x^2+10xy+3y^2-16x-16y+24=0$: find its centre, principal axes and normal form. What happens if the constant $24$ is replaced by $16$?
Invariants In the notation of Theorem 10.44: $a=3$, $h=5$, $b=3$, $g=-8$, $f=-8$, $c=24$. $\delta=ab-h^2=9-25=-16\lt0$, and $\Delta=\det\begin{pmatrix}3&5&-8\\5&3&-8\\-8&-8&24\end{pmatrix}=-128\ne0$: a hyperbola.
Centre Set the gradient to zero: $6x+10y-16=0$, $10x+6y-16=0$, so $x=y=1$. The value there is $3+10+3-16-16+24=8$, which equals $\Delta/\delta=-128/-16$ ✓. In coordinates $X=x-1$, $Y=y-1$: $3X^2+10XY+3Y^2+8=0$.
Axes $\begin{pmatrix}3&5\\5&3\end{pmatrix}$ has eigenvalues $8$ on $(1,1)$ and $-2$ on $(1,-1)$. With $X=\tfrac{u+v}{\sqrt2}$, $Y=\tfrac{u-v}{\sqrt2}$: $8u^2-2v^2+8=0$, i.e. $\dfrac{v^2}{4}-u^2=1$. A hyperbola centred at $(1,1)$ whose vertices lie on the line through the centre in direction $(1,-1)$, at distance $2$; asymptotes $v=\pm2u$.
Constant $16$ Now the value at the centre is $0$, so $\Delta=0$ and the conic is degenerate: $8u^2-2v^2=0$, a pair of lines through $(1,1)$. Indeed $3x^2+10xy+3y^2-16x-16y+16=(x+3y-4)(3x+y-4)$.
📐 Theorem 10.44 — Classification of plane conics
Consider $ax^2+2hxy+by^2+2gx+2fy+c=0$ with $(a,h,b)\ne(0,0,0)$, and put $$\delta=\det\begin{pmatrix}a&h\\h&b\end{pmatrix},\qquad\Delta=\det\begin{pmatrix}a&h&g\\h&b&f\\g&f&c\end{pmatrix}.$$
  1. $\Delta\ne0$ (nondegenerate): $\delta\gt0$ — an ellipse if $(a+b)\Delta\lt0$, no real points if $(a+b)\Delta\gt0$; $\delta=0$ — a parabola; $\delta\lt0$ — a hyperbola (rectangular iff $a+b=0$).
  2. $\Delta=0$ (degenerate): $\delta\lt0$ — two intersecting lines; $\delta\gt0$ — a single point; $\delta=0$ — two parallel lines, one double line, or no real points.
If $\delta\ne0$ the centre $x_0$ solves $\begin{pmatrix}a&h\\h&b\end{pmatrix}x_0=-\begin{pmatrix}g\\f\end{pmatrix}$, and the normal form is $\lambda_1u^2+\lambda_2v^2+\Delta/\delta=0$, where $\lambda_1,\lambda_2$ are the eigenvalues of the quadratic part.

Proof. Write $\hat x=(x,y,1)^T$ and $\hat A$ for the $3\times3$ matrix, so the conic is $\hat x^T\hat A\hat x=0$. A rotation $x=Qx'$ ($\det Q=1$) followed by a translation is $\hat x=T\hat x'$ with $T=\begin{pmatrix}Q&x_0\\0&1\end{pmatrix}$, $\det T=1$; it replaces $\hat A$ by $T^T\hat AT$, so $\Delta$ is unchanged, and $\delta$, $a+b$ (the determinant and trace of the quadratic part $A_2$, which becomes $Q^TA_2Q$) are unchanged as well. Rotate to principal axes: $\lambda_1x'^2+\lambda_2y'^2+2g'x'+2f'y'+c=0$ with $\delta=\lambda_1\lambda_2$. If $\delta\ne0$, complete both squares (i.e. move to the centre): $\lambda_1u^2+\lambda_2v^2+c'=0$, and $\Delta=\det\operatorname{diag}(\lambda_1,\lambda_2,c')=\delta c'$, so $c'=\Delta/\delta$. For $\delta\gt0$, $\lambda_1,\lambda_2$ have the sign of $a+b=\lambda_1+\lambda_2$, and there are real points iff $c'$ has the opposite sign, i.e. iff $(a+b)\Delta/\delta\lt0$; $c'=0$ leaves only the centre. For $\delta\lt0$ we get a hyperbola, or the two lines $\lambda_1u^2=-\lambda_2v^2$ when $c'=0$; it is rectangular iff $\lambda_1=-\lambda_2$. If $\delta=0$, say $\lambda_2=0\ne\lambda_1$; completing the square in $x'$ gives $\lambda_1u^2+2f'y'+c''=0$, and $\Delta=\det\begin{pmatrix}\lambda_1&0&0\\0&0&f'\\0&f'&c''\end{pmatrix}=-\lambda_1f'^2$. So $\Delta\ne0$ iff $f'\ne0$ — a parabola $u^2=-\tfrac{2f'}{\lambda_1}(y'+\cdots)$ — while $\Delta=0$ leaves $\lambda_1u^2+c''=0$: two parallel lines, a double line or nothing. ∎

📐 Theorem 10.45 — Central quadrics in $\mathbb{R}^3$
Let $A$ be a nonzero real symmetric $3\times3$ matrix with inertia $(n_+,n_-,n_0)$. The surface $x^TAx=1$ is
inertia$x^TAx=1$$x^TAx=0$
$(3,0,0)$ellipsoida point
$(2,1,0)$hyperboloid of one sheetelliptic cone
$(1,2,0)$hyperboloid of two sheetselliptic cone
$(2,0,1)$elliptic cylindera line
$(1,1,1)$hyperbolic cylindertwo planes
$(1,0,2)$two parallel planesa double plane
$n_+=0$empty—

Proof. Principal axes (Theorem 10.38) turn the equation into $\lambda_1X^2+\lambda_2Y^2+\lambda_3Z^2=1$ by a rotation, which does not change the shape; read off each case from the signs. For example, $(2,1,0)$ gives $\tfrac{X^2}{\alpha^2}+\tfrac{Y^2}{\beta^2}-\tfrac{Z^2}{\gamma^2}=1$, whose horizontal sections are ellipses for every $Z$ (one connected sheet), whereas $(1,2,0)$ gives $\tfrac{X^2}{\alpha^2}=1+\tfrac{Y^2}{\beta^2}+\tfrac{Z^2}{\gamma^2}$, which forces $|X|\ge\alpha$ (two sheets). ∎

✏️ Example 7 — A one-parameter family of forms
Let $q_k(x,y,z)=x^2+y^2+z^2+2k(xy+yz+zx)$. Find all $k$ for which $q_k$ is positive definite, and the inertia of $q_k$ for every real $k$. Identify the surface $q_k=1$ for $k=2$.
Leading minors $A_k=(1-k)I+kJ$. $D_1=1$, $D_2=1-k^2$, $D_3=\det A_k=(1-k)^2(1+2k)$. By Sylvester's criterion $q_k\succ0$ iff $1-k^2\gt0$ and $(1-k)^2(1+2k)\gt0$, i.e. iff $-\tfrac12\lt k\lt1$.
Eigenvalues $J$ has eigenvalues $3,0,0$, so $A_k$ has $1+2k$ (once) and $1-k$ (twice). This confirms the range and gives every case.
Inertia
$k$$1+2k$$1-k$ (twice)inertia
$k\lt-\tfrac12$$-$$+$$(2,1,0)$
$k=-\tfrac12$$0$$+$$(2,0,1)$
$-\tfrac12\lt k\lt1$$+$$+$$(3,0,0)$
$k=1$$+$$0$$(1,0,2)$
$k\gt1$$+$$-$$(1,2,0)$
$k=2$ Inertia $(1,2,0)$: by Theorem 10.45, $q_2=1$ is a hyperboloid of two sheets, $5X^2-Y^2-Z^2=1$ in principal coordinates with $X$ along $(1,1,1)$. (At $k=1$, $q_1=(x+y+z)^2$, and $q_1=1$ is the pair of planes $x+y+z=\pm1$.)
⚠️ Counterexamples and pitfalls
  1. Halve the cross terms: the matrix of $x^2+6xy+y^2$ is $\begin{pmatrix}1&3\\3&1\end{pmatrix}$, not $\begin{pmatrix}1&6\\6&1\end{pmatrix}$ (that would be $x^2+12xy+y^2$).
  2. Congruence is not similarity: $I\cong\operatorname{diag}(1,4)$ but they are not similar; congruence preserves only rank and the signs of eigenvalues.
  3. The Lagrange coefficients are not the eigenvalues: $x^2+4xy+y^2=(x+2y)^2-3y^2$ gives $(1,-3)$, the eigenvalues are $3,-1$. Only the sign pattern agrees.
  4. A sum of $k$ squares need not have rank $k$: $(x+y)^2+(y+z)^2-(x-z)^2=2(x+y)(y+z)$ has rank $2$, because the three linear forms are dependent. Lagrange's reduction produces independent forms; arbitrary square decompositions do not.
  5. Leading minors and semidefiniteness: $\operatorname{diag}(0,-1)$ has $D_1=D_2=0\ge0$ but is negative semidefinite. For semidefiniteness check all principal minors.
  6. Negative definite is not "all minors negative": $-I_2$ has $D_2=1\gt0$; the correct pattern alternates, $D_1\lt0$, $D_2\gt0$, $D_3\lt0,\dots$
  7. $\det A\gt0$ does not mean positive definite: $-I_2$, and $\operatorname{diag}(-1,-1,1)$ in size $3$.
  8. Positive diagonal entries do not mean positive definite: $\begin{pmatrix}1&2\\2&1\end{pmatrix}$ is indefinite. Conversely, positive definite forces positive diagonal entries.
  9. Index and signature conventions differ: for $x^2+y^2-z^2$ the signature is $1$ as $n_+-n_-$, but "$(2,1)$" in the pair convention. Always state the convention you use.
  10. Over $\mathbb{C}$ signs disappear: $\operatorname{diag}(1,-1)=P^T I P$ with $P=\operatorname{diag}(1,i)$, so complex symmetric matrices are classified by rank alone (but Hermitian ones under $P^*AP$ keep their inertia).
  11. $\delta=0$ is not always a parabola: $x^2+2xy+y^2-1=0$ is the pair of parallel lines $x+y=\pm1$ ($\Delta=0$); and $\delta\gt0$ may give no real points: $x^2+y^2+1=0$.
  12. A symmetric matrix and its "Lagrange matrix" need different variables: the substitution $y=Lx$ in Lagrange's reduction is not orthogonal, so lengths and angles (and hence the shape's axes) are not preserved — use principal axes for geometry.

Exercises

I
Forms and matrices.
  • 1 Write the symmetric matrix of $q=2x^2-y^2+4z^2-6xy+2yz$.
  • 2 Write the quadratic form with matrix $\begin{pmatrix}1&-2&0\\-2&0&3\\0&3&5\end{pmatrix}$.
  • 3 Find the symmetric matrix $A$ with $x^TMx=x^TAx$ for $M=\begin{pmatrix}2&5\\-1&4\end{pmatrix}$.
  • 4 Find the symmetric bilinear form $B$ with $B(x,x)=x_1^2-3x_1x_2+2x_2^2$.
  • 5 Prove that $\operatorname{diag}(1,1)$ and $\operatorname{diag}(1,-1)$ are not congruent over $\mathbb{R}$, but are congruent over $\mathbb{C}$.
  • 6 Prove that every bilinear form is uniquely the sum of a symmetric and a skew-symmetric one, and that $B$ is skew-symmetric iff $B(x,x)=0$ for all $x$.
  • 7 Give a nonzero $2\times2$ matrix $M$ with $x^TMx=0$ for all $x\in\mathbb{R}^2$. Why does this not contradict Theorem 10.35(2)?
  • 8 The form $q=x^2+2xy$ has matrix $A=\begin{pmatrix}1&1\\1&0\end{pmatrix}$. Compute the matrix of $q$ after the substitution $x=Py$ with $P=\begin{pmatrix}1&-1\\0&1\end{pmatrix}$ and write $q$ in the new variables.
1 $\begin{pmatrix}2&-3&0\\-3&-1&1\\0&1&4\end{pmatrix}$ (the $xz$ coefficient is $0$).
2 $q=x^2+5z^2-4xy+6yz$ (the $y^2$ coefficient is $0$).
3 $A=\tfrac12(M+M^T)=\begin{pmatrix}2&2\\2&4\end{pmatrix}$; check $x^TMx=2x_1^2+4x_1x_2+4x_2^2$.
4 $B(x,y)=x_1y_1-\tfrac32(x_1y_2+x_2y_1)+2x_2y_2$, by polarisation.
5 Over $\mathbb{R}$, $\det(P^TIP)=(\det P)^2\gt0$, but $\det\operatorname{diag}(1,-1)=-1$ (Theorem 10.36). Over $\mathbb{C}$, $P=\operatorname{diag}(1,i)$ gives $P^TIP=\operatorname{diag}(1,i^2)=\operatorname{diag}(1,-1)$.
6 $B_s(x,y)=\tfrac12(B(x,y)+B(y,x))$, $B_a=\tfrac12(B(x,y)-B(y,x))$; uniqueness: a form that is both symmetric and skew is $0$ (char $\ne2$). If $B$ is skew, $B(x,x)=-B(x,x)$ so $B(x,x)=0$; conversely $0=B(x+y,x+y)=B(x,y)+B(y,x)$.
7 $M=\begin{pmatrix}0&1\\-1&0\end{pmatrix}$: $x^TMx=x_1x_2-x_2x_1=0$. The theorem concerns symmetric matrices; $M$ is skew.
8 $P^TAP=\begin{pmatrix}1&0\\-1&1\end{pmatrix}\begin{pmatrix}1&1\\1&0\end{pmatrix}\begin{pmatrix}1&-1\\0&1\end{pmatrix}=\begin{pmatrix}1&0\\0&-1\end{pmatrix}$: $q=y_1^2-y_2^2$. Directly: $x_1=y_1-y_2$, $x_2=y_2$ gives $x_1(x_1+2x_2)=(y_1-y_2)(y_1+y_2)$.
II
Reduction to diagonal form.
  • 1 Reduce $x^2+2xy+2y^2+2yz+3z^2$ by Lagrange's reduction and decide its definiteness.
  • 2 Reduce $x^2-2xy+4xz-y^2+2yz$ by Lagrange's reduction; give rank and inertia.
  • 3 Reduce $xy+yz$ (no square terms) and give its inertia.
  • 4 Find an orthogonal substitution reducing $2x^2+2y^2+2z^2+2xy+2yz+2zx$ to principal axes.
  • 5 Reduce $x^2+4xy+y^2$ to principal axes, and identify the curve $x^2+4xy+y^2=3$.
  • 6 Find an invertible $P$ with $P^TAP$ diagonal for $A=\begin{pmatrix}0&1\\1&0\end{pmatrix}$.
  • 7 For $q=x^2+4xy+y^2$ compare the Lagrange coefficients with the eigenvalues, and explain why their products have the same sign.
  • 8 Find the rank and signature of $(x+y)^2+(y+z)^2-(x-z)^2$.
1 $(x+y)^2+y^2+2yz+3z^2=(x+y)^2+(y+z)^2+2z^2$: three positive squares, inertia $(3,0,0)$, positive definite.
2 $(x-y+2z)^2=x^2+y^2+4z^2-2xy+4xz-4yz$, so $q=(x-y+2z)^2-2y^2+6yz-4z^2=(x-y+2z)^2-2\left(y-\tfrac32z\right)^2+\tfrac12z^2$. Rank $3$, inertia $(2,1,0)$, signature $1$; check $1\cdot(-2)\cdot\tfrac12=-1=\det A$.
3 $x=u+v$, $y=u-v$: $xy+yz=u^2-v^2+(u-v)z=\left(u+\tfrac z2\right)^2-\left(v+\tfrac z2\right)^2$. Only two squares: rank $2$, inertia $(1,1,1)$ (eigenvalues $\pm\tfrac1{\sqrt2},0$).
4 The matrix $I+J$ has eigenvalues $4,1,1$ (Example 2 of §10.2); with $x=Qy$, $Q=\big[\tfrac1{\sqrt3}(1,1,1),\tfrac1{\sqrt2}(1,-1,0),\tfrac1{\sqrt6}(1,1,-2)\big]$, $q=4y_1^2+y_2^2+y_3^2$.
5 Eigenvalues $3$ on $(1,1)$ and $-1$ on $(1,-1)$: $q=3X^2-Y^2$ with $X=\tfrac{x+y}{\sqrt2}$, $Y=\tfrac{x-y}{\sqrt2}$. The curve $3X^2-Y^2=3$, i.e. $X^2-\tfrac{Y^2}{3}=1$, is a hyperbola with vertices at distance $1$ from the origin along $(1,1)$.
6 $P=\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ gives $P^TAP=\operatorname{diag}(2,-2)$ (this is the substitution $x=u+v$, $y=u-v$ in $2xy$).
7 Lagrange: $(x+2y)^2-3y^2$, coefficients $(1,-3)$; eigenvalues $3,-1$. Products: $-3=\det A$ (unit triangular substitution) and $-3=\det A$ (orthogonal). In general the products differ by $(\det P)^2\gt0$.
8 Expanding, $q=2xy+2xz+2yz+2y^2$; with $u=x+y$, $v=y+z$ we have $x-z=u-v$, so $q=u^2+v^2-(u-v)^2=2uv=\tfrac12(u+v)^2-\tfrac12(u-v)^2$. Rank $2$, signature $0$, inertia $(1,1,1)$ (eigenvalues $3,-1,0$).
III
Inertia, signature and congruence classes.
  • 1 Find the inertia of $\begin{pmatrix}1&2&0\\2&1&0\\0&0&-3\end{pmatrix}$.
  • 2 Show that $A=\begin{pmatrix}1&1\\1&2\end{pmatrix}$ and $B=\begin{pmatrix}2&0\\0&3\end{pmatrix}$ are congruent, and find $P$ with $P^TAP=B$.
  • 3 Are $\begin{pmatrix}0&1\\1&0\end{pmatrix}$ and $\begin{pmatrix}1&0\\0&-1\end{pmatrix}$ congruent? Similar? Orthogonally similar?
  • 4 How many congruence classes are there of real symmetric $4\times4$ matrices? Of invertible ones? Of rank $2$?
  • 5 How many congruence classes ($B=P^TAP$, $P$ complex invertible) of complex symmetric $n\times n$ matrices are there?
  • 6 Prove that a real symmetric $A$ is congruent to $-A$ if and only if $n_+=n_-$.
  • 7 Prove that $n_-=\max\{\dim W:q\lt0\text{ on }W\setminus\{0\}\}$, and deduce that if $q$ is negative on a $2$-dimensional subspace of $\mathbb{R}^3$ then $q$ is not positive semidefinite on any plane.
  • 8 Prove that an indefinite real form has a nonzero isotropic vector ($q(x)=0$), and find one for $x^2-2y^2+z^2$.
1 Block diagonal: the $2\times2$ block has eigenvalues $3,-1$, and $-3$: inertia $(1,2,0)$, signature $-1$.
2 Both are positive definite ($D_1=1$, $D_2=1$; and $2,6$), so both are congruent to $I$. With $A=LL^T$, $L=\begin{pmatrix}1&0\\1&1\end{pmatrix}$, and $B=D^2$, $D=\operatorname{diag}(\sqrt2,\sqrt3)$: $P=L^{-T}D=\begin{pmatrix}\sqrt2&-\sqrt3\\0&\sqrt3\end{pmatrix}$; check $P^TAP=\operatorname{diag}(2,3)$.
3 Both have eigenvalues $1,-1$: congruent (same inertia), similar (same eigenvalues, both diagonalisable), and orthogonally similar (Example 5(b)); a $45°$ rotation does it.
4 $\binom{6}{2}=15$; invertible: $5$ ($n_+=0,\dots,4$); rank $2$: $3$.
5 $n+1$: the rank $r=0,1,\dots,n$ is the only invariant (Theorem 10.40(3)).
6 $-A$ has inertia $(n_-,n_+,n_0)$; by Theorem 10.40 the two are congruent iff $(n_+,n_-)=(n_-,n_+)$.
7 Apply Theorem 10.41 to $-q$. If $q\lt0$ on a plane in $\mathbb{R}^3$, then $n_-\ge2$, so $n_++n_0\le1$; any plane $W$ meets the $2$-dimensional span of the negative eigenvectors in a nonzero $x$ (since $2+2\gt3$), with $q(x)\lt0$.
8 Pick $x$ with $q(x)\gt0$ and $y$ with $q(y)\lt0$; $t\mapsto q((1-t)x+ty)$ is continuous on $[0,1]$ and changes sign, so it vanishes at some $t$, and $(1-t)x+ty\ne0$ because $x,y$ are independent (if $y=cx$ then $q(y)=c^2q(x)\ge0$). For $x^2-2y^2+z^2$: $(1,1,1)$.
IV
Definiteness, conics and quadrics.
  • 1 Use leading minors to show that $\begin{pmatrix}2&-1&0\\-1&2&-1\\0&-1&2\end{pmatrix}$ is positive definite, and write the form as a sum of squares with Jacobi's coefficients.
  • 2 Find all $k$ for which $x^2+2y^2+kz^2+2xy+2yz$ is positive definite.
  • 3 Show that $\begin{pmatrix}0&0\\0&-1\end{pmatrix}$ has non-negative leading minors but is not positive semidefinite.
  • 4 Show that $-3x^2+2xy-2y^2$ is negative definite.
  • 5 Classify the conic $x^2-4xy+4y^2+4x-3y-7=0$.
  • 6 Show that $2x^2+4xy+5y^2=6$ is an ellipse and find its semi-axes.
  • 7 Identify the quadric $x^2+y^2-z^2+4xy=1$.
  • 8 Applied (stability). A structure's elastic energy near equilibrium is $E(x,y)=4x^2+2kxy+y^2$ (in joules, displacements in metres), where $k$ depends on a design parameter. For which $k$ is the equilibrium stable (energy positive for every nonzero displacement)? What happens at $k=2$?
1 $D_1=2$, $D_2=3$, $D_3=4$: all positive. Jacobi: $q=2y_1^2+\tfrac32y_2^2+\tfrac43y_3^2$; explicitly $q=2\left(x-\tfrac y2\right)^2+\tfrac32\left(y-\tfrac23z\right)^2+\tfrac43z^2$.
2 $A=\begin{pmatrix}1&1&0\\1&2&1\\0&1&k\end{pmatrix}$: $D_1=1$, $D_2=1$, $D_3=k-1$. Positive definite iff $k\gt1$.
3 $D_1=0$, $D_2=0$, but $q(0,1)=-1\lt0$. The principal minor $a_{22}=-1$ reveals it (Theorem 10.42(3)).
4 $A=\begin{pmatrix}-3&1\\1&-2\end{pmatrix}$: $D_1=-3\lt0$, $D_2=6-1=5\gt0$ — the negative definite pattern. (Eigenvalues $\tfrac{-5\pm\sqrt5}{2}\lt0$.)
5 $a=1$, $h=-2$, $b=4$, $g=2$, $f=-\tfrac32$, $c=-7$: $\delta=4-4=0$ and $\Delta=-\tfrac{25}4\ne0$: a parabola.
6 Eigenvalues of $\begin{pmatrix}2&2\\2&5\end{pmatrix}$: $1$ and $6$ ($\operatorname{tr}7$, $\det6$). $X^2+6Y^2=6$: $\tfrac{X^2}{6}+Y^2=1$, semi-axes $\sqrt6$ (along $(2,-1)$) and $1$ (along $(1,2)$).
7 $\begin{pmatrix}1&2&0\\2&1&0\\0&0&-1\end{pmatrix}$ has eigenvalues $3,-1,-1$: inertia $(1,2,0)$, a hyperboloid of two sheets.
8 $E$ is positive definite iff $D_1=4\gt0$ and $D_2=4-k^2\gt0$, i.e. $|k|\lt2$. At $k=2$, $E=(2x+y)^2$ is only semidefinite: displacements along $y=-2x$ cost no energy, so the structure loses stability (a buckling mode). For $|k|\gt2$ it is indefinite: unstable.
Check: classify a $3\times3$ real symmetric matrix
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA For the real quadratic form $q=x^2+2y^2-z^2+2xy+4yz$, the rank and the signature ($n_+-n_-$) are (A) rank $3$, signature $1$; (B) rank $2$, signature $0$; (C) rank $3$, signature $3$; (D) rank $3$, signature $-1$.

Idea Complete squares; signs are all that matter.
Work $q=(x+y)^2+y^2+4yz-z^2=(x+y)^2+(y+2z)^2-5z^2$: inertia $(2,1,0)$. Check with Jacobi: $D_1=1$, $D_2=1$, $D_3=-5$ — one sign change.
Answer (A).

E2. CSIR Part B The number of congruence classes of real symmetric $3\times3$ matrices is (A) $4$; (B) $7$; (C) $10$; (D) $27$.

Idea Classes correspond to inertia triples $(n_+,n_-,n_0)$ with sum $3$ (Theorem 10.40).
Count $\binom{5}{2}=10$: rank $0$: $1$; rank $1$: $2$; rank $2$: $3$; rank $3$: $4$. (Option (A) counts the complex classes.)
Answer (C).

E3. CSIR Part B The matrix $\begin{pmatrix}a&1&1\\1&a&1\\1&1&a\end{pmatrix}$ is positive definite if and only if (A) $a\gt0$; (B) $a\gt1$; (C) $a\gt-2$; (D) $a\gt2$.

Idea The matrix is $(a-1)I+J$; its eigenvalues are $a+2$ and $a-1$ (twice).
Work All positive iff $a\gt1$. Leading minors agree: $D_1=a$, $D_2=a^2-1$, $D_3=(a-1)^2(a+2)$. For $a=\tfrac12$ (allowed by (A)) $D_2\lt0$.
Answer (B).

E4. CSIR Part C Let $A,B$ be real symmetric $n\times n$ matrices. Which of the following are true? (One or more options may be correct.) (A) If $A$ and $B$ are congruent, they have the same rank. (B) If $A$ and $B$ are congruent, they have the same eigenvalues. (C) If $A$ and $B$ have the same numbers of positive and of negative eigenvalues, they are congruent. (D) If $n=2$ and $\det A\gt0$, $\det B\gt0$, then $A$ and $B$ are congruent.

(A) True Theorem 10.36.
(B) False $I$ and $4I=(2I)^TI(2I)$.
(C) True Same inertia (Theorem 10.41), hence congruent (Theorem 10.40).
(D) False $I$ and $-I$.
Answer (A) and (C).

E5. CSIR Part C For real $h$ let $C_h=\{(x,y)\in\mathbb{R}^2:x^2+2hxy+y^2=1\}$. Which of the following are true? (A) $C_h$ is an ellipse for $|h|\lt1$. (B) $C_1$ is a pair of parallel lines. (C) $C_h$ is a hyperbola for $|h|\gt1$. (D) $C_h$ is bounded for every $h$ with $|h|\le1$.

Eigenvalues $\begin{pmatrix}1&h\\h&1\end{pmatrix}$ has eigenvalues $1+h$ on $(1,1)$ and $1-h$ on $(1,-1)$; $C_h$ is $(1+h)X^2+(1-h)Y^2=1$.
(A) True Both eigenvalues are positive (a circle at $h=0$).
(B) True $x^2+2xy+y^2=(x+y)^2=1$: the lines $x+y=\pm1$.
(C) True; (D) False For $|h|\gt1$ the eigenvalues have opposite signs: a hyperbola. At $h=\pm1$ the curve is a pair of lines, which is unbounded.
Answer (A), (B) and (C).

E6. CSIR Part C A real symmetric $3\times3$ matrix $A$ has leading principal minors $D_1=1$, $D_2=-2$, $D_3=4$. Let $q(x)=x^TAx$. Which of the following are true? (A) $q$ is indefinite. (B) $A$ has exactly one positive eigenvalue. (C) $A$ is congruent to $\operatorname{diag}(1,1,-1)$. (D) $-A$ has exactly two positive eigenvalues.

Jacobi The minors are nonzero, so $q\cong y_1^2+\tfrac{-2}{1}y_2^2+\tfrac{4}{-2}y_3^2=y_1^2-2y_2^2-2y_3^2$ (Theorem 10.43): inertia $(1,2,0)$. (The sequence $1,1,-2,4$ has two sign changes; e.g. $A=\operatorname{diag}(1,-2,-2)$.)
(A) True; (B) True $n_+=1$, $n_-=2$.
(C) False $\operatorname{diag}(1,1,-1)$ has inertia $(2,1,0)$.
(D) True $-A$ has inertia $(2,1,0)$.
Answer (A), (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 2 lectures × 60 min (a third if conics and quadrics are done in full).

  1. Forms, congruence, reduction. Definition 10.12 with the halving rule (Example 1 as a warm-up); congruence versus similarity (Theorem 10.35(3) and the remark after it); Theorem 10.37 with its short inductive proof; Lagrange's reduction on the board (Example 2, both parts); principal axes (Theorem 10.38, Example 3). Project Interactive 1 and let students guess the type before moving $h$ past $\pm\sqrt2$.
  2. Inertia and definiteness. Sylvester's law with the dimension-count proof (insist on it — it is the key idea); Definition 10.14 and the convention warning; counting classes (Example 4); Interactive 2 to show three routes with one sign pattern. Sylvester's criterion with the Schur complement proof, Jacobi's theorem, Example 7. Conics via Theorem 10.44 and Example 6; quadrics by the table. Finish with E4 and E6.

Discussion questions. (1) Why is congruence the "right" equivalence for forms and similarity the right one for operators — and when do they agree? (2) If two people reduce the same form by different completions of squares, what must agree and what need not? (3) Why do leading minors suffice for positive definiteness but not for semidefiniteness?

Misconceptions to watch for. Forgetting to halve cross terms; treating Lagrange coefficients as eigenvalues; counting squares in a decomposition whose linear forms are dependent; "all minors negative" for negative definite; mixing up the conventions for index and signature; using a non-orthogonal Lagrange substitution to find the axes or area of a conic.

Suggested homework. I(1, 3, 5, 8), II(2, 3, 5, 8), III(2, 4, 6, 8), IV(2, 4, 5, 6, 8); Exam corner E1, E3, E5.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. If a symmetric matrix is chosen "at random", how likely is it to be positive definite — and what does that say about the critical points of a complicated function?

Why it matters. At a critical point of a smooth function, the Hessian is a quadratic form: positive definite means a local minimum, negative definite a maximum, indefinite a saddle, and the index $n_-$ counts the directions of descent (Morse theory). In the energy landscapes of molecules, spin glasses in physics, and the loss functions used to train neural networks, there are astronomically many critical points. Modelling their Hessians as random symmetric matrices explains a striking observation: in high dimension almost all critical points are saddles, and true minima are rare.

What to do.

  1. Generate $10^5$ random symmetric $n\times n$ matrices whose upper-triangular entries are independent standard normal variables, for $n=2,3,4,5$. Estimate the probability that the matrix is positive definite, using Sylvester's criterion (leading minors) and, separately, eigenvalues. Do the two tests always agree?
  2. Plot the estimated probability against $n$ on a logarithmic scale. How fast does it decay?
  3. For $n=6$, record the index $n_-$ of each matrix and draw its histogram. Which index is most common?
  4. For $n=2$, express the probability as an integral over $a,c\gt0$ of the chance that $b^2\lt ac$, and evaluate it numerically.

Tools: Python with NumPy (numpy.linalg.eigvalsh, numpy.linalg.det) and SciPy for the integral.

Hand in: A table and plot of your probabilities, the index histogram, the integral for $n=2$, and one paragraph relating your findings to "most critical points are saddles".

Going further. Read about the Gaussian orthogonal ensemble and Wigner's semicircle law, or about the Hessian spectra of trained neural networks.

Instructor note: with this model, simulation gives $P(\text{positive definite})\approx0.116$ ($n=2$), $0.0125$ ($n=3$), $0.0007$ ($n=4$); the decay is faster than exponential (roughly like $e^{-cn^2}$, a large-deviation effect for the smallest eigenvalue). The $n=2$ integral $\int_0^\infty\!\int_0^\infty\varphi(a)\varphi(c)\,\big(2\Phi(\sqrt{ac})-1\big)\,da\,dc\approx0.1159$. The two tests agree up to round-off. The index histogram is symmetric about $n/2$ and peaks there.

🧪 Self-check quiz

0/5 correct

Q1. The symmetric matrix of $q(x,y)=x^2+6xy+y^2$ is

Q2. Sylvester's law of inertia says that under congruence $A\mapsto P^TAP$ the following is unchanged:

Q3. The form $q=2xy$ on $\mathbb{R}^2$ has

Q4. $x^2+y^2+z^2+2k(xy+yz+zx)$ is positive definite exactly when

Q5. The curve $3x^2+2xy+3y^2=1$ is