In[]:=
CompoundExpression[
]
​​deploy
Tue 19 Dec 2023 17:04:20
Dec 18: Realness of eigenvalues of
-1
(E[x
′
x
]⊗I+I⊗E[x
′
x
])
E[x
′
x
⊗x
′
x
]
post​​Real eigs if similar to triangular matrix: math.SE post​Real eigs if similar to positive definite matrix: math.SE comment​Real eigs of product of positive definite matrices: math.SE post
​
Spectrumof
EX4
ii⊗EX2+EX2⊗ii

Realness of Eigenvalues of ratio matrix

In[]:=
CircleTimes=KroneckerProduct;​​SeedRandom[1];​​d=3;​​b=4;​​dataset=N@RandomInteger[{-5,5},{b,d}];​​ii=IdentityMatrix[d];​​EX2=Mean[(#⊗#)&/@dataset];​​EX4=Mean[(#⊗#)⊗(#⊗#)&/@dataset];​​TableForm[{​​{MatrixPlot@EX4},​​{MatrixPlot[ii⊗EX2+EX2⊗ii]},​​{MatrixPlot@LeastSquares[ii⊗EX2+EX2⊗ii,EX4]},​​{Chop@Eigenvalues@LeastSquares[ii⊗EX2+EX2⊗ii,EX4]//N},​​{Chop@N@Eigenvalues[{EX4,ii⊗EX2+EX2⊗ii}]}​​},TableHeadings->{{"EX4","ii⊗EX2+ EX2⊗ii","(ii⊗EX2+ EX2⊗ii
-1
)
EX4","eigs","generalized eigs"},{}}]​​
Out[]//TableForm=
EX4
ii⊗EX2+ EX2⊗ii
(ii⊗EX2+ EX2⊗ii
-1
)
EX4
eigs
22.836
16.8882
11.5874
3.88864
0.
0.
0.
0.
0.
generalized eigs
22.836
16.8882
11.5874
3.88864
0
0
0
0
0

Connecting to SemidefiniteOptization

In[]:=
A=EX4;​​B=ii⊗EX2+EX2⊗ii;​​Chop@Eigenvalues[{A,B}]//N​​Chop@Eigenvalues[PseudoInverse[B].A]//N​​​​cons=VectorGreaterEqual[{RB,A},{"SemidefiniteCone",
2
d
}];​​R/.First@SemidefiniteOptimization[R,{cons},{R}](*3.28078*)​​
Out[]=
{22.836,16.8882,11.5874,3.88864,0.,0.,0.,0.,0.}
Out[]=
{22.836,16.8882,11.5874,3.88864,0.,0.,0.,0.,0.}
Out[]=
22.836