Let $X \in \mathbb{R}^{n \times n}$ and $Z \in \mathbb{R}^{n \times n}$ be symmetric matrices.
Assume that $Q=\left[q_{1}, \ldots, q_{r}\right]$ is an $n \times r$ matrix whose columns form an orthonormal basis of
$$ \operatorname{ker} X := \{ v \in \mathbb{R}^{n} \mid Xv = 0 \} \,. $$
I am working on proving the following claim:
If
$$ X Z = 0_{n,n} $$
then there exists a symmetrix matrix $Y \in \mathbb{R}^{r \times r}$ such that
$$ Z=Q Y Q^{\top} \,. $$
This claim is part of a lemma from a paper I am currently reading. In this paper the above claim is proved by the following:
$X Z=0_{n,n}$ implies that
$$ \operatorname{range} Z \subset \operatorname{ker} X=\operatorname{span}\left\{q_{1}, \ldots, q_{r}\right\} \,, $$
where $\operatorname{range} Z := \{ u \in \mathbb{R}^{n} \mid \exists v \in \mathbb{R}^{n} \, \text{ s.t. } \, Zv = u \}$.
This implies that
\begin{equation} Z \in \operatorname{span}(\{q_{i} q_{j}^{\top}+q_{j} q_{i}^{\top} \mid i, j=1, \ldots, r\})=\left\{Q Y Q^{\top} \mid Y \text{ is a symmetric } r \times r \text{ matrix}\right\} \end{equation}
I am not sure how to proceed from here. Any help is much appreciated.