0
$\begingroup$

Given $10 \times 10$ matrices $A$ and $B$, I would like to find $10 \times 10$ matrix $X$ such that

$$A = X B X^T \tag{1}$$

$$B = X A X^T \tag{2}$$

How can I solve the issue? if there is a way to solve only equation (1) or (2) that is ok also.

If anyone can already solve this and show me the way it's fine too.

Matrix $A$:

   [[0.125+0.03125i,0,0,0,0,-0.0625,-0.0625,-0.03125,0,0],      
    [0,0.0625,0,0,0,0,-0.0625,0,0,0],
    [0,0,0.0625,0,0,0,0,-0.0625,0,0],
    [0,0,0,0.15625,0,0,-0.03125i,0,-0.0625,-0.0625],
    [0,0,0,0,0.0625,0,0,0,0,-0.0625],
    [-0.0625,0,0,0,0,0.0625,0,0,0,0],
    [-0.0625,-0.0625,0,-0.03125i,0,0,0.125+0.03125i,0,0,0],
    [-0.03125,0,-0.0625,0,0,0,0,0.15625,0,0],
    [0,0,0,-0.0625,0,0,0,0,0.0625,0],
    [0,0,0,-0.0625,-0.0625,0,0,0,0,0.125]]

Matrix $B$:

   [[0.15625,0,0,0,0,-0.0625,-0.0625,-0.03125i,0,0],        
    [0,0.0625,0,0,0,0,-0.0625,0,0,0],
    [0,0,0.0625,0,0,0,0,-0.0625,0,0],
    [0,0,0,0.125+0.03125i,0,0,-0.03125,0,-0.0625,-0.0625],
    [0,0,0,0,0.0625,0,0,0,0,-0.0625],
    [-0.0625,0,0,0,0,0.0625,0,0,0,0],
    [-0.0625,-0.0625,0,-0.03125,0,0,0.125+0.03125i,0,0,0],
    [-0.03125i,0,-0.0625,0,0,0,0,0.09375,0,0],
    [0,0,0,-0.0625,0,0,0,0,0.0625,0],
    [0,0,0,-0.0625,-0.0625,0,0,0,0,0.125]]

Thanks!

$\endgroup$
8
  • $\begingroup$ Do you agree with my edits? $\endgroup$ Commented Mar 4, 2021 at 15:16
  • 1
    $\begingroup$ Since your matrices have complex entries, do you want to transpose or transconjugate? $\endgroup$ Commented Mar 4, 2021 at 15:17
  • $\begingroup$ X-posted: math.stackexchange.com/q/4048724 $\endgroup$ Commented Mar 4, 2021 at 15:19
  • $\begingroup$ this is the same question you posted yesterday, mathoverflow.net/q/385384/11260 , which received some feedback, and which you have now deleted to repost this one; please don't do that, edit a question to improve it, but don't delete and repost. $\endgroup$ Commented Mar 4, 2021 at 16:10
  • 1
    $\begingroup$ transconjugate. $\endgroup$
    – Moshe
    Commented Mar 4, 2021 at 16:13

1 Answer 1

0
$\begingroup$

I calculated the determinant of your two matrices:

I find $\det A=7.95808\cdot 10^{-13} \, i$ while $\det B=-4.54747\cdot 10^{-13} + 2.27374\cdot 10^{-13} i$. If your equations (1) and (2) hold, then $\det A=(\det C)^2\det B$ and $\det B=(\det C)^2\det A$, so $(\det A)/(\det B)=(\det B)/(\det A)$, which fails.

Hence there is no solution of both equations $A=XBX^{T}$ and $B=XAX^T$.


Now for the solution of a single equation, say $A=XBX^T$. The matrix $X^T$ is the transpose of $X$, so $X_{nm}=X_{mn}$. Both matrices $A$ and $B$ are complex symmetric, $A_{nm}=A_{mn}$ and $B_{nm}=B_{mn}$. Both matrices are also invertible. Then each has a unique complex symmetric square root, $A^{1/2}$ and $B^{1/2}$, see this MO posting . A solution to $A=XBX^T$ is given by $$X=A^{1/2}B^{-1/2}.$$ The solution is not unique, any matrix $A^{1/2}OB^{-1/2}$ with $O$ real orthogonal (so $OO^T=1$) is also a solution.

I tried this for the matrices $A$ and $B$ listed above, with Mathematica. The output is very lengthy, you can download it from here and here is the evidence that it works as it should.


The $10\times 10$ matrix in the OP is cumbersome, let me illustrate how this works for a $2\times 2$ matrix:

$$a=\left( \begin{array}{cc} i & 1 \\ 1 & i \\ \end{array} \right),\;\;b=\left( \begin{array}{cc} 0 & 1 \\ 1 & 0 \\ \end{array} \right),$$ $$a^{1/2}=\left( \begin{array}{cc} \frac{\sqrt{-1+i}}{2}+\frac{\sqrt{1+i}}{2} & \frac{\sqrt{1+i}}{2}-\frac{\sqrt{-1+i}}{2} \\ \frac{\sqrt{1+i}}{2}-\frac{\sqrt{-1+i}}{2} & \frac{\sqrt{-1+i}}{2}+\frac{\sqrt{1+i}}{2} \\ \end{array} \right),\;\;b^{1/2}=\left( \begin{array}{cc} \frac{1}{2}+\frac{i}{2} & \frac{1}{2}-\frac{i}{2} \\ \frac{1}{2}-\frac{i}{2} & \frac{1}{2}+\frac{i}{2} \\ \end{array} \right),$$ $$x=a^{1/2}b^{-1/2}=\left( \begin{array}{cc} \sqrt{\frac{1}{2}+\frac{1}{\sqrt{2}}} & i \sqrt{\frac{1}{\sqrt{2}}-\frac{1}{2}} \\ i \sqrt{\frac{1}{\sqrt{2}}-\frac{1}{2}} & \sqrt{\frac{1}{2}+\frac{1}{\sqrt{2}}} \\ \end{array}\right),$$ and you can readily check that $xbx^T=a$. In this particular example the matrix $x$ is symmetric, but in general it is not.

$\endgroup$
18
  • $\begingroup$ Editing Matrix A, there is a possible option that one of the equation will work? (separately). thanks for the help. $\endgroup$
    – Moshe
    Commented Mar 4, 2021 at 17:48
  • $\begingroup$ if you want to solve only one of them, that will be possible, but not if by $X^T$ you mean "transconjugate", as you said in a comment, because $\det A/\det B$ is not real. $\endgroup$ Commented Mar 4, 2021 at 17:53
  • 1
    $\begingroup$ @FedericoPoloni --- I checked that $\det(10\,A)=0.00795808 \,i$ and $\det(10\,B)=-0.00454747 + 0.00227374\, i$, so the difference is not due to lack of accuracy. $\endgroup$ Commented Mar 4, 2021 at 20:14
  • 1
    $\begingroup$ this must be a programming thing; why don't you first try it in Python on small matrices, then you can check that everything works, before going to the large 10x10 matrix; for the 2x2 case I gave in the answer you can even check it with paper and pencil, so you can be sure your Python code does the right thing. $\endgroup$ Commented Mar 5, 2021 at 13:42
  • 1
    $\begingroup$ I used a commercial piece of software (Mathematica), but there is no reason why you shouldn't be able to do it in Python. $\endgroup$ Commented Mar 5, 2021 at 14:28

Not the answer you're looking for? Browse other questions tagged .