I'm trying to solve a special case of Sylvester equation
in my case it looks like $A*X=X*B$ so it can be written in form $A*X+X*(-B)=C$ where C consist of all 0 items.
I tried to solve it in Mathematica with LyapunovSolve but it give me all =0 trivial solution.
So I want to check if there is non-trivial solution exist. It seems I find out how to test matrices A,B for non-trivial solution(but I'm not sure) if resultant equals to 0, then such solution exist.$resultant(det(A-λE),det(B-λE),λ)=0$ I tried real matrices for example A matrix (0 -1 300 1 0 0 0 0 1) B matrix (-0.4009 -1.0787 446.1463 1.6180 0.8875 -159.2272 0.0003 0.0029 1) but there is maybe a problem because B matrix was defined experimentally and it has some small errors, with these matrices I have resultant -6.79 , but due to errors I don't know may be it close enough to 0?
the question is: can you write condition of existence of non-trivial solution of Sylvester equation not in abstract form but in particular formula, preferably in Mathematica.
Also I don't understand why Mathematica gives me only trivial solution, when I trying to solve this equation with parameters for example I tried
am = {{a11, a12, a13}, {a21, a22, a23}, {a31, a32, a33}}
bm = {{b11, b12, b13}, {b21, b22, b23}, {b31, b32, b33}}
cm = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}
LyapunovSolve[am,bm,cm]
gives me all =0 also I tried to multiply matrices and get 9 equations and solve them with function Solve which also give me all =0.