{%hackmd 5xqeIJ7VRCGBfLtfMi0_IQ %}
# Find an orthonormal basis composed of eigenvectors
## Problem
Let
$$
A = \begin{bmatrix}
0 & 0 & 1 & 1 \\
0 & 0 & 1 & 1 \\
1 & 1 & 0 & 0 \\
1 & 1 & 0 & 0
\end{bmatrix}.
$$
Find the eigenvalues of $A$ and an orthonormal basis of $\mathbb{R}^4$ composed of eigenvectors of $A$.
## Thought
Since $A$ is a symmetric matrix, its eigenvalues are real and there is an orthonormal basis composed of eigenvectors of $A$ by the spectral theorem. Thus, the process of finding eigenvalues are the same, but we have to solve for an orthonormal basis of $\ker(A - \lambda I)$ for each eigenvalue $\lambda$. Eventually, we may normalize the length of all eigenvectors to make it orthonormal.
## Sample answer
One may compute the characteristic polynomial
$$
p_A(x) = x^4 - 4x^2.
$$
Thus, the eigenvalues are $2, -2, 0, 0$.
For $\lambda = 2, -2$, one may find eigenvectors
$$
\bu_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix}, \text{ and }
\bu_2 = \begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \end{bmatrix}.
$$
For $\lambda = 0$, we may follow [Find an orthonormal basis of a subspace](https://hackmd.io/@jephianlin/ryV2RtwQA) to find an orthogonal basis of $\ker(A - 0I)$ and get
$$
\bu_3 = \begin{bmatrix} 1 \\ -1 \\ 0 \\ 0 \end{bmatrix}, \text{ and }
\bu_4 = \begin{bmatrix} 0 \\ 0 \\ 1 \\ -1 \end{bmatrix}.
$$
By replacing $\bu_i$ with $\frac{1}{\|\bu_i\|}\bu_i$, we have
$$
\bu_1 = \frac{1}{2}\begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix},
\bu_2 = \frac{1}{2}\begin{bmatrix} 1 \\ 1 \\ -1 \\ -1 \end{bmatrix},
\bu_3 = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 \\ -1 \\ 0 \\ 0 \end{bmatrix}, \text{ and }
\bu_4 = \frac{1}{\sqrt{2}}\begin{bmatrix} 0 \\ 0 \\ 1 \\ -1 \end{bmatrix}.
$$
Finally, $\{\bu_1, \bu_2, \bu_3, \bu_4\}$ is an orthonormal basis of $\mathbb{R}^4$ composed of eigenvectors of $A$.
*This note can be found at Course website > Learning resources.*