Hi, is your answer also the same for the case AX=B i.e. when X and B are matrices instead of vectors?
Yes. You should still generally use X = A \ B.
The only time inv(A) * B becomes more efficient is usually when size(B,2) is much greater than size(B,1), and even then only for dense matrices. See: Why re-use factorization(A) rather than inv(A) - #3 by stevengj
PS. I moved your question to a new thread. Please don’t post new questions on ancient threads.
2 Likes