First, $AX=B$ is solved, so I have the LU factorization of $A$ computed already.

Now I need to solve $BX=A$. Is there any way to reuse this information (LAPACK gesv was used to compute LU of $A$)?

  • $\begingroup$ I assume you solve for $X$? And what are the dimensions of $A$, $B$ and $X$? $\endgroup$ – fibonatic May 5 '17 at 9:56
  • $\begingroup$ @fibonatic right, matrix is square, dimension can be several thousands. $\endgroup$ – lorniper May 5 '17 at 10:56

Your question amounts to asking which is the optimal solution strategy for computing $X,Y$ such that $$ \left\{ \begin{aligned} AX &= B\\ BY &= A \end{aligned} \right. $$ where $A, B$ are generic square dense matrices. Apart from the observation that if $A$ and $B$ are non singular, then $Y=X^{-1}$, I do not see any particular reason for which the knowledge of $X$ should help in the computation of $Y$. But I'd love to be contradicted on this.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.