I was wondering, If there is an efficient method to solve a system of linear equations of the form
$$A\,B\,x=b$$ with $A=n\times m$ and $B=m\times n$ rectangular matrices and $x = n\times 1$ and $b=n\times 1$ vectors. The elements of $A$, $B$, $x$ and $b$ are complex and $n\approx 30-300$ and $m\approx 100-1000$.
So far I just multiply $A$ and $B$ and then use LU factorization with partial pivoting (the Maltab -operator). The system is quite ill-conditioned with cond$(A\,B)\approx 10^{20}$ or even worse.
Any ideas?