MIT 18.701 — Lecture 18

Gram-Schmidt, Sylvester's Criterion, The Spectral Theorem

§ Inner Product   ⟺  \iff Orthonormal Basis

Definition (Inner Product). An inner product is a symmetric and positive definite Hermitian / bilinear form.

Definition (Euclidean / Hermitian Space). We say that…

Last time, we showed that all symmetric bilinear / Hermitian forms look like ⟨x,y⟩=x†My\langle x, y \rangle = x^{\dagger} My, where MM is diagonal with entries 11, −1-1, or 00. In the particular case when ⟨∙,∙⟩\langle \bullet, \bullet \rangle is positive definite, all diagonal entries have to be 11, so:

Theorem. (Orthonormal Basis) Every Euclidean or Hermitian space has an orthonormal basis; that is, a basis {bi}\{b_i\} such that ⟨bi,bj⟩=1\langle b_i, b_j \rangle = 1 whenever i=ji = j and 00 otherwise.

In particular, the inner product of any Hermitian space might as well just be ⟨x,y⟩=x†y\langle x, y \rangle = x^{\dagger}y.

Example. (Gram-Schmidt Orthogonalization) Given a basis {bi}i=1n\{b_i\}_{i = 1}^n of a Euclidean or Hermitian space, how do we make it orthonormal?

Solution: Follow a procedure known as the Gram-Schmidt Process.

  1. Begin by normalizing every basis element: bi↦bi∣bi∣b_i \mapsto \frac{b_i}{|b_i|}. Now ∣bi∣=1|b_i| = 1 for all ii.

  2. Now for each index i=2,…,ni = 2, \dots, n, do the following:

    1. Replace bib_i with bi−(∑j=1i−1⟨bj,bi⟩⋅bj)b_i - \left(\sum_{j = 1}^{i - 1} \langle b_j, b_i\rangle \cdot b_j\right).

    2. Then normalize bib_i again via bi↦bi∣bi∣b_i \mapsto \frac{b_i}{|b_i|}.

The point is that (∑j=1i−1⟨bj,bi⟩⋅bj)\left(\sum_{j = 1}^{i - 1} \langle b_j, b_i\rangle \cdot b_j\right) is the orthogonal projection of bib_i onto the span of {b1,…,bi−1}\{b_1, \dots, b_{i - 1}\}.

Subtracting the projection of bib_i from bib_i will yield a bib_i orthogonal to all of {b1,…,bi−1}\{b_1, \dots, b_{i - 1}\}, as desired.   ■\blacksquare

Remark. (Reading Comprehension) Three questions:

§ Positive Definite Matrices and Sylvester's Criterion

Definition (Positive Definite). A matrix M∈Hermn(C)M \in \mathrm{Herm}_n(\mathbb{C}) is positive definite if ⟨x,y⟩=x†My\langle x, y \rangle = x^{\dagger}My is positive definite.

Observe that if ⟨x,y⟩=x†My\langle x, y \rangle = x^{\dagger}My is positive definite, its signature must be (n,0,0)(n, 0, 0). So any positive definite MM must look like InI_n after a change of basis by some B∈GLn(C)B \in GL_n(\mathbb{C}). In other words…

Definition (Positive Definite). A matrix M∈Hermn(C)M \in \mathrm{Herm}_n(\mathbb{C}) is positive definite if M=B†BM = B^{\dagger}B for some B∈GLn(C)B \in GL_n(\mathbb{C}).

Finally, here's one more equivalent definition for “positive definite”.

Theorem. (Sylvester's Criterion) A matrix A∈Hermn(C)A \in \mathrm{Herm}_n(\mathbb{C}) is positive definite if and only if:

det⁡(Aij∣1≤i,j≤k)>0 for all k∈{1,2,…,n}.\det(A_{ij} \mid _{1 \leq i, j \leq k}) > 0 \text{ for all } k \in \{1, 2, \dots, n\}.

Note that Aij∣1≤i,j≤kA_{ij} \mid _{1 \leq i, j \leq k} just refers to the top-left k×kk \times k submatrix of AA.

Proof: One direction is easy: if AA is positive definite, then A=B†BA = B^{\dagger}B for some B∈GLn(C)B \in GL_n(\mathbb{C}), so:

det⁡(A)=det⁡(B†B)=det⁡(B)‾det⁡(B)=∣det⁡(B)∣2>0  since det⁡B≠0.\det (A) = \det(B^{\dagger}B) = \overline{\det(B)} \det(B) = |\det(B)|^2 > 0 ~ \text{ since } \det B \neq 0.

Furthermore, the top-left k×kk \times k submatrices of AA are restrictions of AA to a subspace, so they are also positive definite, meaning their determinants are also positive, done.

Now for the other direction: assume det⁡(Aij∣1≤i,j≤k)>0\det(A_{ij} \mid _{1 \leq i, j \leq k}) > 0 for all kk. To show AA is positive definite, it's equivalent to find an orthonormal basis of Cn\mathbb{C}^n through which AA is the identity.

We'll construct our basis in a manner similar to the Gram-Schmidt process.

  1. Begin with the standard basis of normalized unit vectors (e1,…,en)(e_1, \dots, e_n).

  2. Adjust each of the e2,…,ene_2, \dots, e_n to be orthogonal to e1e_1 in the following manner.

    1. Replace eie_i with ei−⟨e1,ei⟩⟨e1,e1⟩e1e_i - \frac{\langle e_1, e_i \rangle}{\langle e_1, e_1 \rangle} e_1 for all i>1i > 1.

    2. Normalize every eie_i again.

  3. We now have ⟨ei,e1⟩=0\langle e_i, e_1 \rangle = 0 for all i>1i > 1. Thus, AA must now have the following form:

    A=[A110⋯00♣⋯♣⋮⋮⋱⋮0♣⋯♣],  where B=[♣⋯♣⋮⋱⋮♣⋯♣] is an (n−1)×(n−1) submatrix.A = \begin{bmatrix} A_{11} & 0 & \cdots & 0 \\ 0 & \clubsuit & \cdots & \clubsuit \\ \vdots & \vdots & \ddots & \vdots \\ 0 & \clubsuit & \cdots & \clubsuit \end{bmatrix}, ~ \text{ where } B = \begin{bmatrix} \clubsuit & \cdots & \clubsuit \\ \vdots & \ddots & \vdots \\ \clubsuit & \cdots & \clubsuit \end{bmatrix} \text{ is an } (n - 1) \times (n - 1) \text{ submatrix.}

    The key now is the following claim, which follows from A11>0A_{11} > 0 and plain determinant computations:

    Claim. The positivity of det⁡(Aij∣1≤i,j≤k)\det(A_{ij} \mid_{1 \leq i, j \leq k}) for all k∈{1,2,…,n}k \in \{1, 2, \dots, n\}
    translates directly into the positivity of det⁡(Bij∣1≤i,j≤k)\det(B_{ij} \mid_{1 \leq i, j \leq k}) for all k∈{1,2,…,n−1}k \in \{1, 2, \dots, n - 1\}.

    So we can recursively repeat this process on BB, inducting downward.   ■\blacksquare

Warning! Consider the following claim.

Claim. A matrix A∈Hermn(C)A \in \mathrm{Herm}_n(\mathbb{C}) is positive semidefinite if and only if det⁡(Aij∣1≤i,j≤k)≥0\det(A_{ij} \mid _{1 \leq i, j \leq k}) \geq 0 for all kk.

This claim is wrong! Take A=[000−1]A = \left[\begin{smallmatrix} 0 & 0 \\ 0 & -1 \end{smallmatrix}\right] for a counterexample.

§ Matrix Adjective Review: Hermitian, Unitary, and Normal

Definition (Adjoint). The conjugate transpose T†T^{\dagger} of a matrix TT is also called the adjoint of TT.

Definition (Hermitian, Unitary, Normal). We have the following adjectives for matrices T∈Cn×nT \in \mathbb{C}^{n \times n}.

Note that the equivalencies described above are not entirely trivial: check them for yourself!

§ The Spectral Theorem

We'll conclude lecture by proving the following (very strong!) theorem.

Theorem. (Spectral Theorem) Consider a Hermitian space VV and a matrix T:V→VT: V \to V. Then the eigenvectors of TT form an orthonormal basis of VV if and only if TT is normal.

Equivalently, TT is normal if and only if TT is diagonalizable via conjugation by a unitary matrix; that is,

For some U∈Un(C), we have T=U−1ΛU, where Λ=[λ1⋯0⋮⋱⋮0⋯λn] is a matrix of eigenvalues.\text{For some } U \in U_n(\mathbb{C}), \text{ we have } T = U^{-1} \Lambda U, ~ \text{where } \Lambda = \left[\begin{smallmatrix} \lambda_1 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & \lambda_n \end{smallmatrix}\right] \text{ is a matrix of eigenvalues.}

(Why must UU be unitary? Recall the “why do we care” notes about unitary matrices…)

Note that the Spectral Theorem is stronger than our result from last lecture! Since Hermitian matrices are also normal, the Spectral Theorem says they must be diagonalizable. (Specifically by a unitary matrix, too!)

Proof: One direction is easy: suppose such a UU exists. Since UU is unitary, we have U†=U−1U^{\dagger} = U^{-1}, so:

T=U†ΛU and T†=U†Λ†U.   ⟹   TT†=U†ΛΛ†U=U†Λ†ΛU=T†T.   ⟹   T is normal.T = U^{\dagger} \Lambda U \text{ and } T^{\dagger} = U^{\dagger}\Lambda^{\dagger} U. ~ \implies ~ TT^{\dagger} = U^{\dagger} \Lambda \Lambda^{\dagger}U = U^{\dagger} \Lambda^{\dagger} \Lambda U = T^{\dagger}T. ~ \implies ~ T \text{ is normal.}

Now for the hard part: showing TT is diagonalizable given TT is normal. We'll need two lemmas.

Lemma 1. Suppose W⊆VW \subseteq V such that TW⊆WTW \subseteq W. Then we also have T†W⊥⊆W⊥T^{\dagger}W^{\perp} \subseteq W^{\perp}.

Proof: It's just a chain of implications.

u∈W⊥   ⟺   ⟨u,w⟩=0 for all w∈W  ⟹   ⟨u,Tw⟩=0 for all w∈W  ⟺   ⟨T†u,w⟩=0 for all w∈W   ⟺   T†u∈W⊥.   □\begin{align*}u \in W^{\perp} ~ \iff ~ & \langle u, w \rangle = 0 \text{ for all } w \in W \\ \implies ~ & \langle u, Tw \rangle = 0 \text{ for all } w \in W \\ \iff ~ & \langle T^{\dagger}u, w \rangle = 0 \text{ for all } w \in W ~ \iff ~ T^{\dagger}u \in W^{\perp}. ~~~ \square\end{align*}

Our first lemma didn't actually need TT to be normal! Our second lemma, on the other hand…

Lemma 2. Suppose TT is normal with eigenvector vv satisfying Tv=λvTv = \lambda v. Then T†v=λ‾vT^{\dagger}v = \overline{\lambda} v.

Proof: Let's handle the λ=0\lambda = 0 case first.

⟨T†v,T†v⟩=⟨Tv,Tv⟩=⟨0,0⟩=0.\langle T^{\dagger}v, T^{\dagger}v \rangle = \langle Tv, Tv \rangle = \langle 0, 0 \rangle = 0.

But since ⟨∙,∙⟩\langle \bullet, \bullet \rangle is positive definite, we must have T†v=0T^{\dagger}v = 0 as well.

In the λ≠0\lambda \neq 0 case, observe that T′:=T−λInT' := T - \lambda I_n is normal. This reduces us to the λ=0\lambda = 0 case, in that we know (T′)†v=0(T')^{\dagger}v = 0. This implies:

(T′)†v=0   ⟹   (T†−λ‾In)v=0   ⟹   T†v=λ‾v.   □(T')^{\dagger}v = 0 ~ \implies ~ (T^{\dagger} - \overline{\lambda}I_n)v = 0 ~ \implies ~ T^{\dagger}v = \overline{\lambda}v. ~~~ \square

Now for the actual proof: induct on dim⁡V\dim V. Pick some eigenvector v∈Vv \in V, and consider W=CvW = \mathbb{C}v. Then:

  1. Since WW is an eigenspace of TT, we have TW⊆WTW \subseteq W.

  2. By Lemma 2, WW is an eigenspace of T†T^{\dagger} as well, so we have T†W⊆WT^{\dagger}W \subseteq W, too.

  3. By Lemma 1, the previous two points imply TW⊥⊆W⊥TW^{\perp} \subseteq W^{\perp} and T†W⊥⊆W⊥T^{\dagger}W^{\perp} \subseteq W^{\perp}.

That final point means T∣W⊥T_{|W^{\perp}} and T∣W⊥†T_{|W^{\perp}}^{\dagger} are well-defined. In particular:

Since V=W⊕W⊥V = W \oplus W^{\perp}, combining the diagonalizations of T∣W⊥T_{|W^{\perp}} and T∣WT_{|W} yields a diagonalization of TT. And since WW and W⊥W^{\perp} are perpendicular, this diagonalization has an orthonormal basis.   ■\blacksquare

It turns out that the Spectral Theorem is a very powerful hammer, and there are a lot more nails to use it on than you'd expect. We'll leave the hammering of nails for next lecture.