Find a diagonal form of the quadratic form $f(x) = \sum_{i = 1}^nx_i^2 + \sum_{i < j}x_ix_j$

linear algebraquadratic-forms

Find a diagonal form of the quadratic form
$$f(x) = \sum_{i = 1}^nx_i^2 + \sum_{i < j}x_ix_j.$$

It turned out to be such a problem:
How to change quadratic form $f(x) = \sum_{i = 1}^nx_i^2 + \sum_{i < j}x_ix_j$ into diagonal form?

We can solve it with congruent transformation, although it is a little complex.
Besides, I tried to transform it into a diagonal form by orthogonal transformation, since its quadratic matrix has the same diagonal elements and the same non-diagonal elements(I thought that I can find a simple way to find its eigenvalues and eigenvectors, but failed. Maybe you can try it).

Is there any other way?

Best Answer

The matrix $M$ of this quadratic form has the form $$ M=\frac12(I_n+J_n), $$ where $J_n$ is the $n\times n$ matrix with all ones.

The eigenvalues of $J_n$ are obviously $\lambda_1=n$ (multiplicity one) and $\lambda_2=\lambda_3=\cdots=\lambda_n=0$ (multiplicity $n-1$). Therefore the eigenvalues of $M$ are $(n+1)/2$ (multiplicity one) and $1/2$ (multiplicity $n-1$). Implying that there exists an orthogonal coordinate transformation $(x_1,x_2,\ldots,x_n)\mapsto (x_1',x_2',\ldots,x_n')$ such that in the primed coordinates the quadratic form takes the form $$ Q(x_1',x_2',\ldots,x_n')=\frac12\left((n+1)x_1'^2+x_2'^2+x_3'^2+\cdots+x_n'^2\right). $$ An orthonormal basis corresponding to the primed coordinates can be found by orthonormalizing any basis of the $(n-1)$-dimensional subspace $$V=\{(x_1,x_2,\ldots,x_n)\in\Bbb{R}^n\mid x_1+x_2+\ldots+x_n=0\}$$ which is equal to the eigenspace of $J_n$ belonging to the eigenvalue zero. The missing basis vector is the unit vector $\dfrac1{\sqrt n}(1,1,\ldots,1)$ spanning the orthogonal complement of $V$.


It is (very likely) possible to describe an orthonormal basis of $V$ with a lot of symmetries. I'm not sure I want to go there, though. I would start with a complex basis consisting of roots of unity of order $n$, and go from there.

Related Question