<s>[INST] Spectral Decomposition of $A=PDP^{-1}$ We just crammed spectral decomposition into our last lecture of the quarter, and I'm quite confused by it.
The following question is on my homework:
Use the matrices P and D to construct a spectral decomposition of $A=PDP^{-1}$.
$A=\begin{bmatrix}-1 & -4 & -4\\-4 & -3 & 0\\-4 & 0 & 1\end{bmatrix}$, $P=\begin{bmatrix} u_1 & u_2 & u_3\end{bmatrix}=\begin{bmatrix}-\frac{2}{3} & \frac{1}{3} & -\frac{2}{3}\\\frac{1}{3} & -\frac{2}{3} & -\frac{2}{3}\\\frac{2}{3} & \frac{2}{3} & -\frac{1}{3}\end{bmatrix}$, $D=\begin{bmatrix}5 & 0 & 0\\0 & -1 & 0\\0 & 0 & -7\end{bmatrix}$
I understand enough to get that $A=5u_1u_1^T-1u_2u_2^T-7u_3u_3^T$, but I don't get how to compute $u_1u_1^T$, $u_2u_2^T$, $u_3u_3^T$
 [/INST] For example, compute
$$
u_1u_1^T = \pmatrix{- \frac 23 \\ \frac 13 \\ \frac 23 } \pmatrix{- \frac 23 & \frac 13 & \frac 23 } =\\ 
\pmatrix{\frac 49 & - \frac 29 & - \frac 49\\
- \frac 29 & \frac 19 & \frac 29\\
- \frac 49 & \frac 29 & \frac 49}
$$
</s>