Consider the space of symmetric matrices $symm(M)$ over reals of dimension $n \times n$. It is clear that there is a straightforward basis for this space where for any $i \ge j$ $M_{ij}(m,n) = 1$ if $m = i,j$ and $n = j,i$, otherwise 0 everywhere.
I'm trying to understand the following equation:
$$vec(M)\cdot vec(yy^T - zz^T) = 0 $$ where M is a full rank symmetric matrix, $y,z \in \mathbb{R}^n$. Now, can we find $O(d^2)$ vectors in the orthogonal complement of $vec(M)$ such that they span the complement and each can be written as $vec(yy^T - zz^T)$?
In other words, is there a basis to the orthogonal subspace of $M$ such that every element is of the form $vec(yy^T - zz^T)$?
The basis above ${M_{ij}}$ has that desired form where the idea is to just consider extended vectors for $[1/2, 1]$ and $[1/2, -1]$. But this won't ensure why anu other vector has the desired form. Some idea on how to solve this would be useful.
Peliminary result : Let $(S_n)$ be the vector space of real symmetric $n \times n$ matrices. The set of all matrices of the form $xx^T-yy^T$ (which belong to $(S_n)$) generate $(S_n)$.
General idea presented in the even case $n=2p$ (to be adapted for the case where $n$ is odd) presented in the case where all eigenvalue are distinct.
Let $M$ be a symmetric matrix. $M$ is diagonalizable with real eigenvalues which can be either negative or positive.
By a suitable translation, $N=M-tI_n$, we can assume there are as many $<0$ or $\ge 0$ eigenvalues ; call them $-a_k$ and $b_k$ resp. with associated eigenvectors $U_k$ and $V_k$ resp.
Consider the diagonalization identity $N=ADA^T$ where $D=diag(-a_1 \cdots -a_p, b_1 \cdots b_p)$ and denoting the columns of $A$ by $U_1 \cdots U_p, V_1 \cdots V_p$.
This identity can be written :
$$N=\sum_{k=1}^p -a_k U_kU_k^T + \sum_{k=1}^p b_k V_kV_k^T$$
$$N=\sum_{k=1}^p -\underbrace{\sqrt{a_k} U_k}_{Y_k}\sqrt{a_k}U_k^T + \sum_{k=1}^p \underbrace{\sqrt{b_k} U_k}_{X_k}\sqrt{b_k}V_k^T$$
Otherwise said,
$$N=\sum_{k=1}^p (X_k X_k^T-Y_kY_k^T) $$
Now returning to $M=N+tI_n$, it suffices to write
$$I_n=uu^T-vv^T$$ with $v=\mathbb{1_n}$ and $u=\sqrt{2}v$ to complete the decomposition.
This preliminary result answers your question : yes there is a basis of the orthogonal set within $(S_n)$ constituted by matrices $xx^T-yy^T$ because these matrices generate $(S_n)$.
An "operational" example : let us consider the symmetric matrix
$$M=\pmatrix{1&1&0\\ 1&0&0\\ 0&0&0}$$
Its orthogonal space within $(S_n)$ is the five-dimensional space of matrices :
$$M=\pmatrix{-2b&b&c\\ b&d&e\\ c&e&f}=b\underbrace{\pmatrix{-2&1&0\\ 1&0&0\\ 0&0&0}}_{M_b}+c\underbrace{\pmatrix{0&0&1\\ 0&0&0\\ 1&0&0}}_{M_c}+...+f\pmatrix{0&0&0\\ 0&0&0\\ 0&0&1}$$
Express each of the matrices $M_b,M_c,\cdots M_f$ as a linear combination of matrices $x_kx_k^T-y_ky_k^T$ (by the preliminary result) From this "first level" decomposition, reduce progressively this generating (surely over-abundant) set of matrices to a minimal number of elements (i.e., $5$)