2
$\begingroup$

Is there any function like Solve but designed to deal with matrix equations? Something like:

mA = {{1, 2}, {3, 4}};
mC = {{19, 22}, {43, 50}};
Solve[mA.mX == mC, mX]  (* should return {{5, 6}, {7, 8}} *)

I know that you could just type

Inverse[mA].mC

but I'm curious if there is other way to do this.

$\endgroup$
  • $\begingroup$ Get into the habit of using LinearSolve[] instead of Inverse[], whenever possible. $\endgroup$ – J. M. will be back soon Jun 8 '16 at 18:18
  • $\begingroup$ @J.M. Thanks for advice. $\endgroup$ – Wilhelm Olejnik Jun 8 '16 at 18:35
2
$\begingroup$
mA = {{1, 2}, {3, 4}};
mC = {{19, 22}, {43, 50}};
mX = Array[X, {2, 2}]
Solve[mA.mX == mC, Flatten[mX]]

Will do what you want

$\endgroup$

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.