as the title says, find the symmetric matrix (or signature) of $Q(X)=trace(X^2)$ where $X$ is an $n$ by $n$ matrix with real entries.
the diagonal of $X^2$ is $$\sum_{k=1}^n x_{ik}x_{ki}$$
So $$Q(X)=\sum_{i=1}^n \sum_{k=1}^n x_{ik}x_{ki}$$
How does this help us find the signature?
It's simple to show that the quadratic form $$\Phi(X)=\operatorname{tr}(X^TX)$$ is definite positive.
Now if $X$ is symmetric then $Q(X)=\Phi(X)$ then $Q$ is definite positive on the space of symmetric matrices and if $X$ is antisymmetric then $Q(X)=-\Phi(X)$ hence $Q$ is definite negative on the space of antisymmetric matrices and we have $$\mathcal{M}_n(\Bbb R)=\mathcal S_n(\Bbb R)\oplus \mathcal{AS}(\Bbb R)$$ Can you deduce the signature of $Q$?