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=xMy\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=xy\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: bibibib_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=1i1bj,bibj)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 bibibib_i \mapsto \frac{b_i}{|b_i|}.

The point is that (j=1i1bj,bibj)\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,,bi1}\{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,,bi1}\{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 MHermn(C)M \in \mathrm{Herm}_n(\mathbb{C}) is positive definite if x,y=xMy\langle x, y \rangle = x^{\dagger}My is positive definite.

Observe that if x,y=xMy\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 BGLn(C)B \in GL_n(\mathbb{C}). In other words…

Definition (Positive Definite). A matrix MHermn(C)M \in \mathrm{Herm}_n(\mathbb{C}) is positive definite if M=BBM = B^{\dagger}B for some BGLn(C)B \in GL_n(\mathbb{C}).

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

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

det(Aij1i,jk)>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 Aij1i,jkA_{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=BBA = B^{\dagger}B for some BGLn(C)B \in GL_n(\mathbb{C}), so:

det(A)=det(BB)=det(B)det(B)=det(B)2>0  since detB0.\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(Aij1i,jk)>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 eie1,eie1,e1e1e_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=[A110000],  where B=[] is an (n1)×(n1) 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(Aij1i,jk)\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(Bij1i,jk)\det(B_{ij} \mid_{1 \leq i, j \leq k}) for all k{1,2,,n1}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 AHermn(C)A \in \mathrm{Herm}_n(\mathbb{C}) is positive semidefinite if and only if det(Aij1i,jk)0\det(A_{ij} \mid _{1 \leq i, j \leq k}) \geq 0 for all kk.

This claim is wrong! Take A=[0001]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 TT^{\dagger} of a matrix TT is also called the adjoint of TT.

Definition (Hermitian, Unitary, Normal). We have the following adjectives for matrices TCn×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:VVT: 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 UUn(C), we have T=U1ΛU, where Λ=[λ100λ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=U1U^{\dagger} = U^{-1}, so:

T=UΛU and T=UΛU.      TT=UΛΛU=UΛΛU=TT.      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 WVW \subseteq V such that TWWTW \subseteq W. Then we also have TWWT^{\dagger}W^{\perp} \subseteq W^{\perp}.

Proof: It's just a chain of implications.

uW      u,w=0 for all wW     u,Tw=0 for all wW     Tu,w=0 for all wW      TuW.   \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 Tv=λvT^{\dagger}v = \overline{\lambda} v.

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

Tv,Tv=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 Tv=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      Tv=λ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 dimV\dim V. Pick some eigenvector vVv \in V, and consider W=CvW = \mathbb{C}v. Then:

  1. Since WW is an eigenspace of TT, we have TWWTW \subseteq W.

  2. By Lemma 2, WW is an eigenspace of TT^{\dagger} as well, so we have TWWT^{\dagger}W \subseteq W, too.

  3. By Lemma 1, the previous two points imply TWWTW^{\perp} \subseteq W^{\perp} and TWWT^{\dagger}W^{\perp} \subseteq W^{\perp}.

That final point means TWT_{|W^{\perp}} and TWT_{|W^{\perp}}^{\dagger} are well-defined. In particular:

Since V=WWV = W \oplus W^{\perp}, combining the diagonalizations of TWT_{|W^{\perp}} and TWT_{|W} yields a diagonalization of TT. And since WW and WW^{\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.