Find a matrix $B$ so that $A=BB^T$

linear algebramatrices

refer to this topic

I have matrix $A=\begin{pmatrix}3&2&2\\2&3&2\\2&2&7\end{pmatrix}$ ,
$D=\begin{pmatrix}1&0&0\\0&3&0\\0&0&9\end{pmatrix}$ and
$P=\begin{pmatrix}1&1&1\\-1&1&1\\0&-1&2\end{pmatrix}$

By $B\equiv P\sqrt{D}$, I got $B=\begin{pmatrix}1&1&1\\-1&1&1\\0&-1&2\end{pmatrix} \begin{pmatrix}1&0&0\\0&\sqrt3&0\\0&0&3\end{pmatrix}$

So $B= \begin{pmatrix}1&\sqrt3&3\\-1&\sqrt3&3\\0&-\sqrt3&6\end{pmatrix} $

However when I plug $B$ into $BB^T$ I didn’t get the matrix $A$.

Best Answer

Your $P$ isn't orthogonal. Sure, the columns are all pairwise orthogonal, but the rows aren't. Or, more pecisely, the columns are orthogonal but not orthonormal. This doesn't make $A = PDP^{-1}$ an incorrect diagonalisation, but does mean that $A \neq PDP^T$, as $P^{-1}\neq P^T$.

You need to make each column of $P$ into a unit vector. Which is to say, you need $$ P = \begin{pmatrix}\frac{1}{\sqrt2}&\frac1{\sqrt3}&\frac1{\sqrt6}\\ -\frac1{\sqrt2}&\frac1{\sqrt3}&\frac1{\sqrt6}\\ 0&-\frac1{\sqrt3}&\frac2{\sqrt6}\end{pmatrix} $$ This way we actually do have $P^{-1} = P^T$, which means that $A = PDP^{-1}$ is indeed equal to $PDP^T$, and your $B = P\sqrt D$ will work.