Unit 5, lesson 26

Simultaneous Diagonalization

When several operators share one orthonormal eigenbasis, why commuting operators preserve each other's eigenspaces, how normal restrictions to reducing subspaces finish the proof, and why commuting is not enough.

  • Video 26
  • Normal Operators and Simultaneous Diagonalization

The Hermitian matrix HH with rows (2,i)(2, i) and (−i,2)(-i, 2) has the orthonormal eigenvectors (−i,1)/2(-i, 1)/\sqrt{2} and (i,1)/2(i, 1)/\sqrt{2}, and the same two vectors also make H2H^2 diagonal. The reflections of the plane across the x1x_1-axis and across the line x1=x2x_1 = x_2 are each diagonal in some orthonormal basis, but no single basis works for both. This lesson finds the exact condition for a family of operators to share an orthonormal eigenbasis. Over C\mathbb{C} the operators must be normal and must commute in pairs, and neither condition can be dropped.

Key terms

Simultaneous diagonalization

Definition Let VV be a finite-dimensional vector space over F\mathbb{F}, where F\mathbb{F} is R\mathbb{R} or C\mathbb{C}, and let T1,…,Tk:V→VT_1, \dots, T_k: V \to V be linear operators. The family is simultaneously diagonalizable if some basis of VV consists of common eigenvectors, that is, vectors that are eigenvectors of every TjT_j at once. For matrices A1,…,Ak∈Fn×nA_1, \dots, A_k \in \mathbb{F}^{n \times n} this means that one invertible P∈Fn×nP \in \mathbb{F}^{n \times n} makes every P−1AjPP^{-1}A_jP diagonal. A common eigenvector vv may have a different eigenvalue for each operator, Tjv=λjvT_jv = \lambda_j v. When VV is an inner product space and the common basis can be chosen orthonormal, such a basis is called a common orthonormal eigenbasis. For matrices acting on Fn\mathbb{F}^n with the standard inner product, there is then one unitary QQ, real orthogonal when F=R\mathbb{F} = \mathbb{R}, such that every Q∗AjQQ^{*}A_jQ is diagonal.

In plain words One set of axes makes every operator in the family diagonal, and in the orthonormal version those axes are perpendicular. Each operator then only scales the same axes, possibly by different amounts.

Example Take the Hermitian matrix HH with rows (2,i)(2, i) and (−i,2)(-i, 2) and its square

H2=[54i−4i5].H^2 = \begin{bmatrix} 5 & 4i \\ -4i & 5 \end{bmatrix}.

The orthonormal vectors q1=(−i,1)/2q_1 = (-i, 1)/\sqrt{2} and q2=(i,1)/2q_2 = (i, 1)/\sqrt{2} satisfy Hq1=q1Hq_1 = q_1 and Hq2=3q2Hq_2 = 3q_2, so H2q1=q1H^2q_1 = q_1 and H2q2=9q2H^2q_2 = 9q_2. With Q=[q1q2]Q = \begin{bmatrix} q_1 & q_2 \end{bmatrix}, both

Q∗HQ=diag⁡(1,3),Q∗H2Q=diag⁡(1,9)\begin{gathered} Q^{*}HQ = \operatorname{diag}(1, 3), \\[0.4em] Q^{*}H^2Q = \operatorname{diag}(1, 9) \end{gathered}

are diagonal. This is no accident. The square H2=4H−3IH^2 = 4H - 3I is a polynomial in HH, and a polynomial in an operator has every eigenvector of that operator as an eigenvector.

Commuting operators

Definition Two linear operators S,T:V→VS, T: V \to V on the same space commute if ST=TSST = TS. A family T1,…,TkT_1, \dots, T_k is pairwise commuting if TiTj=TjTiT_iT_j = T_jT_i for all ii and jj. In any basis, two operators commute exactly when their matrices commute. Commuting is necessary for simultaneous diagonalization. If P−1AiP=DiP^{-1}A_iP = D_i and P−1AjP=DjP^{-1}A_jP = D_j with DiD_i and DjD_j diagonal, then

AiAj=PDiDjP−1=PDjDiP−1=AjAi,\begin{aligned} A_iA_j &= PD_iD_jP^{-1} \\[0.4em] &= PD_jD_iP^{-1} = A_jA_i, \end{aligned}

because diagonal matrices commute. If the common basis is orthonormal over C\mathbb{C}, so that Aj=QDjQ∗A_j = QD_jQ^{*} with QQ unitary, each AjA_j is also normal by the complex spectral theorem. So a family with a common orthonormal eigenbasis is pairwise commuting and consists of normal operators.

In plain words Commuting operators give the same result in either order. Operators that are diagonal in one shared basis always behave this way, so a pair that fails the test cannot share an eigenbasis.

Example The two reflections

S=[100−1],T=[0110]S = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, \quad T = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}

are real symmetric, so each one has an orthonormal eigenbasis of its own. But

ST=[01−10],TS=[0−110],\begin{gathered} ST = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}, \\[0.4em] TS = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, \end{gathered}

so ST≠TSST \ne TS and they share no eigenbasis. Directly, the eigenvectors of SS are the nonzero multiples of e1e_1 and of e2e_2, and TT swaps these two directions instead of keeping them.

Eigenspace preserved by a commuting operator

Definition Let S,T:V→VS, T: V \to V be linear operators on a vector space VV over F\mathbb{F} with ST=TSST = TS, and let λ\lambda be an eigenvalue of TT with eigenspace Eλ(T)=ker⁡(T−λI)E_\lambda(T) = \ker(T - \lambda I). Then SS maps Eλ(T)E_\lambda(T) into itself. Indeed, if Tv=λvTv = \lambda v, then

T(Sv)=S(Tv)=λ Sv,T(Sv) = S(Tv) = \lambda\, Sv,

so SvSv lies in Eλ(T)E_\lambda(T), possibly as the zero vector. Now let VV be a finite-dimensional complex inner product space and TT normal, with distinct eigenvalues λ1,…,λr\lambda_1, \dots, \lambda_r. By the spectral theorem, VV is the orthogonal direct sum of the eigenspaces Eλ1(T),…,Eλr(T)E_{\lambda_1}(T), \dots, E_{\lambda_r}(T). The commuting operator SS preserves every one of them. The orthogonal complement of any single eigenspace is spanned by the remaining eigenspaces, so SS preserves that complement too. Each eigenspace of TT is therefore a reducing subspace for SS, and in an orthonormal basis adapted to the decomposition the matrix of SS is block diagonal. Here SS itself need not be normal.

In plain words An operator that commutes with TT may move an eigenvector of TT, but only within the eigenspace of TT that contains it. It never mixes different eigenspaces of TT.

Example Let A=diag⁡(2,2,5)A = \operatorname{diag}(2, 2, 5) and

B=[0i0−i00004].B = \begin{bmatrix} 0 & i & 0 \\ -i & 0 & 0 \\ 0 & 0 & 4 \end{bmatrix}.

Both are Hermitian, and AB=BAAB = BA, because AA multiplies every vector of the plane spanned by e1e_1 and e2e_2 by 22, while BB sends that plane into itself and e3e_3 to a multiple of e3e_3. The eigenspaces of AA are E2(A)=span⁡(e1,e2)E_2(A) = \operatorname{span}(e_1, e_2) and E5(A)=span⁡(e3)E_5(A) = \operatorname{span}(e_3). As the lemma predicts, Be1=−ie2Be_1 = -ie_2 and Be2=ie1Be_2 = ie_1 stay in E2(A)E_2(A), and Be3=4e3Be_3 = 4e_3 stays in E5(A)E_5(A). But BB does not keep the line through e1e_1, so e1e_1 is an eigenvector of AA and not of BB. Only whole eigenspaces are preserved.

Normal restriction to a reducing subspace

Definition Let VV be a finite-dimensional inner product space over F\mathbb{F} and let S:V→VS: V \to V be linear. A subspace UU reduces SS if S(U)⊆US(U) \subseteq U and S(U⊥)⊆U⊥S(U^{\perp}) \subseteq U^{\perp}, equivalently if UU is invariant under both SS and S∗S^{*}. In that case the restriction S∣U:U→US|_U: U \to U, with the inner product of VV restricted to UU, has adjoint

(S∣U)∗=S∗∣U,(S|_U)^{*} = S^{*}|_U,

and if SS is normal, then S∣US|_U is normal. To see this, take an orthonormal basis of UU followed by an orthonormal basis of U⊥U^{\perp}. The matrix of SS is block diagonal with a block B1B_1 for UU and a block B2B_2 for U⊥U^{\perp}, and the matrix of S∗S^{*} is block diagonal with blocks B1∗B_1^{*} and B2∗B_2^{*}. The equation SS∗=S∗SSS^{*} = S^{*}S then holds block by block, and its first block says B1B1∗=B1∗B1B_1B_1^{*} = B_1^{*}B_1. In the same way, if two operators both map UU into itself, the restriction of their product is the product of their restrictions, so restrictions of commuting operators to a common invariant subspace still commute.

In plain words A reducing subspace splits the operator into two pieces that do not interact. Adjoints and products are then computed piece by piece, so normality passes to each piece. For a general operator, invariance of UU alone does not give this splitting, because the adjoint need not keep UU.

Example In the previous example U=E2(A)U = E_2(A) reduces BB, and in the basis e1,e2e_1, e_2 the restriction is

B∣U=[0i−i0],B|_U = \begin{bmatrix} 0 & i \\ -i & 0 \end{bmatrix},

which is Hermitian and hence normal. Its eigenvectors are (i,1)(i, 1) with eigenvalue 11 and (−i,1)(-i, 1) with eigenvalue −1-1. For contrast, let TT have rows (1,1)(1, 1) and (0,2)(0, 2). The line U=span⁡(e1)U = \operatorname{span}(e_1) is invariant under TT, since Te1=e1Te_1 = e_1, but it is not reducing, because T∗e1=e1+e2T^{*}e_1 = e_1 + e_2 leaves the line. So T∗T^{*} does not restrict to an operator on UU. The restriction T∣UT|_U still has an adjoint on UU, but it is the compression of T∗T^{*} to UU, not a restriction of T∗T^{*}, and the formula (T∣U)∗=T∗∣U(T|_U)^{*} = T^{*}|_U needs the reducing hypothesis.

Common orthonormal eigenbasis

Definition Let VV be a finite-dimensional complex inner product space and let T1,…,Tk:V→VT_1, \dots, T_k: V \to V be a finite family of linear operators. Then VV has an orthonormal basis consisting of common eigenvectors of T1,…,TkT_1, \dots, T_k if and only if every TjT_j is normal and TiTj=TjTiT_iT_j = T_jT_i for all ii and jj. In matrix form, matrices A1,…,Ak∈Cn×nA_1, \dots, A_k \in \mathbb{C}^{n \times n} are normal and pairwise commuting exactly when one unitary QQ makes every Q∗AjQQ^{*}A_jQ diagonal. The conditions are necessary because diagonal matrices are normal and commute. Sufficiency is proved by induction on kk, for all spaces at once. For k=1k = 1 it is the complex spectral theorem. For the step, split VV into the orthogonal eigenspaces of T1T_1. Each of them reduces T2,…,TkT_2, \dots, T_k, so on each eigenspace EE the restrictions of these operators are normal and still pairwise commute. By the induction hypothesis EE has an orthonormal basis of common eigenvectors of those k−1k - 1 restrictions, and T1T_1 acts on EE as a scalar, so the same vectors are eigenvectors of T1T_1 too. Eigenspaces of T1T_1 for distinct eigenvalues are orthogonal, so the bases of all the eigenspaces together form an orthonormal basis of VV. If T1T_1 is a scalar multiple of II, the split leaves VV whole, but the number of operators still drops, so the induction never needs the dimension to shrink. The common basis is not unique in general. Over R\mathbb{R}, pairwise commuting real symmetric matrices have a common real orthonormal eigenbasis by the same argument. Real normal matrices need not, since the quarter turn is real normal, commutes with II, and has no real eigenvector.

In plain words Diagonalize the first operator, then diagonalize the others together inside each eigenspace of the first. Commuting keeps the others inside those eigenspaces, and normality of their restrictions makes the second step possible.

Example For AA and BB above, the eigenspace E2(A)E_2(A) is a plane, so AA alone does not choose the basis vectors inside it. The restriction of BB does, and it gives the orthonormal common eigenvectors

q1=12[i10],q2=12[−i10],q_1 = \frac{1}{\sqrt{2}}\begin{bmatrix} i \\ 1 \\ 0 \end{bmatrix}, \quad q_2 = \frac{1}{\sqrt{2}}\begin{bmatrix} -i \\ 1 \\ 0 \end{bmatrix},

while q3=e3q_3 = e_3 completes the basis. With Q=[q1q2q3]Q = \begin{bmatrix} q_1 & q_2 & q_3 \end{bmatrix},

Q∗AQ=diag⁡(2,2,5),Q∗BQ=diag⁡(1,−1,4).\begin{gathered} Q^{*}AQ = \operatorname{diag}(2, 2, 5), \\[0.4em] Q^{*}BQ = \operatorname{diag}(1, -1, 4). \end{gathered}

The repeated eigenvalue of AA left room for a choice, and BB used that room.

Commuting matrices that are not normal

Definition Let A,B∈Cn×nA, B \in \mathbb{C}^{n \times n} with AB=BAAB = BA. If AA is not normal, the complex spectral theorem says that AA has no orthonormal eigenbasis, so AA and BB have no common orthonormal eigenbasis, however simple BB is. Commuting alone does not even give a common eigenbasis. A matrix that is not diagonalizable has no eigenbasis of its own, yet it commutes with II and with every polynomial in itself. A diagonalizable matrix that is not normal can share an eigenbasis with a commuting partner, but never an orthonormal one.

In plain words Commuting makes each operator respect the other’s eigenspaces, but it says nothing about the angles between eigenvectors. Normality is what makes eigenvectors for different eigenvalues perpendicular.

Example The shear NN with rows (1,1)(1, 1) and (0,1)(0, 1) commutes with II, but its only eigenvectors are the nonzero multiples of e1e_1, so it has no eigenbasis at all. The matrix MM with rows (1,1)(1, 1) and (0,2)(0, 2) commutes with

M2=[1304],M^2 = \begin{bmatrix} 1 & 3 \\ 0 & 4 \end{bmatrix},

and the two share the eigenbasis (1,0)(1, 0), (1,1)(1, 1), with eigenvalues 1,21, 2 for MM and 1,41, 4 for M2M^2. These directions are not perpendicular, and each eigenspace of MM is a single line, so no other eigenvector directions exist. Indeed MM is not normal, since the first diagonal entries of MMTMM^{\mathsf{T}} and MTMM^{\mathsf{T}}M are 22 and 11.

Check yourself

  1. Show that the matrix AA with rows (2,1)(2, 1) and (1,2)(1, 2) and the matrix BB with rows (1,−1)(1, -1) and (−1,1)(-1, 1) commute, and find a common orthonormal eigenbasis.
Show the answer

Both products equal the matrix with rows (1,−1)(1, -1) and (−1,1)(-1, 1), so AB=BAAB = BA. Both matrices are real symmetric and they commute, so a common real orthonormal eigenbasis exists. The vector (1,1)(1, 1) gives A(1,1)=3(1,1)A(1, 1) = 3(1, 1) and B(1,1)=0B(1, 1) = 0, so its eigenvalue for BB is 00. The vector (1,−1)(1, -1) gives A(1,−1)=(1,−1)A(1, -1) = (1, -1) and B(1,−1)=2(1,−1)B(1, -1) = 2(1, -1). Normalizing, the basis is (1,1)/2(1, 1)/\sqrt{2} and (1,−1)/2(1, -1)/\sqrt{2}, and with these columns

QTAQ=diag⁡(3,1),QTBQ=diag⁡(0,2).\begin{gathered} Q^{\mathsf{T}}AQ = \operatorname{diag}(3, 1), \\[0.4em] Q^{\mathsf{T}}BQ = \operatorname{diag}(0, 2). \end{gathered}
  1. Let A=diag⁡(1,1,2)A = \operatorname{diag}(1, 1, 2) and let BB have rows (2,0,1)(2, 0, 1), (0,2,0)(0, 2, 0) and (1,0,2)(1, 0, 2). Without multiplying the full matrices, explain why AA and BB do not commute, then confirm it with one entry of ABAB and BABA.
Show the answer

If they commuted, BB would map the eigenspace E1(A)=span⁡(e1,e2)E_1(A) = \operatorname{span}(e_1, e_2) into itself. But Be1=(2,0,1)Be_1 = (2, 0, 1) has a nonzero third entry, so it leaves that eigenspace. To confirm, the entry in row 33 and column 11 of ABAB is a33b31=2⋅1=2a_{33}b_{31} = 2 \cdot 1 = 2, while the same entry of BABA is b31a11=1⋅1=1b_{31}a_{11} = 1 \cdot 1 = 1. Each matrix is real symmetric and has an orthonormal eigenbasis of its own, but because they do not commute they have no common eigenbasis, orthonormal or not.

  1. The matrix AA with rows (2,1,1)(2, 1, 1), (1,2,1)(1, 2, 1), (1,1,2)(1, 1, 2) and the matrix BB with rows (1,0,0)(1, 0, 0), (0,0,1)(0, 0, 1), (0,1,0)(0, 1, 0) commute. Find a common orthonormal eigenbasis and the diagonal form of each matrix in that basis.
Show the answer

The matrix AA is II plus the matrix of all ones, so it has eigenvalue 44 on the line through (1,1,1)(1, 1, 1) and eigenvalue 11 on the plane x1+x2+x3=0x_1 + x_2 + x_3 = 0. The matrix BB swaps the second and third coordinates. It fixes (1,1,1)(1, 1, 1), and it maps the plane into itself, as the lemma on preserved eigenspaces requires. Inside the plane, BB sends (0,1,−1)(0, 1, -1) to −(0,1,−1)-(0, 1, -1) and fixes (2,−1,−1)(2, -1, -1). These three vectors are mutually orthogonal, so a common orthonormal eigenbasis is

13(1,1,1),12(0,1,−1),16(2,−1,−1).\begin{gathered} \tfrac{1}{\sqrt{3}}(1, 1, 1), \quad \tfrac{1}{\sqrt{2}}(0, 1, -1), \\[0.4em] \tfrac{1}{\sqrt{6}}(2, -1, -1). \end{gathered}

With these columns in QQ, in this order,

QTAQ=diag⁡(4,1,1),QTBQ=diag⁡(1,−1,1).\begin{gathered} Q^{\mathsf{T}}AQ = \operatorname{diag}(4, 1, 1), \\[0.4em] Q^{\mathsf{T}}BQ = \operatorname{diag}(1, -1, 1). \end{gathered}

Neither matrix determines this basis alone, since AA and BB each have the eigenvalue 11 twice. Together they leave no real orthonormal choice beyond changing the sign of a vector and reordering, because each pair of eigenvalues for AA and BB, namely (4,1)(4, 1), (1,−1)(1, -1) and (1,1)(1, 1), belongs to a single line of common eigenvectors.

How this lesson connects