# represent the matrix into rank 2

Given an $n\times 1$ vector $x$ and an $n\times 1$ vector $y$. The $n\times n$ matrix $xy^T$ is a rank one matrix. Now let $M=xy^T+yx^T$, how do we represent the matrix $M$ as a rank 2 form $M=AB^T$, where $A$ and $B$ are both $n \times 2$ matrices.

-

$$\begin{bmatrix} x & y\end{bmatrix}\begin{bmatrix} y^\top \\ x^\top\end{bmatrix} =M =xy^\top + yx^\top$$
If you let $K$ be the $n\times 2$ matrix such that $Ke_1=x$ and $Ke_2=y$, where $e_1=(1,0)$ and $e_2=(0,1)$, then you can easily confirm that
$$K\left(\begin{matrix}0&1\\1&0\end{matrix}\right)K^T=M$$