Let $A$ and $B$ be two invertible matrices $n \times n$ matrices, for some positive integer $n$. Knowing the matrices $A$ and $BA$ (that is, specifically knowing their entries), how can we efficiently compute $A^{-1}B$?
Here, by efficiently, I mean using an efficient algorithm (so computing the inverse of $A$ does not seems like a good idea).
I thought about finding a relation between $A,BA$ and $A^{-1}B$, but I have not succeeded (a relation such at $A^{-1}B = CA + DBA$ for some matrices $C$ and $D$ that we can easily find out).
Another idea is to use the $QR-$decomposition of the matrices $A$ and $B$, because we can easily find the inverse of an orthogonal matrix and the inverse of an upper triangular matrix, but we don't specifically know the matrix $B$, and the complexity is $O(n^3)$, which doesn't seem like the most efficient way.
You could do:
Does that count as efficient?