Find an orthogonal matrix $Q$ and a diagonal matrix $D$ such that $A=QDQ^T$

gram-schmidtmatricesorthogonalityvector-spaces

Let $$A=\begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}$$
Find an orthogonal matrix $Q$ and a diagonal matrix $D$ such that $A=QDQ^T$.

I already got these Eigenvalues $D=\begin{bmatrix}0&0&0\\0&0&0\\0&0&3\end{bmatrix}$and Eigenvectors $P=\begin{bmatrix}-1&-1&1\\1&0&1\\0&1&1\end{bmatrix}$

\begin{align}
\langle v_1,v_2\rangle &= \quad \!1+0+0=1 \\
\langle v_1,v_3\rangle &=-1+1+0=0 \\
\langle v_2,v_3\rangle &=-1+0+1=0
\end{align}

$\because \langle v_1,v_3\rangle= \langle v_2,v_3\rangle=0 \space \therefore A=A^T$

$\because \langle v_1,v_2\rangle=1+0+0=1 \space \therefore v_1\perp v_2$

But I have no idea what is the next step.

Best Answer

I try to give my input from a methodical approach. From your above computations, we can see that:

For $\lambda = 0$, these eigenvectors $\{v_1,v_2\}$ span the eigenspace $E_{\lambda=0}$: \begin{Bmatrix} \begin{bmatrix} -1\\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -1\\ 0 \\ 1 \end{bmatrix} \end{Bmatrix}

and for $\lambda = 3$, this eigenvector $\{v_3\}$ span the eigenspace $E_{\lambda=3}$: \begin{Bmatrix} \begin{bmatrix} 1\\ 1 \\ 1 \end{bmatrix} \end{Bmatrix}

These eigenvectors are linearly independent. However, there are repeated eigenvalues for $\lambda = 0$. Next, we check $\langle v_1, v_2 \rangle$. We observe that these eigenvectors are not orthogonal, as what you have shown $\langle v_1, v_2 \rangle =1\neq0$.

Hence, we can use Gram-Schmidt orthogonalization to obtain our orthonormal set.

For $E_{\lambda=0}$, we find our orthonormal vectors $\{e_1, e_2\}$:

\begin{align} u_1 & = v_1 \\ e_1 & = \frac{u_1}{||u_1||} = \frac{1}{\sqrt2} \begin{bmatrix} -1\\ 1 \\ 0 \end{bmatrix} \\ \DeclareMathOperator{\proj}{proj} & \\ u_2 & = v_2 - \proj_{u_1} (v_2) \\ & = v_2 - \langle v_2, u_1\rangle u_1\\ & = \begin{bmatrix} -1\\ 0 \\ 1 \end{bmatrix} - \left\langle \begin{bmatrix} -1\\ 0 \\ 1 \end{bmatrix}, \frac{1}{\sqrt2} \begin{bmatrix} -1\\ 1 \\ 0 \end{bmatrix} \right\rangle \frac{1}{\sqrt2} \begin{bmatrix} -1\\ 1 \\ 0 \end{bmatrix} \\ & = \begin{bmatrix} -1/2\\ -1/2 \\ 1 \end{bmatrix} = \frac{1}{2} \begin{bmatrix} -1\\ -1 \\ 2 \end{bmatrix} \\ e_2 & = \frac{u_2}{||u_2||} = \frac{1}{\sqrt6} \begin{bmatrix} -1 \\ -1 \\ 2 \end{bmatrix} \\ \end{align}

For $E_{\lambda=3}$:

\begin{align} u_3 & = v_3 \\ e_3 & = \frac{u_3}{||u_3||} = \frac{1}{\sqrt 3} \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} \\ \end{align}

Hence, $$ \begin{align} Q & = [e_1 \space e_2 \space e_3] = \begin{bmatrix} -1/ \sqrt2 & -1/ \sqrt6 & 1/ \sqrt3\\ 1/ \sqrt2 & -1/ \sqrt6 & 1/ \sqrt3\\ 0/ \sqrt2 & 2/ \sqrt6 & 1/ \sqrt3\\ \end{bmatrix}: \\ D & = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 3 \\ \end{bmatrix} \end{align} $$