Solving the matrix equation $X^T~ J ~X=\Phi$ under the given metric $J$ with skew-symmetric $\Phi$ How do I solve for $X$ in the matrix equation (with $^T$ representing the $transpose$ operation):

$X^T~ J ~X=\Phi$, 

where $X$ is a $2 \times 5$ matrix, "metric" $J_{2\times 2}=\begin{bmatrix}
    0       & 1  \\
    -1       & 0 \\
\end{bmatrix}$, and $\Phi_{5\times 5}$ being a known anti-symmetric/skew-symmetric square matrix with all real entries?
 A: Since $J$ has rank 2, the equation in question is solvable only if the rank of $\Phi$ is either 0 or 2.
Suppose $\Phi$ is a rank-2 skew-symmetric matrix first. Then there exists a real orthogonal matrix $Q$ such that $Q^T\Phi Q=aJ\oplus 0_{3\times3}$ for some $a\ne0$. Let $Y=XQ=(\mathbf y_1,\mathbf y_2,\ldots,\mathbf y_5)$. The equation in question is then equivalent to $Y^TJY=aJ\oplus 0_{3\times3}$, which amounts to the system of equations
\begin{cases}
\det(\mathbf y_1,\mathbf y_2)=a,\\
\det(\mathbf y_i,\mathbf y_j)=0 \text{ when } i\notin\{1,2\} \text{ or } j\notin\{1,2\}.
\end{cases}
The first equation implies that $\mathbf y_1$ and $\mathbf y_2$ are linearly independent. In turn, the second one implies that $\mathbf y_3=\mathbf y_4=\mathbf y_5=0$. Therefore the general solution is given by $Y=(M,0_{2\times 3})$ or $X=(M,0_{2\times 3})\,Q^T$, where $M$ is any $2\times2$ matrix of determinant $a$.
Next we consider the case $\Phi=0$. By an analogous argument to the above, we see that the general solution is given by any matrix $X$ of rank at most 1.
