For the matrix $$\begin{pmatrix} 2 & 2 \\ 2 & 2 \\ \end{pmatrix}$$
Find a matrix that orthogonally diagonalizes A. Find a matrix such that $P^t$$AP$ is diagonal.
For the matrix $$\begin{pmatrix} 2 & 2 \\ 2 & 2 \\ \end{pmatrix}$$
Find a matrix that orthogonally diagonalizes A. Find a matrix such that $P^t$$AP$ is diagonal.
The eigenvectors are easily seen to be $(1,1)$ and $(1,-1)$, which gives $$ P = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, $$ and $$ P^{T} \begin{pmatrix} 2 & 2 \\ 2 & 2 \end{pmatrix} P = \begin{pmatrix} 4 & 0 \\ 0 & 0 \end{pmatrix}. $$
Find the eigenvectors and construct a matrix P with colums of P the eigenvectors. This P will give you what you want.