Solve $X^TX=A$ for $X$ 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.
 A: The solution can only exist for symmetric $A$. We can then write $A=O^T DO$ with $D$ diagonal (and with non-negative eigenvalues) and $O$ orthogonal. We can then define a square root of $D$ in the obvious way, obtaining $X=\sqrt{D}O$ as one solution. For orthogonal $O'$, a more general solution is  $X=O'\sqrt{D}O$.
A: 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 Λ 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. 
We can form $\tilde{Q}$, $n \times r$, by deleting the columns of $Q$ corresponding to the eigenvectors associated to the eigenvalues equal to 0, and also form $\tilde{\Lambda}$, $r \times r$, which is a 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$.
A: Assume $m=n$. The rows of $X$ are some $n$ vectors in $\mathbb{R}^n$, say, $v_1,\dots, v_n$. The $(i,j)$ element of $X^tX$ is the inner product $v_i\cdot v_j$. So there are at most ${n\choose 2}+n$ different entries in $X^tX$, but $n^2$ possible entries in a general $n\times n$ matrix $A$. As a result, one cannot expect to solve the equation $X^tX=A$ for every $A$.
