# Find positive and negative indecies of inertia of a quadratic form

Find positive and negative indecies of inertia of a quadratic form $q(x)= trX^2$ on the $M_n(\mathbb{R})$ (vector space of square matrices ).

How to do that? Thanks.

• Find an orthogonal basis and look at the signs of the diagonal coefficients. – KCd Mar 17 '13 at 20:18
• What's an inertia index? – Will Jagy Mar 17 '13 at 20:34
• en.wikipedia.org/wiki/… – Will Jagy Mar 17 '13 at 20:54
• If $X = (x_{ij})$, then $\text{tr}(X^2) = \sum_i \sum_k x_{ik} x_{ki}$. Let $\mathbf{x} = (x_{11}, \ldots, x_{1n}, x_{21}, \ldots, x_{2n}, \ldots, x_{n1}, \ldots, x_{nn})$. What you need to do: Find a matrix $H$ such that $\text{tr}(X^2) = \mathbf{x}^T H \mathbf{x}$. Then find the inertia of $H$. – Dominique Mar 17 '13 at 21:41

Let $E_{ij}$ be the matrix whose $(i,j)$-th entry is $1$ and all other entries zero. . Since $\operatorname{tr}(X^2)=\operatorname{tr}\left(X(X^T)^T\right)$, the matrix of the quadratic form $q$ with respect to the standard basis $\{E_{ij}\}_{i,j=1,\ldots,n}$ of $M_n(\mathbb{R})$ is the commutation matrix $K=K^{(n,n)}$. (That is, $K$ is the $n^2\times n^2$ real symmetric permutation matrix such that $K\operatorname{vec}(X)=\operatorname{vec}(X^T)$.) Clearly, for each $i$, $\operatorname{vec}(E_{ii})$ is an eigenvector of $K$ corresponding to the eigenvalue $1$ (because $E_{ii}^T=E_{ii}$). Also, for all $i\neq j$, $\operatorname{vec}(E_{ij}+E_{ji})$ is an eigenvector of $K$ corresponding to the eigenvalue $1$ and $\operatorname{vec}(E_{ij}-E_{ji})$ is an eigenvector of $K$ corresponding to the eigenvalue $-1$. Since these vectors form a basis of $\mathbb{R}^{n^2}$, we conclude that $K$ has $\frac{n^2+n}2$ positive eigenvalues and $\frac{n^2-n}2$ negative eigenvalues.