# Quadratic form of a trace

Let $$V := \left\{ X \in \mathfrak{gl}(2,\mathbb{R}) \mid \mbox{tr}(X) = 0 \right\}$$ be a vector space over $$\mathbb{R}$$. Prove that function $$V\ni X \mapsto q(X) := \mbox{tr}(XDX^{T}),$$ where $$D=\begin{pmatrix} 1 & 1\\ 0 & -1\end{pmatrix}$$ is a quadratic form. Then reduce $$q$$ to a canonical form and calculate its signature.

Edited: I do not know if my procedure it's correct. I wrote $$q(X)$$ in the following way $$q(X)= tr(XDX^T)=tr \begin{pmatrix} x_1 & x_2\\ x_3 & -x_1 \end{pmatrix} \begin{pmatrix} 1 & 1 \\ 0 & -1 \end{pmatrix}\begin{pmatrix} x_1 & x_3\\ x_2 & -x_1 \end{pmatrix}=x_1x_2+x_3^2-x_2^2-x_1x_3.$$ Now we form a symmetric matrix $$q(X)= \begin{pmatrix} x_1 & x_2 & x_3 \end{pmatrix} \begin{pmatrix} 0 & 1/2 & -1/2 \\ 1/2 & -1 & 0\\ -1/2 & 0 & 1 \end{pmatrix}\begin{pmatrix} x_1\\ x_2\\ x_3 \end{pmatrix}.$$ The eigenvalues of this matrix are $$\lambda_1=0 \ \ \ \lambda_2=-\sqrt{\frac{3}{2}} \ \ \ \lambda_3=\sqrt{\frac{3}{2}},$$ then, the signature is $$\sigma(q)=(1,1,1).$$ Is this right?

• You need to multiply a 2x2 matrix $X$ in $XDX^{\top}$ Commented Mar 16, 2022 at 18:33
• I see... that's why I feel some weird about my procedure Commented Mar 16, 2022 at 18:48
• I'd suggest writing out a simple basis for $V=gl(2,\mathrm{R})| tr(X)=0$ and thinking about what the dimension has to do with the signature. Then using your symmetrized $\begin{pmatrix} 1 & 1/2 \\ 1/2 & -1 \end{pmatrix}$ figure out the symmetric bilinear form $\langle X,Y\rangle$. From here a simple guess works or compute the $3\times 3$ Gram style matrix where $g_{i,j}=\langle X_i, X_j\rangle$ and its signature (where $X_k$ refers to the kth basis vector for $V$) Commented Mar 17, 2022 at 3:16
• What text are you using? Your original attempt indicates that you are lost. I outlined a solution in my above comment. You subsequently accepted as correct an answer that is obviously wrong on dimension grounds. Ref either of my two prior comments. If your current text is confusing I can recommend another but there is more than one major issue here. Commented Mar 19, 2022 at 3:47
• IMHO, it would be better to work with the columns of $X$ rather than with its entries. Commented Mar 19, 2022 at 17:01

You must take X= $$\begin{bmatrix} a & b \\ c & -a \\ \end{bmatrix}$$ Then trace XDX^t works out to ab-b^2 +c^2 -ca which is homogeneous and hence a quadratic form. The matrix of the quadratic form is $$\begin{bmatrix} 0 & 1/2 & -1/2\\ 1/2 & -1 & 0\\ -1/2 & 0 &1\\ \end{bmatrix}$$ whose signature is 0 and rank 2

More generally, given $$n \times n$$ matrix $$\bf A$$,

\begin{aligned} q ({\bf X}) := \mbox{tr} \left( {\bf X} {\bf A} {\bf X}^\top \right) &= \sum_{i=1}^n \sum_{j=1}^n a_{ij} \langle {\bf x}_i, {\bf x}_j \rangle \\ &= (\mbox{vec} ({\bf X}))^\top \left( {\bf A} \otimes {\bf I}_n \right) \mbox{vec} ({\bf X}) \\ &= (\mbox{vec} ({\bf X}))^\top \left( \left(\frac{ {\bf A} + {\bf A}^\top}{2}\right) \otimes {\bf I}_n \right) \mbox{vec} ({\bf X}) \end{aligned}

where $${\bf x}_i$$ denotes the $$i$$-th column of $$\bf X$$, $$\mbox{vec}$$ denotes the vectorization operator and $$\otimes$$ denotes the Kronecker product. The eigenvalues of

$$\left(\frac{ {\bf A} + {\bf A}^\top}{2}\right) \otimes {\bf I}_n$$

are the eigenvalues of the symmetric part of $$\bf A$$ but with algebraic multiplicity multiplied by $$n$$.

Do the following:

For an arbitrary matrix $$\left[\begin{array}{cc}x&y\\v&w\end{array}\right]$$ the quadratic form is $${\rm tr}\left(\left[\begin{array}{cc}x&y\\v&w\end{array}\right]^{\top} \left[\begin{array}{cc}1&1\\0&-1\end{array}\right] \left[\begin{array}{cc}x&y\\v&w\end{array}\right]\right)= x^2+y^2+xv+yw-v^2-w^2,$$ that can be translated to $$\left( \begin{array}{cccc} x&y&v&w \end{array} \right) \left( \begin{array}{cccc} 1 & 0 & \frac{1}{2} & 0 \\ 0 & 1 & 0 & \frac{1}{2} \\ \frac{1}{2} & 0 & -1 & 0 \\ 0 & \frac{1}{2} & 0 & -1 \\ \end{array} \right) \left( \begin{array}{c} x\\y\\v\\w \end{array} \right) = x^2+y^2+xv+yw-v^2-w^2.$$

Such quadratic form has signature $$(+,+,-,-)$$.

• $\dim V = 3\lt 4$ so the signature cannot sum to 4. Further $\displaystyle \left[\begin{matrix}2 & 1\\1 & -2\end{matrix}\right]$ is a null vector so the form is degenerate. Commented Mar 18, 2022 at 18:29
• @user8675309 good catch! Commented Mar 18, 2022 at 19:28
• Thank you that's what I did... I was confused about the $X$. Commented Mar 18, 2022 at 23:49
• still my response is not making use of the trace restriction Commented Mar 19, 2022 at 1:40
• How's that? You used the trace in the first part, didn't you? Commented Mar 19, 2022 at 13:26