# Unitary Diagonalization of Quadratic Form

Consider the following quadratic form over $$\mathbb{R}^3$$:

$$q = x_1^2+4x_1x_2-2x_1x_3+8x_2^2+2x_3^2-8x_2x_3$$

It's fairly easy to arrive at the diagonal form of $$q$$ - by using Lagrange's method (repeated complete the square), we get

$$q = (x_1+2x_2-x_3)^2+(2x_2-x_3)^2$$

So, the "canonical" diagonal form (with only $$1$$s, $$-1$$s and $$0$$s in the diagonal) of $$q$$ is:

$$\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}$$

Q. Is there an orthonormal basis in which the representing matrix of $$q$$ is canonically diagonal?

Intuitively, is seems that no such basis exists, since we've arrived at the diagonal form with a non-orthonormal basis, but I couldn't find a formal proof for that.

Any ideas?

• I see you've been trying to edit my post. It would be better to ask questions in the comments. – Yly Sep 27 '18 at 16:42
• I've revised the question itself due to a calculation error in the original version (see that now $q$ is congruent to $\text{diag}(1,1,0)$), and wanted to update the answer accordingly. Also I just wanted to add a clarification about congruence vs diagonalization by eigenvectors – matan129 Sep 27 '18 at 16:46
• I've made a modification to my answer (changed a $=$ to a $\leq$) which handles your modification to the question. – Yly Sep 27 '18 at 16:49
• As for diagonalization vs. congruence, you should make your remarks either in the question itself, or here in the comments. – Yly Sep 27 '18 at 16:50

There can't be an orthonormal basis for which the quadratic form has canonical diagonal form, because if there were such a basis $$\{v_1,v_2,v_3\}$$, then for any unit vector $$u = \sum_i \lambda_i v_i$$ we would have $$q(u) = \left(\sum_i \lambda_i v_i\right)^T A \left(\sum_i \lambda_i v_i\right) = \begin{bmatrix}\lambda_1 & \lambda_2 & \lambda_3\end{bmatrix} \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix}\lambda_1\\ \lambda_2 \\ \lambda_3\end{bmatrix} \leq \sum_i \lambda_i^2 = 1$$
But this is false, because from your definition of $$q$$, we see that e.g. $$q(0,1,0)=8$$.
By writing $$A$$ as a symmetric matrix you can find an orthonormal basis that diagnonalizes it (because a symmetric matrix always can always be diagonalized by a rotation matrix), but the diagonal entries will then be the eigenvalues of $$A$$, not $$1$$.