Solution (source code)

= Solution

If $A^T=-A$, then the scalar $x^TAx$ equals its own transpose and hence
$$
x^TAx=(x^TAx)^T=x^TA^Tx=-x^TAx,
$$
so it vanishes.

Conversely, suppose $x^TAx=0$ for every real $x$. Taking $x=e_i$ gives $A_{ii}=0$. Taking $x=e_i+e_j$ then gives $A_{ij}+A_{ji}=0$. Thus every entry satisfies $A^T=-A$, and
$$
\boxed{x^TAx=0\text{ for all }x\quad\Longleftrightarrow\quad A\text{ is skew-symmetric}.}
$$