Let \(v_1,\ldots, v_n\) be orthogonormal eigenvectors of \(A\) such that \(Av_i=\lambda_i v_i\text{.}\) Then \(P=\begin{bmatrix} v_1\amp v_2\cdots v_n\end{bmatrix}\) is orthogonal. Hence
\begin{equation*}
P^TAP={\rm diag}(\lambda_1,\ldots,\lambda_n)=D.
\end{equation*}
Hence \(A\) is orthogonally diagonalizable.
Suppose there exists an orthogonal matrix
\(P\) susch that
\(P^{-1}AP=D\text{.}\) Then
\(AP=PD\text{.}\) Let
\(D={\rm diag}\{\lambda_1,\ldots,\lambda_n\}\) and
\(v_1,\ldots, v_n\) be columns of
\(P\text{,}\) then
\(\{v_1,\ldots, v_n\}\) is an orthonormal basis of
\(\R^n\text{.}\) Also
\(AP=PD\) implies
\(Av_i=\lambda_i v_1\text{.}\) Hence
\(\beta\) is an orthonormal eigenbasis of
\(A\text{.}\)
If \(A\) is orthogonally diagonalizable with \(P^TAP=D\) then
\begin{equation*}
A^T={(PDP^T)}^T=PDP^T=A.
\end{equation*}
Hence \(A\) is symmetric.
We prove this result using induction on
\(n\text{.}\) For
\(n=1\text{.}\) Let
\(A=[\alpha]\text{.}\) Then
\(\{1\}\) is an orthonormal basis of
\(\R\) and it is also an eigenvector.
Assume that the result is true for
\(n-1\text{.}\) That is if
\(A\) is an
\((n-1)\times (n-1)\) real symmetric matrix then it is orthogonally diagonalizable.
Let us prove the result for
\(n\text{.}\) Let
\(A\) be an
\(n\times n\) real symmetric matrix. By the fundamental theorem of algebra, we know that every real polynomial of has a root in
\(\mathbb{C}\text{.}\) Hence the characteristic polynomila of
\(A\) has a complex characteristics root. By
TheoremΒ 5.3.4, all eigenvalues of
\(A\) are real. Thus
\(A\) has a real eigenvalue, say,
\(\lambda\text{.}\) Let
\(u\) be a unit eigenvector corresponding to the eigenvalue
\(\lambda\) and
\(W=\R u\text{.}\) Then
\(W\) is a one dimensional subspace of
\(\R^n\text{.}\) Hence
\(W^\perp\) an
\((n-1)\)-dimensional subspace of
\(\R^n\text{.}\) Also
\(W\) is
\(A-\)invariannt. Hence by
CheckpointΒ 6.3.12,
\(W^\perp\) is
\(A\)-invariant. Also
\(\R^n=W\oplus W^\perp\text{.}\)
Let \(\beta = \{u,v_1,\ldots,v_{n-1}\}\) be an extended orthonormnal basis of \(A\text{.}\) Let \(P=[u~v_1~\cdots~v_{n-1}]\text{,}\) the orthogonal matrix whose columns are vectors \(u,v_1,\ldots,v_{n-1}\text{.}\) The the matrix \(M\) of \(A\) with respect to \(\beta\) is \(P^TAP\) which is of the form
\begin{equation*}
M=\left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp C
\end{array}\right]\text{,}
\end{equation*}
where \(C\) is an \((n-1)\times (n-1)\) real symmetric matrix. (why)? Hence by induction, there exists an \((n-1)\times (n-1)\) orthogonal matrix \(Q\) such that \(Q^TCQ=D\text{,}\) a diagonal matrix. Hence
\begin{equation*}
M=\left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp D
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q^T
\end{array}\right]
\end{equation*}
Thus we have
\begin{equation*}
P^TAP = M = \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp D
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q^T
\end{array}\right].
\end{equation*}
This implies
\begin{equation*}
A = P\left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp D
\end{array}\right] \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q^T
\end{array}\right]P^T.
\end{equation*}
Define \(P_1=P\left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp Q
\end{array}\right]\) . The \(P_1\) is an orthogonal matrix and
\begin{equation*}
A=P_1 \left[
\begin{array}{c|c}
\lambda \amp 0 \\ \hline
0 \amp D
\end{array}\right] P_1^T.
\end{equation*}