andreasvarga / MatrixEquations.jl

Solution of Lyapunov, Sylvester and Riccati matrix equations using Julia
MIT License
79 stars 8 forks source link

Orthogonal transformation between commuting matrices #27

Open blegat opened 10 months ago

blegat commented 10 months ago

In SumOfSquares, we have pairs of commuting matrices A, B and need to compute an orthogonal transformation X such that X * A = B * X. This is implemented in orthogonal_transformation_to. It basically calls schur(A) and schur(B) but then it's a bit subtle since the schur decomposition is not unique so we need to canonicalize in a similar way for both. It looks a bit like some of the equations of this package so I was wondering if it could fit into one of them.

andreasvarga commented 9 months ago

Could you provide a link to orthogonal_transformation_to? What mathematical condition guarantees the existence of an orthogonal solution?

blegat commented 9 months ago

It's there https://github.com/jump-dev/SumOfSquares.jl/blob/6ad333b54524aa15ca47be20572bf9d82bfa56c4/src/Certificate/Symmetry/block_diag.jl#L3-L179 I'm not sure what is the condition actually. I just assume that there must exist one

andreasvarga commented 9 months ago

The fact that A and B are commuting (i.e., AB = BA) does guarantee the existence of an orthogonal solution? I was not able to find such a result in the literature.

blegat commented 9 months ago

Thanks for the literature search. Indeed, I don't think the commuting property is the right one. Actually there are pairs of matrices that do not commute for which I can find such orthogonal matrix.