Solving a linear matrix equation Could you please help me solve this problem?
Given a $n$ by $m$ matrix $Q$ whose columns are orthonormal ($rank(Q)=m$) and a $n$ by $n$ symmetric definite positive matrix $X$ (the unknown) and another $n$ by $n$ symmetric definite positive matrix $B$.
We want to solve the following problem:
$$QQ^{t}XQQ^t=B$$
We put $A=QQ^t$, the problem is then formulated as: $AXA=B$ in this case $det(A)=0$ 
One manipulation that could be done is:
$$Q^tQQ^tXQQ^tQ=Q^tBQ=Q^tXQ$$ since $$Q^tQ=I$$ (Vectors are orthonormal)
Now I'm stuck with the following equation, is there any ideas to solve it to find X? 
$$Q^tXQ=Q^tBQ$$
or 
$$Q^t(X-B)Q=Q^tMQ=0$$
Thank you in advance.
 A: If I understand the statement of the problem correctly, $A=Q Q^t$ is an orthonormal projection onto an $m$ dimensional subspace of ${\Bbb R}^n$: $A^2=A=A^t$.
You have a solution iff the image of $B$ is in the image of $A$. In this case $ABA=B$ as well (when $B$ is symmetric) so a solution is simply $X=B$. If $B\neq ABA$ then your problem has no solution.
A: We are given a tall matrix $\mathrm Q \in \mathbb R^{n \times m}$ with orthonormal columns, i.e., $\rm Q^\top Q = I_m$ and $\mbox{rank} (\mathrm Q) = m$. The projection matrix that projects onto the $m$-dimensional column space of $\rm Q$ is
$$\rm A := Q \, (Q^\top Q)^{-1} Q^\top = Q Q^\top$$
Since matrix $\rm A$ is symmetric, its eigenvalues are real. Since it is a projection matrix, its eigenvalues are either $0$ or $1$. Let the spectral decomposition of $\rm A$ be
$$\rm A = Q Q^\top = V \Lambda V^\top = \begin{bmatrix} \mathrm V_1 & \mathrm V_2\end{bmatrix} \begin{bmatrix} \mathrm I_m & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} \begin{bmatrix} \mathrm V_1^\top \\ \mathrm V_2^\top\end{bmatrix} = V_1 V_1^\top$$
Given also a symmetric matrix $\mathrm B \in \mathbb R^{n \times n}$, we would like to solve the following linear matrix equation in symmetric matrix $\mathrm X \in \mathbb R^{n \times n}$
$$\rm A X A = B$$
which can be rewritten as follows
$$\rm V \Lambda V^\top X V \Lambda V^\top = B$$
Let $\rm C := V^\top B V$. We then have the following linear matrix equation in $\rm Y := V^\top X V$
$$\rm \Lambda Y \Lambda = C$$
or, less economically,
$$\begin{bmatrix} \mathrm I_m & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} \begin{bmatrix} \mathrm Y_{11} & \mathrm Y_{12}\\ \mathrm Y_{12}^\top & \mathrm Y_{22}\end{bmatrix} \begin{bmatrix} \mathrm I_m & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} = \begin{bmatrix} \mathrm C_{11} & \mathrm C_{12}\\ \mathrm C_{12}^\top & \mathrm C_{22}\end{bmatrix}$$
which yields
$$\begin{bmatrix} \mathrm Y_{11} & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} = \begin{bmatrix} \mathrm C_{11} & \mathrm C_{12}\\ \mathrm C_{12}^\top & \mathrm C_{22}\end{bmatrix}$$
which only has a solution if and only if $\color{blue}{\mathrm C_{12} = \mathrm O}$ and $\color{blue}{\mathrm C_{22} = \mathrm O}$. Hence, $\color{blue}{\mathrm Y_{11} = \mathrm C_{11}}$ and
$$\mathrm B = \mathrm V \mathrm C \mathrm V^\top = \begin{bmatrix} \mathrm V_1 & \mathrm V_2\end{bmatrix} \begin{bmatrix} \mathrm C_{11} & \mathrm O\\ \mathrm O & \mathrm O\end{bmatrix} \begin{bmatrix} \mathrm V_1^\top \\ \mathrm V_2^\top\end{bmatrix} = \mathrm V_1 \,\mathrm C_{11} \mathrm V_1^\top$$
In words, the columns and rows of $\rm B$ must be in the column space of $\rm A$, which is also the column space of $\rm Q$. If this is the case, the solution of the linear matrix equation is, thus,
$$\rm X = V Y V^\top = V_{1} Y_{11} V_{1}^\top = V_{1} C_{11} V_{1}^\top = \color{blue}{B}$$
