Given symmetric matrix $A \in \Bbb R^{n \times n}$, how does one solve the following quadratic matrix equation in matrix $X \in \Bbb R^{m \times n}$?
$$ X^T X = A $$
I know this must be simple, but I have been wrestling with it for some time now. Thanks in advance for any help.
Since $A$ is symmetric $n \times n$, we can write it as $A=Q \Lambda Q^T$, where $Q$ is an orthogonal matrix whose columns are the eigenvectors of $A$, and $\Lambda$ is a diagonal matrix whose entries are the eigenvalues of $A$.
We want to decompose $A=X^TX$, where $X$ is $m \times n$.
Let $\mathbf{rank}(A)=r<\min(m, n)$, therefore, $A$ is not full rank and have $n-r$ eigenvalues equal to $0$.
Thus, we can form and $n \times r$ matrix $\tilde{Q}$ by deleting the columns of $Q$ corresponding to the eigenvectors associated to the eigenvalues equal to $0$, and also form $\tilde{\Lambda}$, an $r \times r$ diagonal matrix whose entries are the non-zero eigenvalues of $A$. Thus, we have $$A=\tilde{Q} \tilde{\Lambda} \tilde{Q}^T = \tilde{Q} \sqrt{\tilde{\Lambda}} \sqrt{\tilde{\Lambda}} \tilde{Q}^T = (\sqrt{\tilde{\Lambda}} \tilde{Q}^T)^T \sqrt{\tilde{\Lambda}} \tilde{Q}^T = X^TX,$$
where $X := \sqrt{\tilde{\Lambda}} \tilde{Q}^T$, with dimensions $r \times n$.
The only problem is that $\mathbf{rank}(A)=r=\min(m, n)$, for $m=r$. To solve this issue, when forming $\tilde{Q}$, delete all but one of the columns of $Q$ corresponding eigenvectors associated to the eigenvalues equal to $0$. Doing this, $X$ will end up with dimensions $(r+1) \times n$, satisfying the inequality $\mathbf{rank}(A)=r<\min(m, n)$, for $m=r+1$.