[Math] faster way to do this? Find an orthogonal matrix $P$ and a diagonal matrix $D$ such that $A=PDP^T$

linear algebra

Let $A$=\begin{pmatrix}
0 & 1 & 1\\
1 & 0 & 1\\
1 & 1 & 0
\end{pmatrix}

Find an orthogonal matrix $P$ and a diagonal matrix $D$ such that $A=PDP^T$. (Hint: The eigenvalues of $A$ are all integers.

I managed to do this by finding the eigenvalues through solving the characteristic equation, and then finding the corresponding eigenspace. After that I went ahead to use the Grand-Schdmit process, and got an orthnormal basis.

My solution was mighty complicated, involving 1.5 pages of workings.

Is there a faster way to do this? Question is worth 5 marks.

Best Answer

Using the Gram-Schmidt process, even if you spell it correctly, is not a great idea for this kind of question, as it will in general spoil the hard-earned property of being a basis of eigenvectors. Here is an opportunistic approach that works for this particular matrix $A$.

On thing that is easy to note is that $A+I$ has all entries $1$, so that not only its determinant is $0$, but its rank is only $1$: $$ A+I=\begin{pmatrix}1\\1\\1\end{pmatrix}\cdot\begin{pmatrix}1&1&1\end{pmatrix} $$ Thus the eigenspace for $\lambda=-1$ is the $2$-dimensional kernel of the right matrix $(1~~1~~1)$, the plane given by the equation $x+y+z=0$. Since the trace of $A$ is the sum of its eigenvalues (taken with multiplicities), and it is $0$, the remaining eigenvalue is $2$, and an eigenvector for it is $(1~~1~~1)^T$, which is orthogonal (as it should be given that $A$ is symmetric) to the other eigenspace $x+y+z=0$.

Now to find $P$ we need an orthogonal basis of the eigenspace $x+y+z=0$, and then normalise all those eigenvectors. I can't see any particularly nice orthogonal pairs in that eigenspace, so I'll just take the first vector that comes to mind $(1~~-1~~0)^T$ and take the cross product with the eigenvector $(1~~1~~1)^T$ for $\lambda=2$, to give $(-1~~-1~~2)^T$. Dividing by the norms of these vectors I find $$ P=\frac1{\sqrt6} \begin{pmatrix}\sqrt3&-1&\sqrt2\\-\sqrt3&-1&\sqrt2\\0&2&\sqrt2\end{pmatrix} \qquad \text{and}\qquad D=\begin{pmatrix}-1&0&0\\0&-1&0\\0&0&2\end{pmatrix}. $$

Related Question