Chapter 3 · Linear Algebra

3.3 Inner Products, Special Matrices and Quadratic Forms

Inner products, orthonormal bases and Gram–Schmidt; the special classes of matrices (symmetric, skew-symmetric, orthogonal, Hermitian, skew-Hermitian, unitary, normal) and what each says about eigenvalues; unitary diagonalisation of normal matrices; and bilinear and quadratic forms with their rank, signature and definiteness.

Sections 3.1 and 3.2 studied vector spaces with nothing but addition and scaling. That is enough to talk about rank, eigenvalues and diagonalisation, but not about length, angle or perpendicularity. An inner product supplies all three, and with them comes a second, stronger kind of diagonalisation: not just "some basis of eigenvectors", but an orthonormal one, reached by a rigid change of coordinates (a rotation or reflection, or its complex analogue, a unitary matrix). Which matrices allow this? Exactly the normal ones, those that commute with their conjugate transpose. This is the spectral theorem, and it explains a whole list of facts GATE treats as routine: symmetric and Hermitian matrices have real eigenvalues and perpendicular eigenvectors, unitary matrices have eigenvalues of modulus one, skew-Hermitian matrices have purely imaginary ones. The same theorem, applied to a symmetric matrix, rotates a quadratic form such as $5x^2+6xy+5y^2$ into a sum of squares $8X^2+2Y^2$. The signs of those squares give the rank, signature and definiteness of the form, the type of a conic or quadric, and (through the Hessian of §1.2) the nature of a critical point.

GATE MA asks about this material every year. MCQs ask for the eigenvalues of a rotation or the signature of a form; MSQs list statements about Hermitian, unitary and normal matrices ("if all eigenvalues are real then the matrix is Hermitian", "a matrix whose eigenvalues all have modulus $1$ is unitary") and you have to decide each one, which needs a ready supply of counterexamples; NATs ask for a distance computed by Gram–Schmidt, a range of a parameter for positive definiteness, or the area of an ellipse. This section gives the definitions, the theorems with short proofs, the GATE routines and the standard traps.

Inner Products, Orthogonality and Gram–Schmidt

Throughout, $\mathbb{F}$ is $\mathbb{R}$ or $\mathbb{C}$, $V$ is a finite-dimensional vector space over $\mathbb{F}$, vectors in $\mathbb{F}^n$ are columns, $A^{\mathsf T}$ is the transpose, $\bar A$ the entrywise conjugate and $A^*=\bar A^{\mathsf T}$ the conjugate transpose (for real matrices $A^*=A^{\mathsf T}$). We use the same conventions as the CSIR course: the inner product is linear in its first slot.

📘 Definition 3.14 — Inner product; norm

An inner product on $V$ is a map $V\times V\to\mathbb{F}$, $(x,y)\mapsto\langle x,y\rangle$, such that for all $x,y,z\in V$ and $a,b\in\mathbb{F}$:

  • (linearity in the first slot) $\langle ax+by,z\rangle$ $=a\langle x,z\rangle+b\langle y,z\rangle$;
  • (conjugate symmetry) $\langle y,x\rangle$ $=\overline{\langle x,y\rangle}$ (over $\mathbb{R}$: symmetry);
  • (positivity) $\langle x,x\rangle\gt0$ for every $x\ne0$.

Consequently $\langle x,ay+bz\rangle$ $=\bar a\langle x,y\rangle+\bar b\langle x,z\rangle$ (conjugate-linear in the second slot) and $\langle 0,x\rangle=0$. The norm is $\|x\|$ $=\sqrt{\langle x,x\rangle}$. Standard examples: on $\mathbb{F}^n$, $\langle x,y\rangle$ $=y^*x$ $=\sum_ix_i\bar y_i$ (the dot product when $\mathbb{F}=\mathbb{R}$); on $M_n(\mathbb{F})$, $\langle A,B\rangle$ $=\operatorname{tr}(B^*A)$ $=\sum_{i,j}a_{ij}\bar b_{ij}$; on polynomials or continuous functions, $\langle f,g\rangle$ $=\int_a^bf(x)\overline{g(x)}\,dx$; and on $\mathbb{R}^n$, $\langle x,y\rangle_M$ $=y^{\mathsf T}Mx$ for a positive definite matrix $M$ (Theorem 3.44 shows these are all the inner products on $\mathbb{R}^n$).

📐 Theorem 3.29 — Cauchy–Schwarz and triangle inequalities
For all $x,y$ in an inner product space, $|\langle x,y\rangle|$ $\le\|x\|\,\|y\|$, with equality if and only if $x$ and $y$ are linearly dependent. Consequently $\|x+y\|\le\|x\|+\|y\|$, so $\|\cdot\|$ is a norm, and over $\mathbb{R}$ the angle $\theta\in[0,\pi]$ between nonzero vectors is defined by $\cos\theta$ $=\dfrac{\langle x,y\rangle}{\|x\|\|y\|}$.

Proof. If $y=0$ both sides are $0$. Otherwise put $c$ $=\langle x,y\rangle/\|y\|^2$ and $w=x-cy$. Then $\langle w,y\rangle$ $=\langle x,y\rangle-c\langle y,y\rangle$ $=0$, so the cross terms in $\|w+cy\|^2$ vanish and

$$\|x\|^2=\|w\|^2+|c|^2\|y\|^2\ge\frac{|\langle x,y\rangle|^2}{\|y\|^2},$$

with equality exactly when $w=0$, i.e. $x=cy$. For the triangle inequality, expand and use $\operatorname{Re}\langle x,y\rangle$ $\le|\langle x,y\rangle|$ $\le\|x\|\|y\|$:

$$\begin{aligned}\|x+y\|^2&=\|x\|^2+2\operatorname{Re}\langle x,y\rangle+\|y\|^2\\&\le(\|x\|+\|y\|)^2.\qquad\blacksquare\end{aligned}$$
📘 Definition 3.15 — Orthogonality, orthonormal sets, orthogonal complement
Vectors $x,y$ are orthogonal, $x\perp y$, if $\langle x,y\rangle=0$. A set of vectors is orthogonal if its members are pairwise orthogonal, and orthonormal if in addition each has norm $1$; an orthonormal basis is an ONB. For a subspace $W$, the orthogonal complement is $W^\perp$ $=\{x\in V:\langle x,w\rangle=0\text{ for all }w\in W\}$, again a subspace.
📐 Theorem 3.30 — Orthonormal expansions
(a) An orthogonal set of nonzero vectors is linearly independent. (b) If $e_1,\dots,e_n$ is an ONB of $V$, then for every $x,y\in V$ $$x=\sum_{i=1}^n\langle x,e_i\rangle e_i,\qquad \|x\|^2=\sum_{i=1}^n|\langle x,e_i\rangle|^2,$$ and $\langle x,y\rangle$ $=\sum_i\langle x,e_i\rangle\overline{\langle y,e_i\rangle}$: in coordinates with respect to an ONB, every inner product becomes the standard one.

Proof. (a) If $\sum_ia_iu_i=0$, take the inner product with $u_j$: every term with $i\ne j$ vanishes, leaving $a_j\|u_j\|^2=0$, so $a_j=0$. (b) Write $x=\sum_ia_ie_i$; the inner product with $e_j$ gives $a_j=\langle x,e_j\rangle$. Expanding $\langle x,y\rangle$ with $y=\sum_jb_je_j$ gives $\sum_{i,j}a_i\bar b_j\langle e_i,e_j\rangle$ $=\sum_ia_i\bar b_i$, and $y=x$ gives the norm formula. ∎

So orthonormal bases make coordinates free: no linear system has to be solved, a coefficient is one inner product. The Gram–Schmidt process manufactures such bases from any basis.

📐 Theorem 3.31 — The Gram–Schmidt process; $QR$ factorisation

Let $v_1,\dots,v_k$ be linearly independent. Define recursively

$$u_1=v_1,\qquad u_j=v_j-\sum_{i=1}^{j-1}\frac{\langle v_j,u_i\rangle}{\|u_i\|^2}\,u_i,\qquad e_j=\frac{u_j}{\|u_j\|}.$$

Then $e_1,\dots,e_k$ is orthonormal and $\operatorname{span}\{e_1,\dots,e_j\}$ $=\operatorname{span}\{v_1,\dots,v_j\}$ for every $j$. If the $v$'s are dependent, the process produces $u_j=0$ exactly at the first $v_j$ lying in the span of $v_1,\dots,v_{j-1}$. Consequences: every finite-dimensional inner product space has an ONB; every orthonormal set extends to an ONB; and a matrix $A\in M_{m\times k}(\mathbb{F})$ with independent columns factors as $A=QR$, where $Q$ has orthonormal columns $e_j$ and $R$ is upper triangular with $r_{ij}$ $=\langle v_j,e_i\rangle$ and positive diagonal $r_{jj}=\|u_j\|$.

Proof. Induction on $j$. Suppose $u_1,\dots,u_{j-1}$ are nonzero, pairwise orthogonal and span $S_{j-1}$ $=\operatorname{span}\{v_1,\dots,v_{j-1}\}$. For $l\lt j$, orthogonality kills every term of the sum except $i=l$:

$$\langle u_j,u_l\rangle=\langle v_j,u_l\rangle-\frac{\langle v_j,u_l\rangle}{\|u_l\|^2}\|u_l\|^2=0.$$

Also $u_j\in v_j+S_{j-1}$, so $u_j=0$ would put $v_j$ in $S_{j-1}$, contradicting independence; and $\operatorname{span}\{u_1,\dots,u_j\}$ $=S_j$ because each of $u_j$, $v_j$ is the other plus an element of $S_{j-1}$. Normalising changes nothing. For the extension statement, apply the process to the orthonormal set followed by a basis of $V$ and discard the zero vectors that appear; orthonormal vectors at the start are left unchanged. Finally $v_j$ $=u_j+\sum_{i\lt j}(\cdots)u_i$ expresses $v_j$ in terms of $e_1,\dots,e_j$ only, with coefficients $\langle v_j,e_i\rangle$ (Theorem 3.30) and $\langle v_j,e_j\rangle$ $=\langle u_j,e_j\rangle$ $=\|u_j\|$ $\gt0$: this is $A=QR$. ∎

📐 Theorem 3.32 — Orthogonal decomposition and best approximation

Let $W$ be a subspace of $V$ with ONB $e_1,\dots,e_k$, and define the orthogonal projection $P_Wx$ $=\sum_{i=1}^k\langle x,e_i\rangle e_i$. Then:

  1. $x-P_Wx\in W^\perp$; hence $V=W\oplus W^\perp$, $\dim W^\perp=\dim V-\dim W$ and $(W^\perp)^\perp=W$.
  2. (Best approximation) $\|x-P_Wx\|\lt\|x-w\|$ for every $w\in W$ with $w\ne P_Wx$, and $\operatorname{dist}(x,W)^2$ $=\|x\|^2-\sum_{i=1}^k|\langle x,e_i\rangle|^2$.
  3. In $\mathbb{F}^n$ with the standard inner product: if the columns of $A$ form a basis of $W$, the matrix of $P_W$ is $A(A^*A)^{-1}A^*$; if they are orthonormal, it is $AA^*$. It satisfies $P^2=P=P^*$.

Proof. (1) $\langle x-P_Wx,e_j\rangle$ $=\langle x,e_j\rangle-\langle x,e_j\rangle$ $=0$ for each $j$, so $x-P_Wx$ is orthogonal to $W$. Thus $x=P_Wx+(x-P_Wx)$ lies in $W+W^\perp$, and the sum is direct because $w\in W\cap W^\perp$ gives $\langle w,w\rangle=0$. Dimensions add, and $W\subseteq(W^\perp)^\perp$ with equal dimensions. (2) For $w\in W$, $x-w=(x-P_Wx)+(P_Wx-w)$ with the first term in $W^\perp$ and the second in $W$, so by Pythagoras $\|x-w\|^2$ $=\|x-P_Wx\|^2+\|P_Wx-w\|^2$. The distance formula is Pythagoras again: $\|x\|^2$ $=\|P_Wx\|^2+\|x-P_Wx\|^2$. (3) $P_Wx=Ac$ where $x-Ac\perp$ every column, i.e. $A^*(x-Ac)=0$, so $c=(A^*A)^{-1}A^*x$ ($A^*A$ is invertible because $A^*Ac=0$ gives $\|Ac\|^2=0$). ∎

Part (3) is the method of least squares: the best solution of an inconsistent system $Ac\approx b$ solves the normal equations $A^*Ac=A^*b$, and the residual $b-Ac$ is orthogonal to the column space (Exercise I.9).

✏️ Example 1 — An orthonormal basis with rational entries, and a distance
Apply Gram–Schmidt to $v_1=(2,1,2)$, $v_2=(1,1,0)$, $v_3=(0,0,1)$ in $\mathbb{R}^3$, write the $QR$ factorisation of $A=[v_1\ v_2\ v_3]$, and find the distance from $b=(1,1,1)$ to the plane $W$ $=\operatorname{span}\{v_1,v_2\}$.
Step 1 $\|v_1\|=3$, so $e_1=\tfrac13(2,1,2)$.
Step 2 $\langle v_2,e_1\rangle$ $=\tfrac13(2+1)$ $=1$, so $u_2$ $=v_2-e_1$ $=\left(\tfrac13,\tfrac23,-\tfrac23\right)$, which already has norm $1$: $e_2=\tfrac13(1,2,-2)$.
Step 3 $\langle v_3,e_1\rangle$ $=\tfrac23$ and $\langle v_3,e_2\rangle$ $=-\tfrac23$, so $u_3$ $=(0,0,1)-\tfrac29(2,1,2)+\tfrac29(1,2,-2)$ $=\tfrac19(-2,2,1)$, of norm $\tfrac13$; $e_3=\tfrac13(-2,2,1)$.
QR $Q$ $=\tfrac13\begin{pmatrix}2&1&-2\\1&2&2\\2&-2&1\end{pmatrix}$ and $R$ $=\begin{pmatrix}3&1&\tfrac23\\0&1&-\tfrac23\\0&0&\tfrac13\end{pmatrix}$, with $r_{ij}$ $=\langle v_j,e_i\rangle$. Check: $\det Q=1$ and $\det R$ $=3\cdot1\cdot\tfrac13$ $=1$, while expanding $\det A$ along its last column gives $1\cdot(2\cdot1-1\cdot1)=1$ ✓.
Distance $W^\perp$ $=\operatorname{span}\{e_3\}$, so $\operatorname{dist}(b,W)$ $=|\langle b,e_3\rangle|$ $=\tfrac13|-2+2+1|$ $=\tfrac13$. Equivalently $P_Wb$ $=\langle b,e_1\rangle e_1+\langle b,e_2\rangle e_2$ $=\tfrac53e_1+\tfrac13e_2$ $=\left(\tfrac{11}9,\tfrac79,\tfrac89\right)$, and $b-P_Wb=\tfrac19(-2,2,1)$ has norm $\tfrac13$. ✓
✏️ Example 2 — Is it an inner product?
Decide which of the following are inner products. (a) $\langle x,y\rangle$ $=2x_1y_1+x_1y_2+x_2y_1+x_2y_2$ on $\mathbb{R}^2$. (b) $\langle x,y\rangle$ $=x_1y_1+x_1y_2+x_2y_2$ on $\mathbb{R}^2$. (c) $\langle z,w\rangle$ $=z_1\bar w_1+iz_1\bar w_2-iz_2\bar w_1+2z_2\bar w_2$ on $\mathbb{C}^2$. (d) $\langle f,g\rangle$ $=\int_0^{1/2}f(x)g(x)\,dx$ on $C[0,1]$, and the same formula on the space $P_2(\mathbb{R})$ of real polynomials of degree at most $2$.
(a) Yes It is $y^{\mathsf T}Mx$ with $M$ $=\begin{pmatrix}2&1\\1&1\end{pmatrix}$ symmetric, so bilinear and symmetric; and $\langle x,x\rangle$ $=2x_1^2+2x_1x_2+x_2^2$ $=x_1^2+(x_1+x_2)^2$ $\gt0$ unless $x_1=x_1+x_2=0$, i.e. $x=0$.
(b) No Not symmetric: $\langle e_1,e_2\rangle=1$ but $\langle e_2,e_1\rangle=0$. (Its "quadratic form" $x_1^2+x_1x_2+x_2^2$ is positive, which shows positivity alone is not enough.)
(c) Yes It is $w^*Mz$ with $M$ $=\begin{pmatrix}1&-i\\i&2\end{pmatrix}$, which is Hermitian ($M^*=M$), so conjugate symmetry holds. Since $-iz_2\bar z_1$ is the conjugate of $iz_1\bar z_2$, $\langle z,z\rangle$ $=|z_1|^2+2|z_2|^2+2\operatorname{Re}(iz_1\bar z_2)$ $=|z_1-iz_2|^2+|z_2|^2$, which is $0$ only if $z_2=0$ and $z_1=0$.
(d) No, then yes On $C[0,1]$ positivity fails: $f(x)=\max(0,x-\tfrac12)$ is nonzero but $\langle f,f\rangle=0$. On $P_2(\mathbb{R})$ it works: $\int_0^{1/2}p^2=0$ forces the continuous function $p^2\ge0$ to vanish on $[0,\tfrac12]$, and a polynomial with infinitely many roots is $0$.
Moral Check the three axioms separately. For a formula $y^{\mathsf T}Mx$ (or $w^*Mz$) the test is: $M$ symmetric (Hermitian) and positive definite (Theorem 3.44).

The Adjoint and the Special Classes of Matrices

For the standard inner product on $\mathbb{F}^n$, $\langle Ax,y\rangle$ $=y^*Ax$ $=(A^*y)^*x$ $=\langle x,A^*y\rangle$. So $A^*$ is the matrix that "moves across" the inner product; it is called the adjoint of $A$. (On an abstract inner product space the adjoint $T^*$ of an operator is defined by $\langle Tx,y\rangle$ $=\langle x,T^*y\rangle$; its matrix in an orthonormal basis is the conjugate transpose, but in a non-orthonormal basis it is not.) The rules $(AB)^*=B^*A^*$, $(A^*)^*=A$, $(A^{-1})^*=(A^*)^{-1}$, $\det A^*=\overline{\det A}$ follow from those for the transpose.

📘 Definition 3.16 — The special classes of matrices
real matricescomplex matricescondition
symmetricHermitian$A^{\mathsf T}=A$, resp. $A^*=A$
skew-symmetricskew-Hermitian$A^{\mathsf T}=-A$, resp. $A^*=-A$
orthogonalunitary$A^{\mathsf T}A=I$, resp. $A^*A=I$
(real) normalnormal$A^*A=AA^*$

A real matrix is Hermitian iff it is symmetric and unitary iff it is orthogonal. Hermitian, skew-Hermitian and unitary matrices are normal ($A^*$ is $A$, $-A$ or $A^{-1}$, each of which commutes with $A$); so are all diagonal matrices and all matrices $\begin{pmatrix}a&-b\\b&a\end{pmatrix}$. In a Hermitian matrix the diagonal is real and $a_{ji}=\overline{a_{ij}}$; in a skew-Hermitian matrix the diagonal is purely imaginary (or $0$) and $a_{ji}=-\overline{a_{ij}}$. A complex symmetric matrix ($A^{\mathsf T}=A$) is in general none of these.

A useful analogy: $A\mapsto A^*$ behaves like $z\mapsto\bar z$. Hermitian matrices play the part of real numbers, skew-Hermitian ones of imaginary numbers, unitary ones of numbers of modulus $1$; every matrix splits uniquely as $A=H+iK$ with $H=\tfrac12(A+A^*)$ and $K=\tfrac1{2i}(A-A^*)$ Hermitian (Exercise II.2), like $z=x+iy$. The analogy becomes exact for normal matrices (Theorem 3.39).

📐 Theorem 3.33 — Characterisations of unitary matrices
For $U\in M_n(\mathbb{C})$ the following are equivalent: (a) $U^*U=I$; (b) $UU^*=I$; (c) the columns of $U$ form an ONB of $\mathbb{C}^n$; (d) the rows of $U$ form an ONB; (e) $\langle Ux,Uy\rangle$ $=\langle x,y\rangle$ for all $x,y$; (f) $\|Ux\|=\|x\|$ for all $x$. Products and inverses of unitary matrices are unitary, and $|\det U|=1$. The same holds over $\mathbb{R}$ for orthogonal matrices, with $\det Q=\pm1$.

Proof. (a)$\Leftrightarrow$(b): for square matrices a one-sided inverse is a two-sided inverse. (a)$\Leftrightarrow$(c): the $(i,j)$ entry of $U^*U$ is $u_i^*u_j$ $=\langle u_j,u_i\rangle$ for the columns $u_i$; (b)$\Leftrightarrow$(d) in the same way with rows. (a)$\Rightarrow$(e): $\langle Ux,Uy\rangle$ $=y^*U^*Ux$ $=y^*x$. (e)$\Rightarrow$(f): take $y=x$. (f)$\Rightarrow$(e): norms determine inner products by the polarisation identity $\langle x,y\rangle$ $=\tfrac14\sum_{k=0}^{3}i^k\|x+i^ky\|^2$ (over $\mathbb{R}$: $\tfrac14(\|x+y\|^2-\|x-y\|^2)$). (e)$\Rightarrow$(a): $\langle(U^*U-I)x,y\rangle$ $=\langle Ux,Uy\rangle-\langle x,y\rangle$ $=0$ for all $y$, so $(U^*U-I)x=0$ for all $x$. Finally $(UV)^*UV=V^*U^*UV=I$, $U^{-1}=U^*$ is unitary, and $|\det U|^2$ $=\overline{\det U}\det U$ $=\det(U^*U)$ $=1$. ∎

📐 Theorem 3.34 — Eigenvalues of the special classes
  1. Hermitian ($A^*=A$): $x^*Ax$ is real for every $x$; every eigenvalue is real; eigenvectors for distinct eigenvalues are orthogonal; $\det A$ and $\operatorname{tr}A$ are real. A real symmetric matrix has real eigenvalues and real eigenvectors.
  2. Skew-Hermitian ($A^*=-A$): $iA$ is Hermitian, so every eigenvalue is purely imaginary or $0$. A real skew-symmetric matrix has eigenvalues $0$ or $\pm i\beta$ in conjugate pairs; if $n$ is odd, $\det A=0$; and $I+A$ is always invertible.
  3. Unitary: every eigenvalue has $|\lambda|=1$, $|\det U|=1$, and eigenvectors for distinct eigenvalues are orthogonal. A real orthogonal matrix has $\det=\pm1$ and its non-real eigenvalues come in pairs $e^{\pm i\theta}$. If $Q$ is $3\times3$ real orthogonal with $\det Q=1$, then $1$ is an eigenvalue, $Q$ is a rotation through an angle $\theta$ about the line of that eigenvector, and $\operatorname{tr}Q$ $=1+2\cos\theta$.

Proof. Let $Ax=\lambda x$ with $x\ne0$, so $\langle Ax,x\rangle$ $=\lambda\|x\|^2$ and $\langle x,Ax\rangle$ $=\bar\lambda\|x\|^2$. (1) If $A=A^*$ then $\overline{x^*Ax}$ $=(x^*Ax)^*$ $=x^*A^*x$ $=x^*Ax$; and $\langle Ax,x\rangle$ $=\langle x,Ax\rangle$ gives $\lambda=\bar\lambda$. If also $Ay=\mu y$ with $\mu\ne\lambda$ (both real), then $\lambda\langle x,y\rangle$ $=\langle Ax,y\rangle$ $=\langle x,Ay\rangle$ $=\mu\langle x,y\rangle$, so $\langle x,y\rangle=0$. The determinant and trace are the product and sum of the (real) eigenvalues. For real symmetric $A$, $A-\lambda I$ is a real singular matrix, so it has a real null vector. (2) $(iA)^*=-iA^*=iA$, so $i\lambda$ is real. For real skew-symmetric $A$ the characteristic polynomial is real, so non-real roots pair up; $\det A$ $=\det A^{\mathsf T}$ $=\det(-A)$ $=(-1)^n\det A$ forces $\det A=0$ for odd $n$; and $-1$ is not purely imaginary, so it is not an eigenvalue and $I+A$ is invertible. (3) $\|x\|=\|Ux\|=|\lambda|\|x\|$. If $Uy=\mu y$ with $\mu\ne\lambda$, then $\langle x,y\rangle$ $=\langle Ux,Uy\rangle$ $=\lambda\bar\mu\langle x,y\rangle$, and $\lambda\bar\mu$ $=\lambda/\mu$ $\ne1$, so $\langle x,y\rangle=0$. For $3\times3$ real orthogonal $Q$ with $\det Q=1$: a real cubic has a real root, so the eigenvalues are either $1,e^{i\theta},e^{-i\theta}$ or three real numbers $\pm1$ with product $1$, i.e. $\{1,1,1\}$ or $\{1,-1,-1\}$; in every case $1$ occurs. In an ONB whose first vector spans that eigenline, $Q$ fixes the axis and acts on the perpendicular plane as a $2\times2$ orthogonal matrix of determinant $1$, a rotation by $\theta$, so $\operatorname{tr}Q$ $=1+2\cos\theta$. ∎

✏️ Example 3 — Sorting matrices into classes
Classify each matrix as Hermitian, skew-Hermitian, unitary, normal, or none of these, and find its eigenvalues: $$H=\begin{pmatrix}3&2i\\-2i&0\end{pmatrix},\quad K=\begin{pmatrix}2i&1\\-1&0\end{pmatrix},\quad U=\frac15\begin{pmatrix}3&4i\\4i&3\end{pmatrix},$$ $$N=\begin{pmatrix}2&-3\\3&2\end{pmatrix},\qquad J=\begin{pmatrix}1&2\\0&3\end{pmatrix}.$$
$H$ Real diagonal and $\overline{2i}=-2i$ in the mirror position: Hermitian. Trace $3$, determinant $0-(2i)(-2i)=-4$, so $\lambda^2-3\lambda-4=0$: $\lambda=4,-1$, real as Theorem 3.34 predicts.
$K$ $K^*$ $=\begin{pmatrix}-2i&-1\\1&0\end{pmatrix}$ $=-K$: skew-Hermitian. $\lambda^2-2i\lambda+1=0$ gives $\lambda$ $=i\pm i\sqrt2$ $=i(1\pm\sqrt2)$, purely imaginary.
$U$ Columns $\tfrac15(3,4i)$ and $\tfrac15(4i,3)$ have norm $\sqrt{9+16}/5=1$ and $\langle u_2,u_1\rangle$ $=\tfrac1{25}\left(4i\cdot3+3\cdot\overline{4i}\right)$ $=0$: unitary. It is complex symmetric but not Hermitian. Eigenvalues $\tfrac{3\pm4i}5$, of modulus $1$ (eigenvectors $(1,\pm1)$).
$N$ $N^{\mathsf T}N$ $=NN^{\mathsf T}$ $=13I$: normal; but $N^{\mathsf T}\ne\pm N$ and $N^{\mathsf T}N\ne I$. Eigenvalues $2\pm3i$. ($N/\sqrt{13}$ is a rotation.)
$J$ $J^{\mathsf T}J$ $=\begin{pmatrix}1&2\\2&13\end{pmatrix}$ $\ne JJ^{\mathsf T}$ $=\begin{pmatrix}5&6\\6&9\end{pmatrix}$: not normal, so none of the classes. It has real distinct eigenvalues $1,3$ and is diagonalisable, but its eigenvectors $(1,0)$ and $(1,1)$ are not orthogonal: real eigenvalues do not make a matrix symmetric.

Unitary Diagonalisation: Schur and the Spectral Theorem

A matrix $A$ is unitarily diagonalisable if $U^*AU$ is diagonal for some unitary $U$ — equivalently, if $\mathbb{C}^n$ has an orthonormal basis of eigenvectors of $A$ (the columns of $U$). It is orthogonally diagonalisable if this can be done with a real orthogonal $Q$. Every matrix can at least be triangularised unitarily.

📐 Theorem 3.35 — Schur's triangularisation theorem
Every $A\in M_n(\mathbb{C})$ is unitarily similar to an upper triangular matrix: $A=UTU^*$ with $U$ unitary and $T$ upper triangular, and the diagonal of $T$ lists the eigenvalues of $A$ with algebraic multiplicity. If $A$ is real and all its eigenvalues are real, $U$ can be chosen real orthogonal.

Proof. Induction on $n$; $n=1$ is trivial. Pick an eigenvalue $\lambda_1$ (one exists by the fundamental theorem of algebra) and a unit eigenvector $u_1$, and extend it to an ONB $u_1,\dots,u_n$ of $\mathbb{C}^n$ (Theorem 3.31). With $U_1=[u_1\ \cdots\ u_n]$, the first column of $U_1^*AU_1$ is $U_1^*Au_1$ $=\lambda_1U_1^*u_1$ $=\lambda_1e_1$, so

$$U_1^*AU_1=\begin{pmatrix}\lambda_1&*\\0&A_1\end{pmatrix},\qquad A_1\in M_{n-1}(\mathbb{C}).$$

By induction $A_1=VT_1V^*$ with $V$ unitary and $T_1$ upper triangular; then $U$ $=U_1\begin{pmatrix}1&0\\0&V\end{pmatrix}$ is unitary and $U^*AU$ $=\begin{pmatrix}\lambda_1&*\\0&T_1\end{pmatrix}$ is upper triangular. Similar matrices have the same characteristic polynomial, which for $T$ is $\prod(t-t_{ii})$. In the real case choose a real eigenvector for the real eigenvalue $\lambda_1$, run Gram–Schmidt in $\mathbb{R}^n$, and note that $A_1$ again has only real eigenvalues (the characteristic polynomial of $A$ is $(t-\lambda_1)$ times that of $A_1$). ∎

📐 Theorem 3.36 — Basic properties of normal matrices
Let $A$ be normal. (a) $\|Ax\|=\|A^*x\|$ for every $x$. (b) $Ax=\lambda x$ if and only if $A^*x=\bar\lambda x$: $A$ and $A^*$ have the same eigenvectors, with conjugate eigenvalues. (c) Eigenvectors of $A$ for distinct eigenvalues are orthogonal. (d) A normal upper triangular matrix is diagonal.

Proof. (a) $\|Ax\|^2$ $=\langle A^*Ax,x\rangle$ $=\langle AA^*x,x\rangle$ $=\|A^*x\|^2$. (b) $A-\lambda I$ is normal too (both products equal $A^*A-\lambda A^*-\bar\lambda A+|\lambda|^2I$), and its adjoint is $A^*-\bar\lambda I$; apply (a) to it. (c) If $Ax=\lambda x$ and $Ay=\mu y$, then by (b) $\lambda\langle x,y\rangle$ $=\langle Ax,y\rangle$ $=\langle x,A^*y\rangle$ $=\langle x,\bar\mu y\rangle$ $=\mu\langle x,y\rangle$. (d) Let $T$ be upper triangular and normal. Compare the $(1,1)$ entries of $T^*T$ and $TT^*$: they are $|t_{11}|^2$ and $\sum_j|t_{1j}|^2$. Hence $t_{1j}=0$ for $j\ge2$, so $T$ $=\operatorname{diag}(t_{11},T')$ with $T'$ upper triangular and normal, and induction finishes. ∎

📐 Theorem 3.37 — The spectral theorem (unitary diagonalisation of normal matrices)

A matrix $A\in M_n(\mathbb{C})$ is unitarily diagonalisable if and only if it is normal. In that case

$$A=UDU^*=\sum_{j}\lambda_jP_j,$$

where $U$ is unitary, $D$ $=\operatorname{diag}(\lambda_1,\dots,\lambda_n)$, and in the second form $\lambda_j$ runs over the distinct eigenvalues and $P_j$ is the orthogonal projection onto the eigenspace of $\lambda_j$ ($P_j^2=P_j=P_j^*$, $P_jP_k=0$ for $j\ne k$, $\sum_jP_j=I$). For every polynomial $f$ (and, by definition, every function on the spectrum), $f(A)$ $=Uf(D)U^*$ $=\sum_jf(\lambda_j)P_j$.

Proof. If $A=UDU^*$, then $A^*A=UD^*DU^*=UDD^*U^*=AA^*$ because diagonal matrices commute. Conversely, let $A$ be normal and write $A=UTU^*$ by Schur's theorem. Then $T=U^*AU$ is normal ($T^*T=U^*A^*AU=U^*AA^*U=TT^*$) and upper triangular, hence diagonal by Theorem 3.36(d). The columns of $U$ are orthonormal eigenvectors; grouping those for each distinct eigenvalue $\lambda_j$ into $U_j$ gives $P_j=U_jU_j^*$ and $A=\sum\lambda_jP_j$. Finally $A^k=UD^kU^*$, and linear combinations give $f(A)$. ∎

📐 Theorem 3.38 — The real spectral theorem (principal axes theorem)
A real matrix $A$ is orthogonally diagonalisable, $A=QDQ^{\mathsf T}$ with $Q$ real orthogonal and $D$ real diagonal, if and only if $A$ is symmetric. Equivalently: a real $n\times n$ matrix is symmetric iff $\mathbb{R}^n$ has an orthonormal basis of eigenvectors of it.

Proof. If $A=QDQ^{\mathsf T}$ then $A^{\mathsf T}$ $=QD^{\mathsf T}Q^{\mathsf T}$ $=A$. Conversely, a real symmetric matrix has only real eigenvalues (Theorem 3.34), so the real form of Schur's theorem gives $Q^{\mathsf T}AQ=T$ real upper triangular; but $T^{\mathsf T}$ $=Q^{\mathsf T}A^{\mathsf T}Q$ $=T$, and a symmetric triangular matrix is diagonal. ∎

A real normal matrix that is not symmetric, such as the rotation $\begin{pmatrix}0&-1\\1&0\end{pmatrix}$, is unitarily diagonalisable (eigenvalues $\pm i$, eigenvectors $(1,\mp i)$) but not orthogonally: it has no real eigenvectors at all. The best one can do over $\mathbb{R}$ is block-diagonal form with $2\times2$ blocks $\begin{pmatrix}a&-b\\b&a\end{pmatrix}$ (a statement we do not prove here).

📐 Theorem 3.39 — Reading the class of a normal matrix from its spectrum; Schur's inequality

Let $A$ be normal with eigenvalues $\lambda_1,\dots,\lambda_n$. Then $A$ is Hermitian $\Leftrightarrow$ every $\lambda_j\in\mathbb{R}$; skew-Hermitian $\Leftrightarrow$ every $\lambda_j\in i\mathbb{R}$; unitary $\Leftrightarrow$ every $|\lambda_j|=1$; an orthogonal projection ($A^2=A$) $\Leftrightarrow$ every $\lambda_j\in\{0,1\}$; nilpotent $\Leftrightarrow$ $A=0$. For every $A\in M_n(\mathbb{C})$ (Schur's inequality)

$$\sum_{j=1}^n|\lambda_j|^2\le\sum_{i,j}|a_{ij}|^2=\operatorname{tr}(A^*A),$$

with equality if and only if $A$ is normal.

Proof. With $A=UDU^*$ we have $A^*=U\bar DU^*$, $A^*A=U|D|^2U^*$ and $A^2=UD^2U^*$; so $A^*=A$ iff $\bar D=D$, $A^*=-A$ iff $\bar D=-D$, $A^*A=I$ iff $|D|^2=I$, $A^2=A$ iff $D^2=D$, and $A^k=0$ iff $D^k=0$ iff $D=0$. For the inequality write $A=UTU^*$ (Schur). The trace is a similarity invariant and $A^*A=U(T^*T)U^*$, so

$$\begin{aligned}\operatorname{tr}(A^*A)&=\operatorname{tr}(T^*T)=\sum_{i\le j}|t_{ij}|^2\\&\ge\sum_i|t_{ii}|^2=\sum_j|\lambda_j|^2,\end{aligned}$$

with equality iff $T$ is diagonal; and $T$ diagonal implies $A$ normal, while $A$ normal implies $T$ normal, hence diagonal. ∎

Without normality every one of these equivalences fails: $\begin{pmatrix}1&1\\0&1\end{pmatrix}$ has only the eigenvalue $1$ but is not unitary; $\begin{pmatrix}0&1\\0&0\end{pmatrix}$ is nilpotent and nonzero; $J$ of Example 3 has real eigenvalues and is not Hermitian. Schur's inequality is a quick normality test: for $J$, $\sum|a_{ij}|^2=14\gt1+9$.

🧭 Orthogonal or unitary diagonalisation — GATE routine
  1. Check the hypothesis: real symmetric (orthogonal $Q$), or normal (unitary $U$). If the matrix is not normal, no unitary $U$ exists, however nice the eigenvalues.
  2. Find the eigenvalues. Use $\operatorname{tr}A$ $=\sum\lambda$, $\det A=\prod\lambda$, and obvious eigenvectors such as $(1,\dots,1)$ for constant row sums.
  3. For each eigenvalue find a basis of the eigenspace. Eigenspaces of different eigenvalues are automatically orthogonal (Theorem 3.36): you only need Gram–Schmidt inside a repeated eigenspace. In $\mathbb{R}^3$, a $2$-dimensional eigenspace is the plane orthogonal to the third eigenvector.
  4. Normalise and place the vectors as the columns of $Q$ or $U$, in the order of the eigenvalues in $D$. Then $A=QDQ^{\mathsf T}$, $A^k=QD^kQ^{\mathsf T}$, $A^{-1}=QD^{-1}Q^{\mathsf T}$; or use projections: $A=\sum\lambda_jP_j$, with $P=uu^*$ for a unit eigenvector $u$ of a simple eigenvalue and $I-P$ for the complementary eigenspace.
✏️ Example 4 — A repeated eigenvalue, powers and an inverse
Let $A$ $=\begin{pmatrix}3&1&1\\1&3&-1\\1&-1&3\end{pmatrix}$. (a) Find an orthogonal $Q$ with $Q^{\mathsf T}AQ$ diagonal. (b) Find closed forms for $A^n$ and $A^{-1}$, and the maximum and minimum of $x^{\mathsf T}Ax$ on the unit sphere.
Eigenvalues Try $u=(1,-1,-1)$: $Au$ $=(3-1-1,\ 1-3+1,\ 1+1-3)$ $=(1,-1,-1)$, so $1$ is an eigenvalue. The trace is $9$ and $\det A$ $=3\cdot8-1\cdot4+1\cdot(-4)$ $=16$, so the other two eigenvalues have sum $8$ and product $16$: both are $4$.
Eigenspace of 4 It is $u^\perp=\{x-y-z=0\}$ (Theorem 3.36(c)), with basis $(1,1,0)$, $(1,0,1)$. Gram–Schmidt: $e_2=\tfrac1{\sqrt2}(1,1,0)$; $(1,0,1)-\tfrac12(1,1,0)$ $=\tfrac12(1,-1,2)$, so $e_3=\tfrac1{\sqrt6}(1,-1,2)$.
(a) $Q$ $=\left[\tfrac1{\sqrt3}(1,-1,-1)\ \ \tfrac1{\sqrt2}(1,1,0)\ \ \tfrac1{\sqrt6}(1,-1,2)\right]$ (columns) gives $Q^{\mathsf T}AQ$ $=\operatorname{diag}(1,4,4)$.
(b) With $P=\tfrac13uu^{\mathsf T}$ (projection onto the $1$-eigenline), $A$ $=1\cdot P+4(I-P)$ $=4I-uu^{\mathsf T}$ (check: $uu^{\mathsf T}$ has diagonal $1,1,1$ and off-diagonal $-1,-1,1$). So $A^n$ $=P+4^n(I-P)$ $=4^nI-\tfrac{4^n-1}{3}uu^{\mathsf T}$ and $A^{-1}$ $=P+\tfrac14(I-P)$ $=\tfrac14\left(I+uu^{\mathsf T}\right)$. On the unit sphere $x^{\mathsf T}Ax$ ranges over $[1,4]$ (Theorem 3.46): minimum $1$ at $\pm u/\sqrt3$, maximum $4$ on the whole great circle $u^\perp\cap S^2$.
Check $n=1$: $4I-uu^{\mathsf T}=A$ ✓. And $A\cdot\tfrac14(I+uu^{\mathsf T})$ $=\tfrac14(4I-uu^{\mathsf T})(I+uu^{\mathsf T})$ $=\tfrac14\left(4I+3uu^{\mathsf T}-u(u^{\mathsf T}u)u^{\mathsf T}\right)$ $=I$, since $u^{\mathsf T}u=3$ ✓.
✏️ Example 5 — A normal matrix that is not Hermitian; four statements
(a) Show that $M$ $=\begin{pmatrix}2&i\\i&2\end{pmatrix}$ is normal but neither Hermitian nor skew-Hermitian, and unitarily diagonalise it. (b) Prove or disprove, for $A,B\in M_n(\mathbb{C})$: (i) if $A$ is normal and $A^2=A$, then $A$ is Hermitian; (ii) if $A$ is normal and nilpotent, then $A=0$; (iii) if $A$ and $B$ are normal, so is $A+B$; (iv) if $A$ is diagonalisable and all its eigenvalues are real, then $A$ is Hermitian.
(a) $M^*$ $=\begin{pmatrix}2&-i\\-i&2\end{pmatrix}$ $\ne\pm M$, and $MM^*=M^*M=5I$: normal (indeed $M/\sqrt5$ is unitary). $M(1,1)=(2+i)(1,1)$ and $M(1,-1)=(2-i)(1,-1)$, so $U$ $=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ gives $U^*MU$ $=\operatorname{diag}(2+i,\,2-i)$. A real orthogonal matrix diagonalises this complex matrix; the eigenvalues are not real, which is why $M$ is not Hermitian (Theorem 3.39).
(i) True By Theorem 3.39 the eigenvalues lie in $\{0,1\}\subset\mathbb{R}$, so $A$ is Hermitian: an idempotent normal matrix is an orthogonal projection. (Without normality, $\begin{pmatrix}1&1\\0&0\end{pmatrix}$ is idempotent and not Hermitian.)
(ii) True All eigenvalues of a nilpotent matrix are $0$, so $A=U0U^*=0$.
(iii) False $A$ $=\begin{pmatrix}0&1\\1&0\end{pmatrix}$ (symmetric) and $B$ $=\begin{pmatrix}0&1\\-1&0\end{pmatrix}$ (skew-symmetric) are normal, but $A+B$ $=\begin{pmatrix}0&2\\0&0\end{pmatrix}$ is nilpotent and nonzero, hence not normal by (ii).
(iv) False $J$ $=\begin{pmatrix}1&2\\0&3\end{pmatrix}$ of Example 3. The true statement needs unitary diagonalisability (i.e. normality) plus real eigenvalues.

Bilinear and Quadratic Forms; Sylvester's Law of Inertia

From here on the scalars are real unless we say otherwise. A quadratic form is a homogeneous polynomial of degree $2$, such as the second-order part of a Taylor expansion; it is the restriction to the diagonal $x=y$ of a symmetric bilinear form, and both are encoded by a symmetric matrix.

📘 Definition 3.17 — Bilinear and quadratic forms; congruence

A bilinear form on a real vector space $V$ is a map $B:V\times V\to\mathbb{R}$ linear in each variable; it is symmetric if $B(x,y)=B(y,x)$ and skew-symmetric if $B(x,y)=-B(y,x)$. Its matrix in a basis $v_1,\dots,v_n$ is $M=\big(B(v_i,v_j)\big)$, so that $B(x,y)=[x]^{\mathsf T}M[y]$ in coordinates. A quadratic form is $q(x)=B(x,x)$ for a symmetric bilinear $B$. On $\mathbb{R}^n$:

$$q(x)=x^{\mathsf T}Ax=\sum_ia_{ii}x_i^2+2\sum_{i\lt j}a_{ij}x_ix_j,\qquad A=A^{\mathsf T}.$$

So the coefficient of $x_ix_j$ ($i\ne j$) is twice the matrix entry: cross terms are halved when they go into $A$. The rank of $q$ is $\operatorname{rank}A$. Two symmetric matrices are congruent if $A'=P^{\mathsf T}AP$ for some invertible $P$.

📐 Theorem 3.40 — Forms and matrices
  1. (Change of variables) If $x=Px'$ with $P$ invertible (a change of basis), the matrix of $q$ becomes $P^{\mathsf T}AP$. Congruent matrices have the same rank, and $\det(P^{\mathsf T}AP)$ $=(\det P)^2\det A$ has the same sign as $\det A$.
  2. (Polarisation) $B(x,y)$ $=\tfrac12\big(q(x+y)-q(x)-q(y)\big)$: a quadratic form determines its symmetric bilinear form, and $q\leftrightarrow B\leftrightarrow A$ are one-to-one correspondences.
  3. Every bilinear form is uniquely the sum of a symmetric and a skew-symmetric one, $M$ $=\tfrac12(M+M^{\mathsf T})+\tfrac12(M-M^{\mathsf T})$, and $x^{\mathsf T}Mx$ $=x^{\mathsf T}\tfrac12(M+M^{\mathsf T})x$. On an $n$-dimensional space the bilinear forms form a space of dimension $n^2$, the symmetric ones $\tfrac{n(n+1)}2$, the skew-symmetric ones $\tfrac{n(n-1)}2$.

Proof. (1) $q(Px')$ $=x'^{\mathsf T}(P^{\mathsf T}AP)x'$; multiplying by invertible matrices does not change rank. (2) Expand $B(x+y,x+y)$ $=q(x)+2B(x,y)+q(y)$ using symmetry. (3) The two parts are symmetric and skew-symmetric, and uniqueness holds because a matrix that is both is $0$; a skew-symmetric $S$ has $x^{\mathsf T}Sx$ $=(x^{\mathsf T}Sx)^{\mathsf T}$ $=-x^{\mathsf T}Sx$, so $x^{\mathsf T}Sx=0$. The dimensions count the free entries: all $n^2$; those on or above the diagonal; those strictly above it. ∎

📐 Theorem 3.41 — Diagonalising a quadratic form
Every real symmetric matrix is congruent to a diagonal matrix. Concretely: (a) principal axes: with $A=QDQ^{\mathsf T}$ (Theorem 3.38) and $y=Q^{\mathsf T}x$, $q$ $=\lambda_1y_1^2+\cdots+\lambda_ny_n^2$, the $\lambda_i$ being the eigenvalues; (b) Lagrange's reduction (completing squares) gives $q=d_1z_1^2+\cdots+d_nz_n^2$ with $z=Px$ for an invertible, usually triangular, $P$ — the $d_i$ are generally not the eigenvalues; (c) rescaling $z_i\mapsto\sqrt{|d_i|}\,z_i$ gives $q$ $=w_1^2+\cdots+w_p^2-w_{p+1}^2-\cdots-w_r^2$, so $A$ is congruent to $\operatorname{diag}(I_p,-I_{r-p},0)$.

Proof. (a) is the real spectral theorem. (b) Induction on the number of variables. If some $a_{ii}\ne0$, say $a_{11}$, collect the terms containing $x_1$: $a_{11}x_1^2+2x_1L$ $=a_{11}\left(x_1+L/a_{11}\right)^2-L^2/a_{11}$, where $L$ is linear in $x_2,\dots,x_n$; put $z_1=x_1+L/a_{11}$ and repeat on the rest, a form in $x_2,\dots,x_n$. If every $a_{ii}=0$ but some $a_{ij}\ne0$, substitute $x_i=u+v$, $x_j=u-v$: then $2a_{ij}x_ix_j$ $=2a_{ij}(u^2-v^2)$ creates square terms. If $q=0$ there is nothing to do. (c) is immediate. ∎

📐 Theorem 3.42 — Sylvester's law of inertia
However a real quadratic form $q$ on $\mathbb{R}^n$ is written as $q=\sum_{i=1}^nd_iz_i^2$ by an invertible linear change of variables, the numbers $n_+$, $n_-$, $n_0$ of positive, negative and zero coefficients $d_i$ are always the same. In particular they equal the numbers of positive, negative and zero eigenvalues of $A$ (counted with multiplicity), and $n_0=n-\operatorname{rank}A$.

Proof. The rank is invariant (Theorem 3.40), so $n_++n_-$ and $n_0$ are fixed; it remains to show $n_+$ is. Suppose $q$ $=\sum_{i\le p}y_i^2-\sum_{p\lt i\le r}y_i^2$ and also $q$ $=\sum_{i\le p'}z_i^2-\sum_{p'\lt i\le r}z_i^2$ (after rescaling), with $p\gt p'$. Let $U$ $=\{x:y_{p+1}=\cdots=y_n=0\}$, of dimension $p$, on which $q(x)=\sum_{i\le p}y_i^2\gt0$ for $x\ne0$; and $W=\{x:z_1=\cdots=z_{p'}=0\}$, of dimension $n-p'$, on which $q\le0$. Since $p+(n-p')\gt n$, $U\cap W$ contains some $x\ne0$, and then $q(x)\gt0$ and $q(x)\le0$ at once — a contradiction. So $p\le p'$, and by symmetry $p=p'$. Taking the principal-axes diagonalisation identifies $n_+$, $n_-$ with the eigenvalue counts. ∎

📘 Definition 3.18 — Inertia, rank, index and signature
The triple $(n_+,n_-,n_0)$ is the inertia of $q$ (or of $A$). The rank is $r=n_++n_-$, the index (positive index) is $n_+$, and the signature is $s=n_+-n_-$. Rank and signature together determine the inertia: $n_+=\tfrac{r+s}2$, $n_-=\tfrac{r-s}2$. Conventions vary: some texts call the pair $(n_+,n_-)$ the signature. Read what a question means; the inertia triple is never ambiguous.
📐 Theorem 3.43 — Classification up to congruence
Two real symmetric $n\times n$ matrices are congruent if and only if they have the same inertia (equivalently, the same rank and signature); each class contains exactly one matrix $\operatorname{diag}(I_{n_+},-I_{n_-},0_{n_0})$. The number of congruence classes of real symmetric $n\times n$ matrices is $\dfrac{(n+1)(n+2)}{2}$, of which $n+1$ consist of invertible matrices.

Proof. Same inertia: both are congruent to the same $\operatorname{diag}(I_{n_+},-I_{n_-},0)$ (Theorem 3.41(c)), and congruence is an equivalence relation. Congruent: the same form in two coordinate systems, so the same inertia by Theorem 3.42. The classes correspond to triples of non-negative integers with $n_++n_-+n_0=n$; there are $\binom{n+2}{2}$ of them, and $n+1$ with $n_0=0$. ∎

Congruence is not similarity: $\operatorname{diag}(1,4)$ and $I_2$ are congruent (both have inertia $(2,0,0)$) but not similar (different eigenvalues). Congruence remembers only the signs of the eigenvalues. For real symmetric matrices, similar implies orthogonally similar (both are $QDQ^{\mathsf T}$ with the same $D$), which implies congruent.

🧭 Finding rank, inertia and signature quickly
  1. Write the symmetric matrix, halving cross terms.
  2. If the eigenvalues are easy (block structure, constant row sums, $J$-type matrices), count their signs.
  3. Otherwise complete squares (Lagrange); only the signs of the coefficients matter. A product of two independent linear forms is $\ell_1\ell_2$ $=\left(\tfrac{\ell_1+\ell_2}2\right)^2-\left(\tfrac{\ell_1-\ell_2}2\right)^2$: inertia $(1,1,n-2)$.
  4. Sign-counting shortcuts: $\det A\lt0$ means an odd number of negative eigenvalues; $\det A\gt0$ an even number; combine with the trace (e.g. $3\times3$ with $\det\lt0$ and $\operatorname{tr}\gt0$ has exactly one negative eigenvalue, since three negative ones would make the trace negative). A positive and a negative diagonal entry already force indefiniteness.
✏️ Example 6 — Completing squares, with and without square terms
Find the matrix, rank, inertia and signature of (a) $q=x^2+2xy-4xz+3y^2-2yz+2z^2$ and (b) $q=2xy+4yz$ on $\mathbb{R}^3$.
(a) Matrix $A$ $=\begin{pmatrix}1&1&-2\\1&3&-1\\-2&-1&2\end{pmatrix}$ (cross coefficients $2,-4,-2$ halved), $\det A$ $=1\cdot5-1\cdot0-2\cdot5$ $=-5$.
(a) Squares All terms with $x$: $x^2+2x(y-2z)$ $=(x+y-2z)^2-(y-2z)^2$. The rest is $3y^2-2yz+2z^2-(y^2-4yz+4z^2)$ $=2y^2+2yz-2z^2$ $=2\left(y+\tfrac z2\right)^2-\tfrac52z^2$. So $$q=(x+y-2z)^2+2\left(y+\tfrac z2\right)^2-\tfrac52z^2.$$
(a) Inertia Coefficients $1,2,-\tfrac52$: inertia $(2,1,0)$, rank $3$, signature $1$. Check: the product of the coefficients is $-5=\det A$ (the substitution is unit triangular), and the eigenvalues of $A$ are about $4.714$, $1.857$, $-0.571$ — different numbers, same signs.
(b) No square terms. $q=2y(x+2z)$ is a product of the independent linear forms $2y$ and $x+2z$, so $q$ $=\tfrac12\left[(x+y+2z)^2-(x-y+2z)^2\right]$: inertia $(1,1,1)$, rank $2$, signature $0$. Eigenvalue check: $A$ $=\begin{pmatrix}0&1&0\\1&0&2\\0&2&0\end{pmatrix}$ has characteristic polynomial $-\lambda(\lambda^2-5)$, eigenvalues $\sqrt5,-\sqrt5,0$ ✓.

Definiteness, Sylvester's Criterion and the Rayleigh Quotient

📘 Definition 3.19 — Definiteness
A real symmetric (or complex Hermitian) matrix $A$, and its form $q(x)=x^*Ax$, is positive definite if $x^*Ax\gt0$ for all $x\ne0$; positive semidefinite if $x^*Ax\ge0$ for all $x$; negative (semi)definite if $-A$ is positive (semi)definite; and indefinite if $x^*Ax$ takes both signs. In terms of inertia: positive definite means $n_+=n$; positive semidefinite means $n_-=0$; indefinite means $n_+\ge1$ and $n_-\ge1$. The $k$-th leading principal minor $\Delta_k$ is the determinant of the top-left $k\times k$ block $A_k$; a principal minor is the determinant of the submatrix on any set of rows $\{i_1,\dots,i_k\}$ and the same set of columns.
📐 Theorem 3.44 — Positive definite matrices; Sylvester's criterion

For a Hermitian (in particular, real symmetric) $n\times n$ matrix $A$ the following are equivalent:

  1. $A$ is positive definite;
  2. every eigenvalue of $A$ is positive;
  3. $A=B^*B$ for some invertible $B$;
  4. (Sylvester's criterion) $\Delta_1$ $\gt0,\ \Delta_2$ $\gt0,\ \dots,\ \Delta_n$ $\gt0$;
  5. $\langle x,y\rangle_A=y^*Ax$ is an inner product on $\mathbb{F}^n$.

Consequences: a positive definite $A$ has $a_{ii}\gt0$, $|a_{ij}|^2\lt a_{ii}a_{jj}$, $\det A\gt0$, every principal submatrix positive definite, $A^{-1}$ and $A^k$ positive definite, and a unique positive definite square root $A^{1/2}=UD^{1/2}U^*$. $A$ is negative definite iff $(-1)^k\Delta_k\gt0$ for all $k$ (signs $-,+,-,\dots$).

Proof. (1)$\Leftrightarrow$(2): write $A=UDU^*$ and $y=U^*x$ (so $y\ne0$ iff $x\ne0$); then $x^*Ax$ $=y^*Dy$ $=\sum_i\lambda_i|y_i|^2$, which is positive for all $y\ne0$ iff every $\lambda_i\gt0$. (2)$\Rightarrow$(3): $B=D^{1/2}U^*$. (3)$\Rightarrow$(1): $x^*B^*Bx=\|Bx\|^2\gt0$ for $x\ne0$. (1)$\Leftrightarrow$(5): linearity in the first slot is automatic, conjugate symmetry is $A^*=A$, and positivity is (1).

(1)$\Rightarrow$(4): for $x=(x',0)$ with $x'\in\mathbb{F}^k$ we get $x^*Ax=x'^*A_kx'$, so each $A_k$ is positive definite and $\Delta_k=\det A_k$, the product of its positive eigenvalues, is positive. (4)$\Rightarrow$(1): induction on $n$, the case $n=1$ being clear. By the induction hypothesis $A_{n-1}$ is positive definite. Suppose $A$ were not. Since $\det A=\Delta_n\gt0$ is the product of the eigenvalues, none is $0$ and an even number are negative — so at least two, with orthonormal eigenvectors $u,w$ and eigenvalues $\mu,\nu\lt0$. On $S$ $=\operatorname{span}\{u,w\}$, $q(au+bw)$ $=\mu|a|^2+\nu|b|^2$ $\lt0$ unless $a=b=0$. But $S$ (dimension $2$) and $H=\{x:x_n=0\}$ (dimension $n-1$) have $2+(n-1)\gt n$, so they share some $x\ne0$; for it $q(x)\lt0$ (as $x\in S$) while $q(x)=x'^*A_{n-1}x'\gt0$ (as $x\in H$). Contradiction. ∎

The consequences follow by restricting to coordinate subspaces ($a_{ii}=e_i^*Ae_i$; a $2\times2$ principal submatrix has positive determinant $a_{ii}a_{jj}-|a_{ij}|^2$), from the eigenvalues ($\lambda^{-1},\lambda^k\gt0$), and from the spectral theorem for the square root (uniqueness: a positive definite square root $S$ of $A$ commutes with $A=S^2$, so it preserves the eigenspaces of $A$, and on each of them it must act as $\sqrt\lambda$).

📐 Theorem 3.45 — Positive semidefinite matrices: all principal minors
For a Hermitian $A$ the following are equivalent: (a) $A$ is positive semidefinite; (b) every eigenvalue is $\ge0$; (c) $A=B^*B$ for some square matrix $B$; (d) every principal minor of $A$ (not only the leading ones) is $\ge0$.

Proof. (a)$\Leftrightarrow$(b)$\Leftrightarrow$(c) as in Theorem 3.44, with $\ge$ in place of $\gt$ and $B=D^{1/2}U^*$, now possibly singular. (a)$\Rightarrow$(d): a principal submatrix is the matrix of $q$ restricted to a coordinate subspace, hence positive semidefinite, and its determinant is a product of non-negative eigenvalues. (d)$\Rightarrow$(a): expanding the determinant, $\det(A_k+\varepsilon I_k)$ $=\varepsilon^k+c_1\varepsilon^{k-1}+\cdots+c_k$, where $c_j$ is the sum of the $j\times j$ principal minors of $A_k$, all $\ge0$ by hypothesis. So for every $\varepsilon\gt0$ all leading minors of $A+\varepsilon I$ are positive, $A+\varepsilon I$ is positive definite by Sylvester's criterion, and $x^*Ax$ $=\lim_{\varepsilon\to0^+}x^*(A+\varepsilon I)x$ $\ge0$. ∎

Leading minors are not enough for semidefiniteness: $\operatorname{diag}(0,-1)$ has $\Delta_1=\Delta_2=0$ yet is negative semidefinite (the principal minor $-1$ gives it away). And in Sylvester's criterion all the leading minors must be checked — Example 7 shows the last one can fail after the others pass.

📐 Theorem 3.46 — The Rayleigh quotient
Let $A$ be Hermitian with eigenvalues $\lambda_{\max}$ $=\lambda_1$ $\ge\cdots$ $\ge\lambda_n$ $=\lambda_{\min}$. For every $x\ne0$, the Rayleigh quotient satisfies $$\lambda_{\min}\le R_A(x)=\frac{x^*Ax}{x^*x}\le\lambda_{\max},$$ with equality on the right exactly for eigenvectors of $\lambda_{\max}$, and on the left for eigenvectors of $\lambda_{\min}$. Consequently every diagonal entry satisfies $\lambda_{\min}$ $\le a_{ii}$ $\le\lambda_{\max}$, and for any matrix $B$, $\max_{\|x\|=1}\|Bx\|$ $=\sqrt{\lambda_{\max}(B^*B)}$.

Proof. With $A=UDU^*$ and $y=U^*x$ (so $\|y\|=\|x\|$), $R_A(x)$ $=\sum_i\lambda_i|y_i|^2\big/\sum_i|y_i|^2$ is a weighted average of the eigenvalues with weights $|y_i|^2\ge0$. It equals $\lambda_{\max}$ iff all the weight sits on indices with $\lambda_i=\lambda_{\max}$, i.e. iff $x$ is in that eigenspace; similarly for $\lambda_{\min}$. Take $x=e_i$ for the diagonal entries, and apply the result to the positive semidefinite matrix $B^*B$, using $\|Bx\|^2=x^*B^*Bx$. ∎

(The real symmetric case was obtained in §1.2 by Lagrange multipliers: at a constrained extremum of $x^{\mathsf T}Ax$ on the sphere, $\nabla(x^{\mathsf T}Ax)=2Ax$ is parallel to $\nabla(x^{\mathsf T}x)=2x$, so $x$ is an eigenvector.) Geometrically, the principal axes theorem turns the level set $q=1$ into a standard conic or quadric.

📐 Theorem 3.47 — Central conics and quadrics

Let $A\ne0$ be real symmetric. In $\mathbb{R}^2$, with eigenvalues $\lambda_1\ge\lambda_2$, the curve $x^{\mathsf T}Ax=1$ is: an ellipse if $\lambda_2\gt0$, with semi-axes $1/\sqrt{\lambda_1}$ and $1/\sqrt{\lambda_2}$ along the eigenvectors and area $\pi/\sqrt{\det A}$; a hyperbola if $\lambda_1\gt0\gt\lambda_2$; a pair of parallel lines if $\lambda_1\gt0=\lambda_2$; empty if $\lambda_1\le0$. In $\mathbb{R}^3$ the surface $x^{\mathsf T}Ax=1$ is determined by the inertia:

$(3,0,0)$ ellipsoid$(2,1,0)$ hyperboloid of one sheet$(1,2,0)$ hyperboloid of two sheets
$(2,0,1)$ elliptic cylinder$(1,1,1)$ hyperbolic cylinder$(1,0,2)$ two parallel planes

and it is empty when $n_+=0$.

Proof. In the principal axes $y=Q^{\mathsf T}x$ (a rotation or reflection, which preserves shapes, lengths and areas) the equation is $\sum\lambda_iy_i^2=1$; read off each case. For the ellipse $\lambda_1y_1^2+\lambda_2y_2^2$ $=1$ the semi-axes are $a=1/\sqrt{\lambda_1}$, $b=1/\sqrt{\lambda_2}$ and the area is $\pi ab$ $=\pi/\sqrt{\lambda_1\lambda_2}$ $=\pi/\sqrt{\det A}$. ∎ (For $x^{\mathsf T}Ax=c$ with $c\gt0$, replace $A$ by $A/c$: the area becomes $\pi c/\sqrt{\det A}$.)

✏️ Example 7 — A parameter, Sylvester's criterion and the surface it gives
Let $A_k$ $=\begin{pmatrix}2&k&0\\k&2&k\\0&k&2\end{pmatrix}$, $k\in\mathbb{R}$. (a) For which $k$ is $A_k$ positive definite? (b) Find the inertia of $A_k$ for every $k$, and identify the surface $x^{\mathsf T}A_kx=1$ for $k=1$, $k=\sqrt2$ and $k=2$.
Minors $\Delta_1=2$, $\Delta_2=4-k^2$, $\Delta_3$ $=2(4-k^2)-k\cdot2k$ $=8-4k^2$.
(a) Positive definite iff $4-k^2\gt0$ and $8-4k^2\gt0$, i.e. iff $|k|\lt\sqrt2$. Notice the trap: for $\sqrt2\lt|k|\lt2$ the first two minors are positive (and the diagonal is positive), but $\Delta_3\lt0$.
Eigenvalues $A_k(1,0,-1)=2(1,0,-1)$, and $A_k(1,\pm\sqrt2,1)$ $=(2\pm\sqrt2k)(1,\pm\sqrt2,1)$. Eigenvalues $2$, $2+\sqrt2k$, $2-\sqrt2k$ — consistent with (a), and with $\Delta_3=2(4-2k^2)$ as their product.
(b) Inertia $|k|\lt\sqrt2$: $(3,0,0)$. $|k|=\sqrt2$: $(2,0,1)$, positive semidefinite, rank $2$. $|k|\gt\sqrt2$: exactly one eigenvalue ($2-\sqrt2|k|$) is negative: $(2,1,0)$, signature $1$.
Surfaces $k=1$: an ellipsoid, with semi-axes $1/\sqrt{2+\sqrt2},\ 1/\sqrt2,\ 1/\sqrt{2-\sqrt2}$. $k=\sqrt2$: eigenvalues $4,2,0$ — an elliptic cylinder whose axis is the null direction $(1,-\sqrt2,1)$. $k=2$: eigenvalues $2+2\sqrt2,\ 2,\ 2-2\sqrt2$ — a hyperboloid of one sheet.
⚠️ Counterexamples and pitfalls
  1. Complex symmetric is not Hermitian. $\tfrac15\begin{pmatrix}3&4i\\4i&3\end{pmatrix}$ is symmetric with non-real eigenvalues; $\begin{pmatrix}1&i\\i&-1\end{pmatrix}$ is symmetric, nonzero, and squares to $0$. The Hermitian facts need $A^*=A$, with the conjugate.
  2. No conjugate, no inner product on $\mathbb{C}^n$. $z_1w_1+z_2w_2$ gives $\langle(i,0),(i,0)\rangle$ $=-1$.
  3. Real eigenvalues $\not\Rightarrow$ symmetric; diagonalisable $\not\Rightarrow$ unitarily diagonalisable. $\begin{pmatrix}1&2\\0&3\end{pmatrix}$: real distinct eigenvalues, eigenvectors at $45^\circ$, not normal.
  4. All $|\lambda|=1$ $\not\Rightarrow$ unitary. $\begin{pmatrix}1&1\\0&1\end{pmatrix}$; even a diagonalisable one: $\begin{pmatrix}1&2\\0&-1\end{pmatrix}$ has eigenvalues $\pm1$ and a column of length $\sqrt5$.
  5. Sums and products leave the classes. Symmetric $+$ skew-symmetric $=\begin{pmatrix}0&2\\0&0\end{pmatrix}$, not normal; $\operatorname{diag}(1,2)\begin{pmatrix}0&1\\1&0\end{pmatrix}$ $=\begin{pmatrix}0&1\\2&0\end{pmatrix}$, a product of Hermitian matrices that is not Hermitian ($AB$ is Hermitian iff $AB=BA$). Unitary $+$ unitary: $I+I=2I$ is not unitary.
  6. Real normal $\not\Rightarrow$ orthogonally diagonalisable. The rotation $\begin{pmatrix}0&-1\\1&0\end{pmatrix}$ is orthogonal (so normal) with eigenvalues $\pm i$ and no real eigenvector.
  7. Use the symmetric part. For $A$ $=\begin{pmatrix}1&4\\0&1\end{pmatrix}$ the eigenvalues are $1,1$, yet $x^{\mathsf T}Ax$ $=x_1^2+4x_1x_2+x_2^2$ is indefinite (its matrix is $\begin{pmatrix}1&2\\2&1\end{pmatrix}$, eigenvalues $3,-1$). Halve the cross terms before testing anything.
  8. Positive diagonal and positive determinant $\not\Rightarrow$ positive definite ($n\ge3$): $\begin{pmatrix}1&2&2\\2&1&2\\2&2&1\end{pmatrix}$ has determinant $5$ and eigenvalues $5,-1,-1$. Check every leading minor ($\Delta_2=-3$ here).
  9. Leading minors $\ge0$ $\not\Rightarrow$ positive semidefinite. $\operatorname{diag}(0,-1)$. For semidefiniteness test all principal minors (Theorem 3.45) or the eigenvalues.
  10. Congruent $\not\Rightarrow$ similar. $\operatorname{diag}(1,4)$ and $I_2$. And equal rank and determinant $\not\Rightarrow$ congruent: $I_2$ and $-I_2$.
  11. Positive definite $A,B$ $\not\Rightarrow$ $AB$ positive definite. $AB$ need not be symmetric, and $x^{\mathsf T}ABx$ can be negative (Exercise V.3), although the eigenvalues of $AB$ are positive.
  12. Gram–Schmidt depends on the order and on the inner product. Vectors orthogonal for $\langle x,y\rangle_M$ need not look perpendicular (Interactive 1).
  13. "Signature" has two meanings in the literature ($n_+-n_-$ or the pair $(n_+,n_-)$). Here it is $n_+-n_-$.
📚 Go deeper — full proofs in the CSIR NET course

Two Labs

Interactive 1 — Gram–Schmidt, Step by Step, in Any Inner Product

Two vectors $v_1$ (blue) and $v_2$ (red) in the plane. Press Play (or Next step) to run Gram–Schmidt: normalise $v_1$, project $v_2$ onto it (amber), subtract to get $u_2$ (purple), normalise. The shaded curve is the unit circle $\{x:\langle x,x\rangle=1\}$ of the chosen inner product. Switch to $\langle x,y\rangle_M$ $=y^{\mathsf T}Mx$ and watch $e_1,e_2$ stop looking perpendicular — while remaining orthonormal for $M$.

⟨v₂, e₁⟩ (projection coefficient)—
‖u₂‖ = ‖v₂ − ⟨v₂, e₁⟩e₁‖—
⟨e₁, e₂⟩ in this inner product—
e₁ · e₂ (ordinary dot product)—
Interactive 2 — A Quadratic Form, Its Principal Axes and Its Rayleigh Quotient

Here $q(x,y)=ax^2+2bxy+cy^2$ with matrix $\begin{pmatrix}a&b\\b&c\end{pmatrix}$. Left: the level set $q=1$ (solid blue), $q=-1$ (dashed red), the eigen-axes (purple) and a unit vector $u$ turning round the circle. Right: $q(u)$ as $u=(\cos\theta,\sin\theta)$ turns — it always stays between the two eigenvalues and touches them on the eigen-axes. Move the sliders across $ac-b^2=0$ to see an ellipse open into parallel lines and then a hyperbola.

eigenvalues λ₁ ≥ λ₂—
Δ₁ = a, Δ₂ = ac − b²—
inertia (n₊, n₋, n₀); signature—
q(u) at the current θ—

Exercises

I
Inner products, orthogonality and Gram–Schmidt.
  • 1 Show that $\langle x,y\rangle$ $=3x_1y_1-x_1y_2-x_2y_1+x_2y_2$ is an inner product on $\mathbb{R}^2$, and find the angle between $e_1$ and $e_2$ for it.
  • 2 For which real $c$ is $\langle x,y\rangle$ $=x_1y_1+c(x_1y_2+x_2y_1)+4x_2y_2$ an inner product on $\mathbb{R}^2$?
  • 3 Apply Gram–Schmidt to $(1,1,1,1)$, $(1,1,0,0)$, $(1,0,1,0)$ in $\mathbb{R}^4$.
  • 4 On $P_2(\mathbb{R})$ with $\langle p,q\rangle$ $=\int_0^1p(x)q(x)\,dx$, orthonormalise $1,x,x^2$. Find the polynomial of degree at most $1$ closest to $x^2$, and the distance.
  • 5 Find the matrix of the orthogonal projection of $\mathbb{R}^3$ onto the plane $x-2y+2z=0$, and the distance from $(1,1,1)$ to the plane.
  • 6 In an inner product space, show that $\|x+y\|=\|x\|+\|y\|$ with $y\ne0$ implies $x=ty$ for some $t\ge0$.
  • 7 Prove the real polarisation identity $\langle x,y\rangle$ $=\tfrac14\left(\|x+y\|^2-\|x-y\|^2\right)$, and show that the norm $|x_1|+|x_2|$ on $\mathbb{R}^2$ does not come from any inner product.
  • 8 On $M_3(\mathbb{R})$ with $\langle A,B\rangle$ $=\operatorname{tr}(B^{\mathsf T}A)$, let $W$ be the subspace of matrices of trace $0$. Find $\dim W^\perp$ and describe $W^\perp$.
  • 9 Modelling. A cart starts at the origin and moves at constant speed $c$. Its measured positions at $t=1,2,3$ s are $2.1$, $3.9$, $6.2$ m. Find the least-squares estimate of $c$ as an orthogonal projection, the residual vector, and check that the residual is orthogonal to $(1,2,3)$.
1 Matrix $\begin{pmatrix}3&-1\\-1&1\end{pmatrix}$, symmetric, and $\langle x,x\rangle$ $=3x_1^2-2x_1x_2+x_2^2$ $=2x_1^2+(x_1-x_2)^2$ $\gt0$ for $x\ne0$. $\langle e_1,e_2\rangle=-1$, $\|e_1\|=\sqrt3$, $\|e_2\|=1$, so $\cos\theta=-\tfrac1{\sqrt3}$ and $\theta\approx125.26^\circ$.
2 Need $\begin{pmatrix}1&c\\c&4\end{pmatrix}$ positive definite: $\Delta_1=1\gt0$, $\Delta_2=4-c^2\gt0$, i.e. $|c|\lt2$.
3 $e_1=\tfrac12(1,1,1,1)$; $u_2$ $=(1,1,0,0)-\tfrac12(1,1,1,1)$ $=\tfrac12(1,1,-1,-1)$, $e_2=\tfrac12(1,1,-1,-1)$; $\langle v_3,u_2\rangle=0$, so $u_3$ $=(1,0,1,0)-\tfrac12(1,1,1,1)$ $=\tfrac12(1,-1,1,-1)$, $e_3=\tfrac12(1,-1,1,-1)$.
4 $e_1=1$; $u_2=x-\tfrac12$, $\|u_2\|^2=\tfrac1{12}$, $e_2=\sqrt3(2x-1)$; $u_3$ $=x^2-\tfrac13-\left(x-\tfrac12\right)$ $=x^2-x+\tfrac16$, $\|u_3\|^2=\tfrac1{180}$, $e_3=\sqrt5(6x^2-6x+1)$. Best approximation $\tfrac13+\left(x-\tfrac12\right)$ $=x-\tfrac16$; distance $\|u_3\|$ $=\tfrac1{6\sqrt5}$ $=\tfrac{\sqrt5}{30}$ $\approx0.0745$.
5 With $n=(1,-2,2)$, $\|n\|=3$: $P$ $=I-\tfrac19nn^{\mathsf T}$ $=\tfrac19\begin{pmatrix}8&2&-2\\2&5&4\\-2&4&5\end{pmatrix}$. Distance $|\langle(1,1,1),n\rangle|/\|n\|$ $=\tfrac13$.
6 Squaring, $\operatorname{Re}\langle x,y\rangle$ $=\|x\|\|y\|$ $\ge|\langle x,y\rangle|$, so equality holds in Cauchy–Schwarz and $\langle x,y\rangle$ is real and $\ge0$. By Theorem 3.29, $x=ty$ with $t$ $=\langle x,y\rangle/\|y\|^2$ $\ge0$.
7 Expand: $\|x\pm y\|^2$ $=\|x\|^2\pm2\langle x,y\rangle+\|y\|^2$ and subtract. A norm from an inner product satisfies the parallelogram law $\|x+y\|^2+\|x-y\|^2$ $=2\|x\|^2+2\|y\|^2$ (add the two expansions). For $x=e_1$, $y=e_2$ and $|x_1|+|x_2|$: left side $4+4=8$, right side $2+2=4$.
8 $\langle A,I\rangle$ $=\operatorname{tr}A$, so $I\perp W$. $\dim W=8$ (the trace is a nonzero linear functional on a $9$-dimensional space), so $\dim W^\perp=1$ and $W^\perp$ $=\operatorname{span}\{I\}$: the scalar matrices.
9 Project $y=(2.1,3.9,6.2)$ onto $t=(1,2,3)$: $c$ $=\dfrac{\langle y,t\rangle}{\langle t,t\rangle}$ $=\dfrac{28.5}{14}$ $\approx2.036$ m/s. Residual $y-ct$ $\approx(0.064,\,-0.171,\,0.093)$ m, with sum of squares $\approx0.042\ \text{m}^2$; $\langle y-ct,t\rangle$ $\approx0.064-0.343+0.279$ $=0$ ✓ (exactly $0$ by construction).
II
Special matrices and their eigenvalues.
  • 1 Show that $\begin{pmatrix}0&1+i\\-1+i&0\end{pmatrix}$ is skew-Hermitian and find its eigenvalues.
  • 2 Show that every $A\in M_n(\mathbb{C})$ is uniquely $H+iK$ with $H,K$ Hermitian, and find $H$, $K$ for $A$ $=\begin{pmatrix}1&2\\0&i\end{pmatrix}$.
  • 3 (Cayley transform) Let $S$ be real skew-symmetric. Show that $I+S$ is invertible and $Q=(I-S)(I+S)^{-1}$ is orthogonal. Compute $Q$ for $S$ $=\begin{pmatrix}0&1\\-1&0\end{pmatrix}$.
  • 4 Prove that a real skew-symmetric matrix of odd order is singular, and give an invertible $2\times2$ real skew-symmetric matrix.
  • 5 Let $Q$ be a $3\times3$ real orthogonal matrix with $\det Q=-1$. Prove that $-1$ is an eigenvalue of $Q$.
  • 6 Show that $R$ $=\tfrac13\begin{pmatrix}2&-1&2\\2&2&-1\\-1&2&2\end{pmatrix}$ is a rotation, and find its axis and angle.
  • 7 Show that a matrix that is both unitary and Hermitian satisfies $U^2=I$ and has eigenvalues in $\{1,-1\}$; give one that is not $\pm I$.
  • 8 Prove that a Hermitian $A$ with $A^2=0$ is $0$. Is the same true for complex symmetric matrices?
1 $A^*$ $=\begin{pmatrix}0&-1-i\\1-i&0\end{pmatrix}$ $=-A$. $\det A=-(1+i)(-1+i)=2$ and $\operatorname{tr}A=0$, so $\lambda^2+2=0$: $\lambda=\pm i\sqrt2$.
2 If $A=H+iK$ then $A^*=H-iK$, which forces $H=\tfrac12(A+A^*)$, $K=\tfrac1{2i}(A-A^*)$; these are Hermitian. Here $H$ $=\begin{pmatrix}1&1\\1&0\end{pmatrix}$ and $K$ $=\begin{pmatrix}0&-i\\i&1\end{pmatrix}$; check $H+iK$ $=\begin{pmatrix}1&2\\0&i\end{pmatrix}$ ✓.
3 $I+S$ is invertible by Theorem 3.34(2). The factors $I-S$ and $(I+S)^{-1}$ commute (both are rational functions of $S$), and $Q^{\mathsf T}$ $=(I-S)^{-1}(I+S)$ (transpose using $S^{\mathsf T}=-S$), so $Q^{\mathsf T}Q$ $=(I-S)^{-1}(I+S)(I-S)(I+S)^{-1}$ $=I$. For the given $S$: $Q$ $=\begin{pmatrix}0&-1\\1&0\end{pmatrix}$, rotation by $90^\circ$.
4 $\det S$ $=\det S^{\mathsf T}$ $=\det(-S)$ $=(-1)^n\det S$, so $\det S=0$ for odd $n$. $\begin{pmatrix}0&1\\-1&0\end{pmatrix}$ has determinant $1$.
5 $\det(Q+I)$ $=\det(Q+QQ^{\mathsf T})$ $=\det Q\cdot\det(I+Q^{\mathsf T})$ $=-\det(I+Q)$, so $\det(Q+I)=0$.
6 The rows are orthonormal (e.g. $(2,-1,2)\cdot(2,2,-1)=0$, each has length $3$), and $\det R=1$: a rotation. $R(1,1,1)=(1,1,1)$, so the axis is $\operatorname{span}\{(1,1,1)\}$; $\operatorname{tr}R$ $=2$ $=1+2\cos\theta$ gives $\theta=\tfrac\pi3$.
7 $U^2=UU^*=I$. Eigenvalues are real (Hermitian) and of modulus $1$ (unitary), so $\pm1$. Example: $\begin{pmatrix}0&1\\1&0\end{pmatrix}$.
8 $0$ $=\operatorname{tr}(A^2)$ $=\operatorname{tr}(A^*A)$ $=\sum_{i,j}|a_{ij}|^2$, so $A=0$. False for complex symmetric matrices: $\begin{pmatrix}1&i\\i&-1\end{pmatrix}^2$ $=0$.
III
Orthogonal and unitary diagonalisation.
  • 1 Orthogonally diagonalise $\begin{pmatrix}7&-2\\-2&4\end{pmatrix}$.
  • 2 Orthogonally diagonalise $B$ $=\begin{pmatrix}1&0&2\\0&-1&0\\2&0&1\end{pmatrix}$ and compute $B^{10}$.
  • 3 Unitarily diagonalise the Hermitian matrix $\begin{pmatrix}1&i\\-i&1\end{pmatrix}$.
  • 4 Show that $\begin{pmatrix}3&1\\-1&3\end{pmatrix}$ is normal and unitarily diagonalise it. Is it orthogonally diagonalisable?
  • 5 For which real $a,b$ is $\begin{pmatrix}1&a\\b&2\end{pmatrix}$ normal?
  • 6 Prove that a normal matrix all of whose eigenvalues have modulus $1$ is unitary, and that a normal matrix is unitarily similar to a real diagonal matrix iff it is Hermitian.
  • 7 A $3\times3$ normal matrix has eigenvalues $1$, $2i$, $-2$. Find $\sum_{i,j}|a_{ij}|^2$. Compare $\sum|a_{ij}|^2$ with $\sum|\lambda_j|^2$ for $\begin{pmatrix}1&1\\0&1\end{pmatrix}$.
1 Trace $11$, determinant $24$: eigenvalues $3$ and $8$, with eigenvectors $(1,2)$ and $(2,-1)$. $Q$ $=\tfrac1{\sqrt5}\begin{pmatrix}1&2\\2&-1\end{pmatrix}$, $Q^{\mathsf T}AQ$ $=\operatorname{diag}(3,8)$.
2 The $(x,z)$ block $\begin{pmatrix}1&2\\2&1\end{pmatrix}$ gives $3$ on $(1,0,1)$ and $-1$ on $(1,0,-1)$; and $Be_2=-e_2$. $Q$ $=\left[\tfrac1{\sqrt2}(1,0,1)\ \ \tfrac1{\sqrt2}(1,0,-1)\ \ (0,1,0)\right]$, $D$ $=\operatorname{diag}(3,-1,-1)$. With $P$ the projection onto $(1,0,1)$, $B^{10}$ $=3^{10}P+(I-P)$ $=I+\tfrac{3^{10}-1}{2}\begin{pmatrix}1&0&1\\0&0&0\\1&0&1\end{pmatrix}$: diagonal entries $29525,\ 1,\ 29525$, entries $(1,3)=(3,1)=29524$, all others $0$.
3 Trace $2$, determinant $1-1=0$: eigenvalues $2$ (eigenvector $(1,-i)$) and $0$ (eigenvector $(1,i)$), orthogonal as promised. $U$ $=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\-i&i\end{pmatrix}$, $U^*AU$ $=\operatorname{diag}(2,0)$.
4 $A^{\mathsf T}A$ $=AA^{\mathsf T}$ $=10I$. Eigenvalues $3\pm i$ with eigenvectors $(1,\pm i)$; $U$ $=\tfrac1{\sqrt2}\begin{pmatrix}1&1\\i&-i\end{pmatrix}$, $U^*AU$ $=\operatorname{diag}(3+i,3-i)$. Not orthogonally diagonalisable: it is not symmetric (Theorem 3.38); its eigenvalues are not even real.
5 $A^{\mathsf T}A$ $=\begin{pmatrix}1+b^2&a+2b\\a+2b&a^2+4\end{pmatrix}$, $AA^{\mathsf T}$ $=\begin{pmatrix}1+a^2&b+2a\\b+2a&b^2+4\end{pmatrix}$. Equality needs $a^2=b^2$ and $a+2b=b+2a$, i.e. $a=b$: normal iff symmetric. (With equal diagonal entries the answer would also include $b=-a$.)
6 Both are cases of Theorem 3.39: $A=UDU^*$ with $|D|=I$ gives $A^*A=U|D|^2U^*=I$; and $UDU^*$ with $D$ real is Hermitian, while a Hermitian matrix is normal with real eigenvalues.
7 For normal $A$, $\sum|a_{ij}|^2$ $=\operatorname{tr}(A^*A)$ $=\sum|\lambda_j|^2$ $=1+4+4$ $=9$. For $\begin{pmatrix}1&1\\0&1\end{pmatrix}$: $3\gt2$ — strict inequality, confirming it is not normal.
IV
Bilinear and quadratic forms; definiteness.
  • 1 Write the matrix of $q=3x^2-2xy+4xz+y^2-6yz+5z^2$ and find its rank and inertia without computing eigenvalues.
  • 2 Reduce $x^2+6xy+5y^2$ to a sum of signed squares; find its rank, index and signature.
  • 3 Show that $x^2+2y^2+2z^2+2xy+2xz+2yz$ is positive definite in two ways: by completing squares and by Sylvester's criterion.
  • 4 Find the inertia and signature of $x_1x_2+x_2x_3+x_3x_4$ on $\mathbb{R}^4$.
  • 5 For which $k$ is $x^2+2y^2+z^2+2kxy+2yz$ positive definite?
  • 6 Let $\ell_1,\ell_2$ be linearly independent linear forms on $\mathbb{R}^n$. Show that $\ell_1^2$ is positive semidefinite of rank $1$ and that $\ell_1\ell_2$ has inertia $(1,1,n-2)$.
  • 7 How many congruence classes of real symmetric $3\times3$ matrices are there? How many consist of invertible matrices? List the classes of $2\times2$ matrices.
  • 8 Find the dimensions of the spaces of all, of symmetric, and of skew-symmetric bilinear forms on $\mathbb{R}^3$.
  • 9 Identify the conic $2x^2+4xy-y^2=6$ and find its principal axes.
1 $A$ $=\begin{pmatrix}3&-1&2\\-1&1&-3\\2&-3&5\end{pmatrix}$, $\det A$ $=3(5-9)+1(-5+6)+2(3-2)$ $=-9$ $\ne0$: rank $3$. $\det\lt0$ means $1$ or $3$ negative eigenvalues, and $\operatorname{tr}A=9\gt0$ rules out $3$: inertia $(2,1,0)$, signature $1$. (Numerically the eigenvalues are about $7.67$, $1.93$, $-0.61$.)
2 $(x+3y)^2-4y^2$: inertia $(1,1,0)$, rank $2$, index $1$, signature $0$.
3 $(x+y+z)^2+y^2+z^2$, which is $0$ only if $y=z=0$ and then $x=0$. Matrix $\begin{pmatrix}1&1&1\\1&2&1\\1&1&2\end{pmatrix}$: $\Delta_1=1$, $\Delta_2=1$, $\Delta_3=1$, all positive.
4 With $u=x_1+x_3$ (and $x_2,x_3,x_4,u$ independent), $q=x_2u+x_3x_4$ is a sum of two products of independent forms in separate variables: inertia $(2,2,0)$, signature $0$. Check: the matrix has eigenvalues $\cos\tfrac{k\pi}5$, $k=1,\dots,4$, i.e. $\pm0.809$, $\pm0.309$.
5 Matrix $\begin{pmatrix}1&k&0\\k&2&1\\0&1&1\end{pmatrix}$: $\Delta_1=1$, $\Delta_2=2-k^2$, $\Delta_3$ $=1\cdot(2-1)-k\cdot k$ $=1-k^2$. Positive definite iff $|k|\lt1$.
6 $\ell_1(x)^2\ge0$, and its matrix $aa^{\mathsf T}$ ($\ell_1=a^{\mathsf T}x$) has rank $1$. Extend $\ell_1,\ell_2$ to a basis $\ell_1,\dots,\ell_n$ of linear forms (new coordinates $z_i=\ell_i(x)$); then $\ell_1\ell_2=w_1^2-w_2^2$ with $w_{1,2}=\tfrac{z_1\pm z_2}2$, an invertible change of variables: inertia $(1,1,n-2)$.
7 $\tfrac{4\cdot5}2=10$ classes, $4$ invertible ($n_0=0$, $n_++n_-=3$). For $2\times2$: $\operatorname{diag}(1,1)$, $\operatorname{diag}(1,-1)$, $\operatorname{diag}(-1,-1)$, $\operatorname{diag}(1,0)$, $\operatorname{diag}(-1,0)$, $0$ — six classes.
8 $9$, $6$ and $3$ (Theorem 3.40(3)).
9 $A$ $=\begin{pmatrix}2&2\\2&-1\end{pmatrix}$: trace $1$, determinant $-6$, eigenvalues $3$ (eigenvector $(2,1)$) and $-2$ (eigenvector $(1,-2)$). In the rotated coordinates $3X^2-2Y^2=6$, i.e. $\tfrac{X^2}2-\tfrac{Y^2}3=1$: a hyperbola with transverse axis along $(2,1)$, vertices at distance $\sqrt2$ from the origin.
V
Prove or disprove.
  • 1 Every real square matrix all of whose eigenvalues are real is orthogonally similar to an upper triangular matrix.
  • 2 If $A$ is real symmetric and $A^3=I$, then $A=I$.
  • 3 If $A$ and $B$ are real symmetric positive definite, then $x^{\mathsf T}ABx\gt0$ for all $x\ne0$.
  • 4 If a real symmetric matrix has all its leading principal minors $\ge0$, it is positive semidefinite.
  • 5 Two real symmetric matrices with the same eigenvalues (with multiplicity) are orthogonally similar.
  • 6 Two real symmetric $n\times n$ matrices with the same rank and the same determinant are congruent.
1 True: the real form of Schur's theorem (Theorem 3.35).
2 True. $A=QDQ^{\mathsf T}$ with $D$ real and $D^3=I$; the only real cube root of $1$ is $1$, so $D=I$ and $A=I$. (False for non-symmetric matrices: a rotation by $120^\circ$.)
3 False. $A=\operatorname{diag}(1,9)$ and $B$ $=\begin{pmatrix}2&1\\1&1\end{pmatrix}$ are positive definite; $AB$ $=\begin{pmatrix}2&1\\9&9\end{pmatrix}$ and for $x=(2,-1)$, $ABx=(3,9)$, so $x^{\mathsf T}ABx=6-9=-3$. (The eigenvalues of $AB$, $\tfrac{11\pm\sqrt{85}}2$, are positive: $AB$ is similar to $A^{1/2}BA^{1/2}$.)
4 False: $\operatorname{diag}(0,-1)$.
5 True. $A=QDQ^{\mathsf T}$ and $B=RDR^{\mathsf T}$ with the same $D$, so $B$ $=(RQ^{\mathsf T})A(RQ^{\mathsf T})^{\mathsf T}$ with $RQ^{\mathsf T}$ orthogonal.
6 False: $I_2$ and $-I_2$ have rank $2$ and determinant $1$ but inertias $(2,0,0)$ and $(0,2,0)$.
🎯 GATE corner GATE MA · MCQGATE MA · MSQGATE MA · NAT

E1. GATE MA · MCQ Let $Q$ be a $3\times3$ real orthogonal matrix with $\det Q=1$ and $\operatorname{tr}Q=0$. The eigenvalues of $Q$ are (A) $1,\ i,\ -i$; (B) $1,\ -1,\ -1$; (C) $1,\ e^{2\pi i/3},\ e^{-2\pi i/3}$; (D) $1,\ e^{\pi i/3},\ e^{-\pi i/3}$.

Idea By Theorem 3.34(3), $1$ is an eigenvalue and $\operatorname{tr}Q$ $=1+2\cos\theta$. So $\cos\theta=-\tfrac12$, $\theta=\tfrac{2\pi}3$.
Check the others The traces of (A), (B), (D) are $1$, $-1$, $2$, not $0$.
Answer (C).

E2. GATE MA · MCQ The rank and signature of the quadratic form $q(x_1,x_2,x_3,x_4)$ $=x_1x_2+x_3x_4$ are (A) rank $2$, signature $0$; (B) rank $4$, signature $0$; (C) rank $4$, signature $2$; (D) rank $2$, signature $2$.

Idea $x_1x_2$ $=\left(\tfrac{x_1+x_2}2\right)^2-\left(\tfrac{x_1-x_2}2\right)^2$, and the same for $x_3x_4$, in separate variables.
Count Two plus and two minus squares: inertia $(2,2,0)$, rank $4$, signature $0$. (The matrix is block-diagonal with blocks $\tfrac12\begin{pmatrix}0&1\\1&0\end{pmatrix}$, eigenvalues $\pm\tfrac12$ twice.)
Answer (B).

E3. GATE MA · MSQ Let $A\in M_n(\mathbb{C})$ be normal. Which of the following is/are necessarily true? (One or more options may be correct.) (A) If every eigenvalue of $A$ is real, then $A$ is Hermitian. (B) $\|Ax\|=\|A^*x\|$ for every $x\in\mathbb{C}^n$. (C) If $A^3=0$, then $A=0$. (D) If $A$ has real entries, then $A$ is diagonalisable over $\mathbb{R}$.

(A) True $A=UDU^*$ with $D$ real, so $A^*=U\bar DU^*=A$ (Theorem 3.39).
(B) True Theorem 3.36(a): $\|Ax\|^2$ $=\langle A^*Ax,x\rangle$ $=\langle AA^*x,x\rangle$ $=\|A^*x\|^2$.
(C) True A nilpotent normal matrix has $D=0$, hence $A=0$.
(D) False The rotation $\begin{pmatrix}0&-1\\1&0\end{pmatrix}$ is real and normal, with eigenvalues $\pm i$: not diagonalisable over $\mathbb{R}$.
Answer (A), (B) and (C).

E4. GATE MA · MSQ For $a\in\mathbb{R}$ let $M_a$ $=\begin{pmatrix}4&2&0\\2&a&1\\0&1&1\end{pmatrix}$. Which of the following is/are true? (One or more options may be correct.) (A) $M_3$ is positive definite. (B) $M_a$ is positive definite for every $a\gt1$. (C) $M_2$ is positive semidefinite and singular. (D) $M_0$ has exactly one negative eigenvalue.

Minors $\Delta_1=4$, $\Delta_2=4a-4$, $\Delta_3$ $=4(a-1)-2\cdot2$ $=4a-8$. Positive definite iff $a\gt2$.
(A) True, (B) False $a=3$: minors $4,8,4$. For $1\lt a\lt2$, e.g. $a=1.5$, $\Delta_3=-2\lt0$.
(C) True $a=2$: $\det=0$; the principal minors are $4,2,1$ ($1\times1$), $4,4,1$ ($2\times2$) and $0$, all $\ge0$, so $M_2$ is positive semidefinite by Theorem 3.45 (eigenvalues $0$, $\approx1.70$, $\approx5.30$).
(D) True $\det M_0=-8\lt0$: an odd number of negative eigenvalues; $\operatorname{tr}M_0=5\gt0$ excludes three. (Eigenvalues $\approx-1.22$, $1.35$, $4.87$.)
Answer (A), (C) and (D).

E5. GATE MA · NAT In $\mathbb{R}^4$ with the dot product, let $W$ $=\operatorname{span}\{(1,1,0,0),(0,1,1,1)\}$ and $b=(2,0,1,3)$. The square of the distance from $b$ to $W$ is ______ (correct to two decimal places).

Gram–Schmidt $u_1=(1,1,0,0)$, $\|u_1\|^2=2$; $u_2$ $=(0,1,1,1)-\tfrac12(1,1,0,0)$ $=\left(-\tfrac12,\tfrac12,1,1\right)$, $\|u_2\|^2=\tfrac52$.
Distance $\langle b,u_1\rangle=2$, $\langle b,u_2\rangle$ $=-1+0+1+3$ $=3$, $\|b\|^2=14$. By Theorem 3.32(2): $$\operatorname{dist}^2=14-\frac{2^2}{2}-\frac{3^2}{5/2}=14-2-3.6=8.4.$$
Answer $8.40$ (accept $8.39$ to $8.41$). (Check: $P_Wb$ $=\left(\tfrac25,\tfrac85,\tfrac65,\tfrac65\right)$ and $b-P_Wb=\tfrac15(8,-8,-1,9)$, of squared length $\tfrac{210}{25}=8.4$.)

E6. GATE MA · NAT The area of the region enclosed by the ellipse $5x^2+6xy+5y^2=8$ is ______ (correct to two decimal places).

Principal axes $A$ $=\begin{pmatrix}5&3\\3&5\end{pmatrix}$ has eigenvalues $8$ (on $(1,1)$) and $2$ (on $(1,-1)$). In rotated coordinates $8X^2+2Y^2=8$, i.e. $X^2+\tfrac{Y^2}4=1$: semi-axes $1$ and $2$.
Area $\pi\cdot1\cdot2=2\pi$; or by Theorem 3.47, $\pi c/\sqrt{\det A}$ $=8\pi/4$ $=2\pi$ $\approx6.2832$.
Answer $6.28$ (accept $6.27$ to $6.29$).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Inner products. Definition 3.14 with the four standard examples; Cauchy–Schwarz with the projection proof (draw $w=x-cy$). Theorems 3.30–3.32, stressing "coefficients are inner products". Example 1 on the board (the rational ONB is a pleasant surprise). Project Interactive 1 with the dot product, then switch to $M$ $=\begin{pmatrix}2&1\\1&1\end{pmatrix}$ and ask why $e_1,e_2$ no longer look perpendicular. Example 2 as a class exercise.
  2. Special matrices and the spectral theorem. The table of Definition 3.16 and the $z\mapsto\bar z$ analogy. Theorem 3.34 with the one-line proofs; Example 3. Schur's theorem (sketch the block step), Theorem 3.36(d) on the board for a $2\times2$ triangular matrix, then Theorems 3.37–3.39. Example 4 using projections; Example 5(b) as a quick-fire true/false round.
  3. Forms and definiteness. Definition 3.17 (insist on halving cross terms), Lagrange's reduction on Example 6, the law of inertia with the dimension-count proof. Sylvester's criterion with its proof; Example 7 and the $\sqrt2\lt|k|\lt2$ trap. Interactive 2: drive $(a,b,c)$ from an ellipse to a hyperbola, and stop $\theta$ on the eigen-axes. Finish with GATE corner E4 and E6.

Discussion questions. (1) Every real symmetric matrix is orthogonally diagonalisable, but the rotation by $90^\circ$ — which is orthogonal and normal — is not. What exactly does symmetry add in the proof? (2) Why does the law of inertia say nothing about the sizes of the coefficients $d_i$, and why is that the right answer for congruence? (3) The Gram–Schmidt vectors in Interactive 1 for $\langle\cdot,\cdot\rangle_M$ are "conjugate diameters" of the ellipse $x^{\mathsf T}Mx=1$. What does that mean, and how does it relate to $M=R^{\mathsf T}R$?

Misconceptions to watch for. Forgetting the conjugate (complex symmetric treated as Hermitian); believing real eigenvalues, or eigenvalues of modulus $1$, decide the class without normality; using the eigenvalues of a non-symmetric $A$ to judge $x^{\mathsf T}Ax$; not halving cross terms; checking only some leading minors, or only leading minors for semidefiniteness; confusing congruence with similarity; using Gram–Schmidt across different eigenvalues (unnecessary) but forgetting it inside a repeated eigenspace (necessary).

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

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

Research question. At what frequencies does a three-storey building sway in an earthquake, what do its vibration modes look like, and how well does a single guessed shape predict the lowest frequency?

Why it matters. Earthquake engineers in Japan, Chile, Nepal, Turkey and New Zealand design buildings so that their natural frequencies avoid the frequencies at which the ground shakes hardest. In the simplest "shear building" model, with floor masses $m$ and storey stiffness $k$, the floor displacements satisfy $m\,\ddot x+kTx=0$ with the symmetric matrix $T$ $=\begin{pmatrix}2&-1&0\\-1&2&-1\\0&-1&1\end{pmatrix}$. Each eigenvalue $\lambda$ of $T$ gives a natural angular frequency $\omega=\sqrt{\lambda k/m}$, and the spectral theorem guarantees three perpendicular mode shapes. When the floors have different masses the problem becomes $Tx=\lambda Mx$ with a positive definite mass matrix $M$, and the modes are orthogonal for the inner product $\langle x,y\rangle_M$ $=y^{\mathsf T}Mx$ instead.

What to do.

  1. Check with Sylvester's criterion that $T$ is positive definite (why must it be, physically?).
  2. Find the eigenvalues and orthonormal eigenvectors of $T$ numerically. With $k/m=1000\ \text{s}^{-2}$, convert to frequencies $f=\omega/2\pi$ in Hz and sketch the three mode shapes (floor displacement against floor number).
  3. The Rayleigh quotient $R(x)$ $=x^{\mathsf T}Tx/x^{\mathsf T}x$ is an upper bound for the smallest eigenvalue (Theorem 3.46). Evaluate it for the guess $x=(1,2,3)$ and compare the resulting frequency with the exact one.
  4. Now let the two lower floors be twice as heavy: $M$ $=\operatorname{diag}(2,2,1)$. Solve $Tx=\lambda Mx$ (for instance by symmetrising with $y=M^{1/2}x$), and verify that the modes are $M$-orthogonal but not orthogonal for the dot product.

Tools: Python with numpy/scipy (numpy.linalg.eigh, scipy.linalg.eigh(T, M)), or any matrix calculator.

Hand in: the three frequencies and mode-shape sketches; the Rayleigh estimate and its percentage error; the $M$-orthogonality check; a short paragraph on why a building whose fundamental frequency is near $2$–$3$ Hz is vulnerable to shaking of that frequency (resonance).

Going further. Show that the eigenvalues of $T$ are $2-2\cos\frac{(2j-1)\pi}{7}$, $j=1,2,3$. Read about base isolation, which lowers the fundamental frequency of a building on purpose, and about tuned mass dampers in tall towers.

Instructor note: the leading minors of $T$ are $2,3,1$. Its eigenvalues are $0.1981$, $1.5550$, $3.2470$, giving $\omega\approx14.07$, $39.43$, $56.98$ rad/s and $f\approx2.24$, $6.28$, $9.07$ Hz. The first mode is proportional to $(1,\ 1.802,\ 2.247)$ (all floors moving together), the second to $(1,\ 0.445,\ -0.802)$, the third to $(1,\ -1.247,\ 0.555)$. For $x=(1,2,3)$, $Tx=(0,0,1)$ and $R(x)=3/14\approx0.2143$, about $8\%$ above $\lambda_1$, which predicts $f\approx2.33$ Hz (about $4\%$ high: frequency errors are roughly half the eigenvalue error). With $M$ $=\operatorname{diag}(2,2,1)$ the generalised eigenvalues are $1-\tfrac{\sqrt3}2$ $\approx0.134$, $1$, $1+\tfrac{\sqrt3}2$ $\approx1.866$ ($f\approx1.84$, $5.03$, $6.88$ Hz) with modes $(1,\sqrt3,2)$, $(1,0,-1)$, $(1,-\sqrt3,2)$; for instance $(1,\sqrt3,2)^{\mathsf T}M(1,0,-1)$ $=2-2$ $=0$, while the dot product of these two modes is $1-2=-1\ne0$.

🧪 Self-check quiz

0/5 correct

Q1. The eigenvalues of a skew-Hermitian matrix are always

Q2. Which matrix is normal but not Hermitian?

Q3. Gram–Schmidt with the dot product applied to $v_1=(1,1)$, $v_2=(1,0)$ (in this order) gives $e_2=$

Q4. On $\mathbb{R}^3$, the quadratic form $q(x,y,z)=x^2+2xy$ has

Q5. The matrix $\begin{pmatrix}1&k\\k&4\end{pmatrix}$ is positive definite exactly when