Skip to main content

Section 40.5 Examples

Subsection 40.5.1 Orthogonal diagonalization of a symmetric matrix

Example 40.5.1.

Here we will carry out Procedure 40.4.2 on the symmetric matrix

\begin{equation*} S = \begin{bmatrix} 0 \amp 1 \amp 0 \amp 1 \\ 1 \amp 0 \amp 1 \amp 0 \\ 0 \amp 1 \amp 0 \amp 1 \\ 1 \amp 0 \amp 1 \amp 0 \end{bmatrix}\text{.} \end{equation*}

The characteristic polynomial is

\begin{equation*} c_S(\lambda) = \lambda^2 (\lambda - 2) (\lambda + 2) \text{,} \end{equation*}

so the eigenvalues are \(\lambda_1 = 0\text{,}\) \(\lambda_2 = 2\text{,}\) and \(\lambda_3 = -2\text{.}\)

Solving the homogeneous system \((2 I - S) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_2(S) = \Span \left\{ \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix} \right\} \text{.} \end{equation*}

Solving the homogeneous system \((-2 I - S) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_{-2}(S) = \Span \left\{ \left[\begin{array}{r} 1 \\ -1 \\ 1 \\ -1 \end{array}\right] \right\} \text{.} \end{equation*}

Solving the homogeneous system \((0 I - S) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_0(S) = \Span \left\{ \left[\begin{array}{r} -1 \\ 0 \\ 1 \\ 0 \end{array}\right], \left[\begin{array}{r} 0 \\ -1 \\ 0 \\ 1 \end{array}\right] \right\}\text{.} \end{equation*}

Notice that these four eigenvectors form an orthogonal set. In particular, the two basis vectors for \(E_0(S)\) are already orthogonal. If they had not turned out that way from just solving the system, we could have applied the Gram-Schmidt process to just those two vectors to obtain an orthogonal basis for that eigenspace.

Normalizing our eigenvectors leads to the orthonormal basis

\begin{equation*} E_0(S) = \Span \left\{ \frac{1}{2} \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \frac{1}{2} \left[\begin{array}{r} 1 \\ -1 \\ 1 \\ -1 \end{array}\right], \frac{1}{\sqrt{2}} \left[\begin{array}{r} -1 \\ 0 \\ 1 \\ 0 \end{array}\right], \frac{1}{\sqrt{2}} \left[\begin{array}{r} 0 \\ -1 \\ 0 \\ 1 \end{array}\right] \right\} \end{equation*}

for \(\R^n\text{.}\) Placing these four orthonormal vectors into a transition matrix

\begin{equation*} P = \left[\begin{array}{crrr} \frac{1}{2} \amp \frac{1}{2} \amp - \frac{1}{\sqrt{2}} \amp 0 \\ \frac{1}{2} \amp - \frac{1}{2} \amp 0 \amp - \frac{1}{\sqrt{2}} \\ \frac{1}{2} \amp \frac{1}{2} \amp \frac{1}{\sqrt{2}} \amp 0 \\ \frac{1}{2} \amp - \frac{1}{2} \amp 0 \amp \frac{1}{\sqrt{2}} \end{array}\right] \end{equation*}

allows us to orthogonally diagonalize \(S\) as

\begin{equation*} \utrans{P} S P = \begin{bmatrix} 2 \\ \amp -2 \\ \amp \amp 0 \\ \amp \amp \amp 0 \end{bmatrix} \text{.} \end{equation*}

Subsection 40.5.2 Unitary diagonalization of a Hermitian matrix

Procedure 40.4.2 is for real symmetric matrices, but it can be applied without modification to complex Hermitian matrices.

Example 40.5.2.

Here we will attempt to unitarily diagonalize the Hermitian matrix

\begin{equation*} H = \left[\begin{array}{rcr} 1 \amp 1 \amp \ci \\ 1 \amp 1 \amp -\ci \\ -\ci \amp \ci \amp 1 \end{array}\right] \text{.} \end{equation*}

The characteristic polynomial is

\begin{equation*} c_H(\lambda) = (\lambda + 1) (\lambda - 2)^2 \text{,} \end{equation*}

so the eigenvalues are \(\lambda_1 = -1\text{,}\) \(\lambda_2 = 2\text{.}\)

Solving the homogeneous system \((- I - H) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_{-1}(H) = \Span \left\{ \left[\begin{array}{r} -\ci \\ \ci \\ 1 \end{array}\right] \right\} \text{.} \end{equation*}

Solving the homogeneous system \((2 I - H) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_2(H) = \Span \left\{ \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \right\}\text{.} \end{equation*}

Notice that the basis vector for \(E_{-1}(H)\) is already orthogonal to each of the basis vectors for \(E_2(H)\text{,}\) as expected. But the basis for \(E_2(H)\) is not orthogonal, so we will need to apply the Gram-Schmidt orthogonalization process to those two vectors. Labelling those two vectors as \(\uvec{v}_1\) and \(\uvec{v}_2\text{,}\) we may keep \(\uvec{e}_1 = \uvec{v}_1\text{,}\) but we must adjust

\begin{equation*} \uvec{e}_2 = \uvec{v}_2 - \frac{\inprod{\uvec{v}_2}{\uvec{e}_1}}{\norm{\uvec{e}_1}^2} \, \uvec{e}_1 = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} - \frac{- \ci}{2} \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} \\ 1 \\ \frac{\ci}{2} \end{bmatrix}\text{.} \end{equation*}

We now have an orthogonal set of eigenvectors which we can normalize to obtain an orthonormal set

\begin{equation*} \left\{ \frac{1}{\sqrt{3}} \left[\begin{array}{r} -\ci \\ \ci \\ 1 \end{array}\right], \frac{1}{\sqrt{2}} \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix}, \frac{1}{\sqrt{6}} \begin{bmatrix} 1 \\ 2 \\ \ci \end{bmatrix} \right\}\text{.} \end{equation*}

Finally, taking \(U\) to be the unitary matrix with these orthonormal vectors as columns

\begin{equation*} U = \frac{\sqrt{6}}{6} \begin{bmatrix} -\ci \sqrt{2} \amp \ci \sqrt{3} \amp 1 \\ \ci \sqrt{2} \amp 0 \amp 2 \\ \sqrt{2} \amp \sqrt{3} \amp \ci \end{bmatrix} \end{equation*}

allows us to unitarily diagonalize \(H\text{:}\)

\begin{equation*} \inv{U} H U = \adjoint{U} H U = \begin{bmatrix} -1 \\ \amp 2 \\ \amp \amp 2 \end{bmatrix} \text{.} \end{equation*}
Example 40.5.3. Gram-Schmidt can't fix everything.

Let's attempt to unitarily diagonalize the matrix

\begin{equation*} A = \left[\begin{array}{cr} \ci \amp 0 \\ 1 \amp -\ci \end{array}\right] \text{.} \end{equation*}

The characteristic polynomial is

\begin{equation*} c_A(\lambda) = (\lambda - \ci)(\lambda + \ci) \text{,} \end{equation*}

so the eigenvalues are \(\lambda_1 = \ci\text{,}\) \(\lambda_2 = - \ci\text{.}\)

Solving the homogeneous system \((\ci I - A) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_{\ci}(A) = \Span \left\{ \begin{bmatrix} 2 \ci \\ 1 \end{bmatrix} \right\} \text{.} \end{equation*}

Solving the homogeneous system \((- \ci I - A) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_{-\ci}(A) = \Span \left\{ \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\} \text{.} \end{equation*}

These eigenvectors are not orthogonal, so let's attempt to fix that using the Gram-Schmidt orthogonalization process. Write \(\uvec{v}_1,\uvec{v}_2\) for the two eigenvectors we have above. As usual, we start with \(\uvec{e}_1 = \uvec{v}_1\text{,}\) and then correct \(\uvec{v}_w\) to

\begin{equation*} \uvec{e}_2 = \uvec{v}_2 - \frac{\inprod{\uvec{v}_2}{\uvec{e}_1}}{\norm{\uvec{e}_1}^2} \, \uvec{e}_1 = \begin{bmatrix} 0 \\ 1 \end{bmatrix} - \frac{1}{5} \begin{bmatrix} 2 \ci \\ 1 \end{bmatrix} = \begin{bmatrix} - \frac{2 \ci}{5} \\ \frac{4}{5} \end{bmatrix}\text{.} \end{equation*}

Now we normalize to get orthonormal set

\begin{equation*} \left\{ \frac{1}{\sqrt{5}} \begin{bmatrix} 2 \ci \\ 1 \end{bmatrix}, \frac{1}{\sqrt{5}} \left[\begin{array}{r} - \ci \\ 2 \end{array}\right] \right\}\text{.} \end{equation*}

Using these vectors as columns, we obtain unitary matrix

\begin{equation*} U = \frac{1}{\sqrt{5}} \left[\begin{array}{cr} 2 \ci \amp - \ci \\ 1 \amp 2 \end{array}\right] \text{.} \end{equation*}

Check whether \(U\) unitarily diagonalizes \(A\text{:}\)

\begin{align*} \inv{U} A U = \adjoint{U} A U \amp = \frac{1}{\sqrt{5}} \left[\begin{array}{rc} 2 \ci \amp 1 \\ - \ci \amp 2 \end{array}\right] \cdot \left[\begin{array}{cr} \ci \amp 0 \\ 1 \amp - \ci \end{array}\right] \cdot \frac{1}{\sqrt{5}} \left[\begin{array}{cr} 2 \ci \amp - \ci \\ 1 \amp 2 \end{array}\right]\\ \amp = \frac{1}{5} \left[\begin{array}{cr} 5 \ci \amp -5 \ci \\ 0 \amp -5 \ci \end{array}\right]\\ \amp = \left[\begin{array}{cr} i \amp -\ci \\ 0 \amp -\ci \end{array}\right]\text{.} \end{align*}

What happened? By applying the Gram-Schmidt process across eigenspaces instead of just within a particular eigenspace, we have replaced the second eigenvector \(\uvec{v}_2\) by a vector that is orthogonal to the first eigenvector \(\uvec{v}_1\text{,}\) as required, but this replacement for \(\uvec{v}_2\) was no longer an eigenvector. To diagonalize a matrix, the transition matrix must have columns which are linearly independent eigenvectors. But in the end only one column of our unitary \(U\) was an eigenvector for \(A\text{.}\)

Subsection 40.5.3 Unitary diagonalization of a normal matrix

Example 40.5.4.

Let's apply Procedure 40.4.3 to the normal matrix

\begin{equation*} N = \begin{bmatrix} 2 + \ci \amp 1 - \ci \amp 1 + \ci \\ 1 - \ci \amp 2 + \ci \amp -1 - \ci \\ -1 - \ci \amp 1 + \ci \amp 2 + \ci \end{bmatrix}\text{.} \end{equation*}

But first, let's verify that it is normal:

\begin{align*} \adjoint{N} N \amp = \begin{bmatrix} 2 + \ci \amp 1 - \ci \amp 1 + \ci \\ 1 - \ci \amp 2 + \ci \amp -1 - \ci \\ -1 - \ci \amp 1 + \ci \amp 2 + \ci \end{bmatrix} \begin{bmatrix} 2 - \ci \amp 1 + \ci \amp -1 + \ci \\ 1 + \ci \amp 2 - \ci \amp 1 - \ci \\ 1 - \ci \amp -1 + \ci \amp 2 - \ci \end{bmatrix}\\ \amp = \begin{bmatrix} 9 \amp 0 \amp 0 \\ 0 \amp 0 \amp 9 \\ 0 \amp 0 \amp 9 \end{bmatrix} \text{,}\\ \\ N \adjoint{N} \amp = \begin{bmatrix} 2 - \ci \amp 1 + \ci \amp -1 + \ci \\ 1 + \ci \amp 2 - \ci \amp 1 - \ci \\ 1 - \ci \amp -1 + \ci \amp 2 - \ci \end{bmatrix} \begin{bmatrix} 2 + \ci \amp 1 - \ci \amp 1 + \ci \\ 1 - \ci \amp 2 + \ci \amp -1 - \ci \\ -1 - \ci \amp 1 + \ci \amp 2 + \ci \end{bmatrix}\\ \amp = \begin{bmatrix} 9 \amp 0 \amp 0 \\ 0 \amp 0 \amp 9 \\ 0 \amp 0 \amp 9 \end{bmatrix} \text{.} \end{align*}

The characteristic polynomial is

\begin{equation*} c_N(\lambda) = (\lambda - 3)^2 (\lambda - 3 \ci) \text{,} \end{equation*}

so the eigenvalues are \(\lambda_1 = 3\text{,}\) \(\lambda_2 = 3 \ci\text{.}\)

Solving the homogeneous system \((3 I - N) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_3(N) = \Span \left\{ \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} \right\}\text{.} \end{equation*}

Solving the homogeneous system \((3 I - N) \uvec{x} = \zerovec\) leads to

\begin{equation*} E_{3 \ci}(N) = \Span \left\{ \left[\begin{array}{r} -\ci \\ \ci \\ 1 \end{array}\right] \right\} \text{.} \end{equation*}

Notice that the basis vector for \(E_{3 \ci}(N)\) is already orthogonal to each of the basis vectors for \(E_3(N)\text{,}\) as expected. But the basis for \(E_3(N)\) is not orthogonal, so we will need to apply the Gram-Schmidt orthogonalization process to those two vectors. Labelling those two vectors as \(\uvec{v}_1\) and \(\uvec{v}_2\text{,}\) we may keep \(\uvec{e}_1 = \uvec{v}_1\text{,}\) but we must adjust

\begin{equation*} \uvec{e}_2 = \uvec{v}_2 - \frac{\inprod{\uvec{v}_2}{\uvec{e}_1}}{\norm{\uvec{e}_1}^2} \, \uvec{e}_1 = \begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix} - \frac{- \ci}{2} \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix} = \begin{bmatrix} \frac{1}{2} \\ 1 \\ \frac{\ci}{2} \end{bmatrix}\text{.} \end{equation*}

We now have an orthogonal set of eigenvectors which we can normalize to obtain an orthonormal set

\begin{equation*} \left\{ \frac{1}{\sqrt{2}} \begin{bmatrix} \ci \\ 0 \\ 1 \end{bmatrix}, \frac{1}{\sqrt{6}} \begin{bmatrix} 1 \\ 2 \\ \ci \end{bmatrix}, \frac{1}{\sqrt{3}} \left[\begin{array}{r} -\ci \\ \ci \\ 1 \end{array}\right] \right\}\text{.} \end{equation*}

Finally, taking \(U\) to be the unitary matrix with these orthonormal vectors as columns

\begin{equation*} U = \frac{1}{\sqrt{6}} \begin{bmatrix} \ci \sqrt{3} \amp 1 \amp -\ci \sqrt{2} \\ 0 \amp 2 \amp \ci \sqrt{2} \\ \sqrt{3} \amp \ci \amp \sqrt{2} \end{bmatrix} \end{equation*}

allows us to unitarily diagonalize \(N\text{:}\)

\begin{equation*} \inv{U} N U = \adjoint{U} N U = \begin{bmatrix} 3 \\ \amp 3 \\ \amp \amp 3 \ci \end{bmatrix} \text{.} \end{equation*}