I have a $d\times d$ rank-1 matrix $A$ and a diagonal matrix $D$ of the same dimension with non-negative diagonal entires, and I want to find two orthogonal matrices $S_1$ and $S_2$ in $O(d)$ such that: $\mathrm{trace(AS_1DS_2)}=0$.
The pair $(S_1,S_2)$ is not unique, consider for example $S_2=I_d$ be the identity matrix and decompose $A$ as $A=v_1v_2^T$. Now we want $S_1$ to make the vectors $Dv_1$ and $v_2$ perpendicular, for which there is infinite solutions $(d\geq 3)$.
I would like to find all such pairs if possible.