I'd like to write $2xy+2xz+2yz$ in the form $a(\cdots)^2+b(\cdots)^2+c(\cdots)^2$ where each blank space is a linear combination of $x,y,z$. The closest I have is:
$$(x+y+z)^2-(x-z)^2-y^2=2xy+4xz+2yz$$ Working: Spotting something didn't work so I've noted that:
$$\mathbf{x}^{\text{T}}M\mathbf{x}=2xy+2xz+2yz;\quad M=\begin{pmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 &0 \end{pmatrix}$$ I found eigenvalues $2,-1,-1$ and the eigenvectors $(1,1,1),\;(-1,1,0),\;(-1,0,1)$.
So in the eigenbasis the expression becomes $2u^2-v^2-w^2$. But I'm having trouble writing $u,v,w$ in terms of $x,y,z$. Can someone help?
If it is of any help:
$$P=\begin{pmatrix} -1 & -1 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 1\end{pmatrix}\quad P^{-1}=\frac{1}{3}\begin{pmatrix} -1 & -1 & 2 \\ -1 & 2 & -1 \\ 1 & 1 & 1\end{pmatrix}$$
Give $M=PDP^{-1}$ where $D$ is diagonal with entries $-1,-1,2$.