Given a generic $2 \times 2$ matrix $A$:
$$ \left[ \begin{array}{cc} a&b\\ c&d \end{array} \right] $$
the exercise is to determine conditions for $a$, $d$ and $b-c$ such that $tr(XAY^{T})$ is an inner product.
Verifying linearity and symmetry we get $b=c$.
My problem is verifying the positive-definite propertie. I arrived at the expression, where $x_1, x_2, x_3, x_4$ are the elements of the matrix $X$:
$tr(XAX^{T}) = a(x_1^2+x_3^2) + d(x_2^2+x_4^2) + (b+c)(x_1x_2 + x_3x_4)$
but was unable to analyse the conditions $a$ and $d$ should satisfie.
For the positive-definite part, suppose that $A$ is not positive definite. Then there exists nonzero $z\in\mathbb R^2$ such that $t=z^TAz\leq0$. So $$ \operatorname{Tr}(zz^TAzz^T)=t\,\operatorname{Tr}(zz^T)\leq0, $$ since $\operatorname{Tr}(zz^T)\geq0$.