<s>[INST] Quadratic form as a homogenous polynomial Let $Q(v)=v'Av$, where$v=\begin{pmatrix}x&y&z&w\end{pmatrix}\ \ A=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix}$, then does there exist an invertible matrix $P$ such that $Q(Pv)=x^2+y^2-zw$? Note that all terms are in $\mathbb{R}$. I think we should use orthogonal diagonalization of $A$. But, the term $zw$ is intriguing
 [/INST] Note that $Q(Pv)=v^{\top}P^{\top}APv$, so one approach is to find $P$ such that
$$P^{\top}AP=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&-\frac{1}{2}\\0&0&-\frac{1}{2}&0\end{pmatrix}.$$
As the first two rows and columns of $P^{\top}AP$ are the same as those of $A$, it makes sense to have $P$ leave those alone, i.e. to take $P$ of the form
$$P=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&a&b\\0&0&c&d\end{pmatrix}.$$
This reduces the problem to a problem on $2\times2$-matrices, which is very manageable without any theory. We get the system of equations
\begin{eqnarray*}
ac+ba&=&0,\\
c^2+ad&=&-\frac{1}{2},\\
b^2+ad&=&-\frac{1}{2},\\
cd+bd&=&0
\end{eqnarray*}
which immediately implies $b^2=c^2$, and $b+c=0$ or $a=d=0$. This immediately shows the easy solution $a=d=0$ and $b=c=\frac{1}{\sqrt{2}}i$. The remaining (family of) solutions is not hard to determine from the system above.
</s>