TITLE: Least-squares solution of systems of Sylvester equations
QUESTION [7 upvotes]: The Sylvester equation $AX+XB=C$ has been studied quite a lot and there are known algorithms for solving it.
But has the situation where (an over-determined) system of equations $A_{i}X+XB_{i}=C_{i}$ is to be solved has been studied?
The question is motivated by an application in robotics (see here), where $C_{i}=0$ and a non-zero solution is required (with some extra structure, actually, but never mind for now).

REPLY [3 votes]: Here's a rather obvious way to do it, in the case where all $C_i = 0$.
Let $X_1, \ldots, X_k$ be a basis of 
solutions of $A_1 X + X B_1 = 0$, so the general solution of 
$A_1 X + X B_1 = 0$ is $X = \sum_{i=1}^k t_i X_i$.  For this to satisfy
$A_2 X + X B_2 = 0$, we need $\sum_{i=1}^k t_i (A_2 X_i + X_i B_2) = 0$, which
is a set of linear equations in the $t_i$.  Solve and recurse...
Of course for this to be efficient, you'd want $k$ to be fairly small.  In the worst case (e.g. $A_1 = B_1 = I$), $k = n^2$ where these are $n \times n$ matrices, but that's rather exceptional.