Orthogonal Matrices and Symmetric Matrices

Recall that an matrix is diagonalizable if and only if it has linearly independent eigenvectors. (see Diagonalizable Matrices and Multiplicity) Moreover, the matrix with these eigenvectors as columns is a diagonalizing matrix for , that is

As we have seen, the nice bases of are the orthogonal ones, so a natural question is: which matrices have orthogonal eigenvectors, so that columns of form an orthogonal basis for ? These turn out to be precisely the symmetric matrices (matrices for which ), and this is the main result of this section.

Orthogonal Matrices

Recall that an orthogonal set of vectors is called orthonormal if for each vector in the set, and that any orthogonal set can be “normalized”, i.e. converted into an orthonormal set . In particular, if a matrix has orthogonal eigenvectors, they can (by normalizing) be taken to be orthonormal. The corresponding diagonalizing matrix (we will use instead of ) has orthonormal columns, and such matrices are very easy to invert.

Proof
First note that condition th:orthogonal_matrices_a is equivalent to . Let denote the columns of . Then is the th row of , so the -entry of is . Thus means that if and if . Hence condition th:orthogonal_matrices_a is equivalent to th:orthogonal_matrices_c. The proof of the equivalence of th:orthogonal_matrices_a and th:orthogonal_matrices_b is similar.

It is not enough that the rows of a matrix are merely orthogonal for to be an orthogonal matrix. Here is an example.

Let
(a)
Check that matrix has rows that are orthogonal.
(b)
Check that matrix has columns that are NOT orthogonal.
(c)
Check that matrix has rows that are NOT orthonormal.
(d)
Create a matrix by normalizing each of the rows of .
(e)
Check that is an orthogonal matrix.

Click the arrow to see the answer.

You should get , and one can check that this is orthogonal in a number of ways.

This exploration can certainly be done by hand (although it takes some time), but it also makes for a very nice Octave exercise.

To use Octave, go to the Sage Math Cell Webpage, copy the code below into the cell, select OCTAVE as the language, and press EVALUATE.

    %Exploration from Section 9.4 Orthogonal Matrices and Symmetric Matrices
 
    A=[2 1 1; -1 1 1; 0 -1 1]  
    %Check that matrix A has rows that are orthogonal.  
    A(1,:)*transpose(A(2,:))  
    A(2,:)*transpose(A(3,:))  
    A(1,:)*transpose(A(3,:))  
    %Check that matrix A has columns that are NOT orthogonal.  
    transpose(A(:,1))*A(:,2)  
    %(This is 1 of 3 calculations to do.)  
    %Check that matrix A in the Octave window has rows that are NOT orthonormal.  
    %(See the results from the first question.)  
    %Create a matrix Q by normalizing each of the rows of A.  
    q1=A(1,:)/norm(A(1,:));  
    q2=A(2,:)/norm(A(2,:));  
    q3=A(3,:)/norm(A(3,:));  
    Q = [q1;q2;q3]  
    %Check that Q is an orthogonal matrix.  
    Q*transpose(Q)  
    %(You may get numbers close to zero in some places you expect to get zero due to rounding error)

We studied the idea of closure when we studied Subspaces of . The next theorem tells us that orthogonal matrices are closed under matrix multiplication.

Symmetric Matrices

We now shift our focus from orthogonal matrices to another important class of matrices called symmetric matrices. A symmetric matrix is a matrix which is equal to its transpose. We saw a few examples of such matrices in Transpose of a Matrix.

When we began our study of eigenvalues and eigenvectors, we saw numerous examples of matrices with entries that were real numbers with eigenvalues that were complex numbers. It can be shown that symmetric matrices only have real eigenvalues. We also learned that some matrices are diagonalizable while other matrices are not. It turns out that every symmetric matrix is diagonalizable. In fact, we can say more, but first we need the following definition.

We have learned earlier that when we diagonalize a matrix , we write for some matrix where is diagonal, and the diagonal entries are the eigenvalues of . We have also learned that the columns of the matrix are the corresponding eigenvectors of . So when a matrix is orthogonally diagonalizable, we are able to accomplish the diagonalization using a matrix consisting of eigenvectors that form an orthonormal basis for . The following remarkable theorem shows that the matrices that have this property are precisely the symmetric matrices.

Proof
If is orthogonally diagonalizable, then it is an easy exercise to prove that it is symmetric. You are asked to do this in Practice Problem prob:ortho_diag_implies_symmetric.

To prove the “only if” part of this theorem, we assume is symmetric, and we need to show it is orthogonally diagonalizable. We proceed by induction on , the size of the symmetric matrix. If , is already diagonal. If , assume that we know the “only if” statement holds for symmetric matrices. Let be an eigenvalue of , and let , where . Next, set , and use the Gram-Schmidt algorithm to find an orthonormal basis for . Let , so that is an orthogonal matrix. We have

where the block has dimensions , and the block under is a zero matrix, because of the orthogonality of the basis vectors.

Next, using the fact that is symmetric, we notice that so is symmetric. It follows that is also a zero matrix and that is symmetric. Since is an symmetric matrix, we may apply the inductive hypothesis, so there exists an orthogonal matrix such that is diagonal. We observe that is orthogonal, and we compute:

is diagonal. Because is orthogonal by Theorem th:orthogonal_product_inverseth:orthogonal_product, this completes the proof.

Because the eigenvalues of a real symmetric matrix are real, Theorem th:PrinAxes is also called the Real Spectral Theorem, and the set of distinct eigenvalues is called the spectrum of the matrix. A similar result holds for matrices with complex entries (Theorem th:025890).

Actually, the fact that the eigenvectors in Example ex:DiagonalizeSymmetricMatrix are orthogonal is no coincidence. These vectors certainly must be linearly independent (they correspond to distinct eigenvalues). We will see that the fact that the matrix is symmetric implies that the eigenvectors are orthogonal. To prove this we need the following useful fact about symmetric matrices.

Proof
Recall that for all columns and . Because , we get

Proof
Let and , where . We compute Hence , and so because .

Now the procedure for diagonalizing a symmetric matrix is clear. Find the distinct eigenvalues and find orthonormal bases for each eigenspace (the Gram-Schmidt algorithm may be needed when there is a repeated eigenvalue). Then the set of all these basis vectors is orthonormal (by Theorem th:symmetric_has_ortho_ev) and contains vectors. Here is an example.

If we are willing to replace “diagonal” by “upper triangular” in the real spectral theorem, we can weaken the requirement that is symmetric to insisting only that has real eigenvalues.

There is also a lower triangular version of this theorem.

Proof
See Practice Problem prob:SchurChallenge

The eigenvalues of an upper triangular matrix are displayed along the main diagonal. Because and have the same determinant and trace whenever is orthogonal (for they are similar matrices), Theorem th:Schur gives:

This corollary remains true even if the eigenvalues are not real.

Practice Problems

Suppose is orthogonally diagonalizable. Prove that is symmetric. (This is the easy direction of the ”if and only if” in Theorem th:PrinAxes.)
Normalize the rows to make each of the following matrices orthogonal.
If is a triangular orthogonal matrix, show that is diagonal and that all diagonal entries are or .
We have ; the first step is to show that is lower triangular and also upper triangular, and so is diagonal. But then , so . This implies that the diagonal entries of are all .
If is orthogonal, show that is orthogonal if and only if or .
If the first two rows of an orthogonal matrix are and , find all possible third rows.
For each matrix , find an orthogonal matrix such that is diagonal.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(challenging problem)
(h)
(challenging problem)
Show that the following are equivalent for a symmetric matrix .
(a)
is orthogonal.
(b)
.
(c)
All eigenvalues of are .
For (b) if and only if (c), use Theorem th:detofproduct.
We call matrices and orthogonally similar (and write ) if for an orthogonal matrix .
(a)
Show that for all ; ; and and . (This means that “orthogonally similar” is an equivalence relation.)
(b)
Show that the following are equivalent for two symmetric matrices and .
(i)
and are similar.
(ii)
and are orthogonally similar.
(iii)
and have the same eigenvalues.
Assume that and are orthogonally similar (Problem ex:8_2_12).
(a)
If and are invertible, show that and are orthogonally similar.
(b)
Show that and are orthogonally similar.
(c)
Show that, if is symmetric, so is .
If is symmetric, show that every eigenvalue of is nonnegative if and only if for some symmetric matrix .
Prove the converse of Theorem th:dotpSymmetric:

If for all -columns and , then is symmetric.

Show that every eigenvalue of is zero if and only if is nilpotent ( for some ).
If has real eigenvalues, show that where is symmetric and is nilpotent.
Let be an orthogonal matrix.
(a)
Show that or .
(b)
Give examples of such that and .
(c)
If , show that has no inverse.
.
(d)
If is and , show that has no inverse.
We call a square matrix a projection matrix if .
(a)
If is a projection matrix, show that is orthogonal and symmetric.
(b)
If is orthogonal and symmetric, show that
is a projection matrix.
(c)
If is and (for example, a unit column in ), show that is a projection matrix.
A matrix that we obtain from the identity matrix by writing its rows in a different order is called a permutation matrix (see Theorem th:LUPA). Show that every permutation matrix is orthogonal.
If the rows of the matrix are orthogonal, show that the -entry of is .
(a)
Let be an matrix. Show that the following are equivalent.
i.
has orthogonal rows.
ii.
can be factored as , where is invertible and diagonal and has orthonormal rows.
iii.
is an invertible, diagonal matrix.
(b)
Show that an matrix has orthogonal rows if and only if can be factored as , where is orthogonal and is diagonal and invertible.
Let be a skew-symmetric matrix; that is, . Assume that is an matrix.
(a)
Show that is invertible.
By Theorem thm:004553, it suffices to show that , in , implies . Compute , and use the fact that and .
(b)
Show that is orthogonal.
(c)
Show that every orthogonal matrix such that is invertible arises as in part (b) from some skew-symmetric matrix .
Solve for .
Show that the following are equivalent for an matrix .
(a)
is orthogonal.
(b)
for all .
(c)
for all , .
(d)
for all columns , .
For (d) (a), show that column of equals , where is column of the identity matrix.
(a)
Show that is an orthogonal matrix.
(b)
Show that every orthogonal matrix has the form or for some angle .
If , then and for some angle .
Modify the proof of Theorem th:PrinAxes to prove Theorem th:Schur.

Text Source

This section was adapted from Section 8.2 of Keith Nicholson’s Linear Algebra with Applications. (CC-BY-NC-SA)

W. Keith Nicholson, Linear Algebra with Applications, Lyryx 2018, Open Edition, p. 424