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?
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$.