# Rewrite matrix equation as $By=0$

I am stuck with the following matrix equation:

Solve for $X$:

$$X=AXA^{T}$$

where $A$, $X$ are $3\times 3$ (real) matrices and $X$ is symmetric (i.e. $X=X^{T}$).

The sketch for the solution is to rewrite the above equations as:

$$By=0$$

where $B$ should be a $6\times 6$ matrix and $y$ should be a 6-vector. Then the solution is obvious. But how to rewrite the above equation without spending lots of paper?

I know the equation can be written in the form:

$$A^{-1}X=XA^{T}$$

and be solved as Discrete Lyapunov Equation or a Sylvester Equation in general, but since both sides contain $A$ and no addition of extra element, the solution may be simpler. Furthermore, I expect the matrix $X$ to be in a particularly simple form (symmetric or even diagonal matrix).

Thanks in advance for any hints!

-
I take it you're looking for a symmetric $X$? There may also be antisymmetric solutions. –  Robert Israel Apr 4 '12 at 0:52
Yes, the $X$ should be symmetric. I forgot to mention that. –  Libor Apr 4 '12 at 0:57
You see how to obtain the form $By=0$ correct? I don't immediately see a way that doesn't involve actually multiplying out $AXA^T$ (which would be the "spending lots of paper" part, I presume). –  anon Apr 4 '12 at 1:22
I am trying to get $By=0$ from the product by hand, but since the problem yields such linear system, I suggest there should be some straightforward analytical/numerical solution to obtain $X$. –  Libor Apr 4 '12 at 1:35
Here's a special case with path leads to nothing. But I want to write it down anyways. Let $v$ be an eigenvector of $A^{T}$ with eigenvalue $\lambda = \pm 1.$ Let $u = Xv.$ Note in this very special case $\lambda$ is also an eigenvalue of $A^{-1},$ with an eigenvector $u.$ Multiply $A^{-1}X = XA^{T}$ by $v,$ to get $A^{-1}Xv = X\lambda v.$ It is easy to see that $Xv = u,$ where both $u$ and $v$ are known. Not interesting system to solve though.. –  user2468 Apr 4 '12 at 2:17

Don't use paper, use silicon. The matrix $B$ (for the basis $x_{1,1},x_{1,2},x_{1,3},x_{2,2},x_{2,3},x_{3,3}$) is $$\pmatrix{ 1-{a_{{1,1}}}^{2}&-2\,a_{{1,2}}a_{{1,1} }&-2\,a_{{1,3}}a_{{1,1}}&-{a_{{1,2}}}^{2}&-2\,a_{{1,3}}a_{{1,2}}&-{a_{ {1,3}}}^{2}\\ -a_{{1,1}}a_{{2,1}}&1-a_{{1,2}}a_{{2,1 }}-a_{{1,1}}a_{{2,2}}&-a_{{1,3}}a_{{2,1}}-a_{{1,1}}a_{{2,3}}&-a_{{1,2} }a_{{2,2}}&-a_{{1,3}}a_{{2,2}}-a_{{1,2}}a_{{2,3}}&-a_{{1,3}}a_{{2,3}} \\ -{a_{{2,1}}}^{2}&-2\,a_{{2,2}}a_{{2,1}}&-2\,a_{{2 ,3}}a_{{2,1}}&1-{a_{{2,2}}}^{2}&-2\,a_{{2,3}}a_{{2,2}}&-{a_{{2,3}}}^{2 }\\-a_{{1,1}}a_{{3,1}}&-a_{{1,2}}a_{{3,1}}-a_{{1,1} }a_{{3,2}}&-a_{{1,3}}a_{{3,1}}+1-a_{{1,1}}a_{{3,3}}&-a_{{1,2}}a_{{3,2} }&-a_{{1,2}}a_{{3,3}}-a_{{1,3}}a_{{3,2}}&-a_{{1,3}}a_{{3,3}} \\ -a_{{2,1}}a_{{3,1}}&-a_{{2,2}}a_{{3,1}}-a_{{2,1}} a_{{3,2}}&-a_{{2,3}}a_{{3,1}}-a_{{2,1}}a_{{3,3}}&-a_{{2,2}}a_{{3,2}}&- a_{{2,3}}a_{{3,2}}+1-a_{{2,2}}a_{{3,3}}&-a_{{2,3}}a_{{3,3}} \\ -{a_{{3,1}}}^{2}&-2\,a_{{3,2}}a_{{3,1}}&-2\,a_{{3 ,3}}a_{{3,1}}&-{a_{{3,2}}}^{2}&-2\,a_{{3,3}}a_{{3,2}}&1-{a_{{3,3}}}^{2 }}$$
In order to have a nonzero solution, the determinant of $B$ must be $0$. This is a rather complicated polynomial of total degree 12, which factors over the rationals as $$- ( a_{{2,3}}a_{{3,1}}a_{{1,2}}-a_{{1,2}}a_{{2,1}}-a_{{2,1}}a_{{1 ,2}}a_{{3,3}}+1+a_{{1,1}}+a_{{2,2}}+a_{{1,1}}a_{{2,2}}-a_{{1,3}}a_{{3, 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