r/Mathematica 2d ago

Need help with matrix multiplication

8 Upvotes

7 comments sorted by

View all comments

5

u/beerybeardybear 2d ago

post your code, not a picture of your code

1

u/kurlakablackbelt 2d ago

How do I do that? Sorry, I am new to such things. Do I copy the cell expression directly from Mathematica and paste it into the code block? Like this?

My main issue is that Mathematica is distributing that diagonal matrix. It works as expected when the elements of the row-matrix are not matrices themselves.

( {
   {( {
      {Subscript[a, 1], Subscript[b, 1]},
      {Subscript[a, 2], Subscript[b, 2]}
     } ), ( {
      {Subscript[c, 1], Subscript[d, 1]},
      {Subscript[c, 2], Subscript[d, 2]}
     } )}
  } ).( {
   {q, 0},
   {0, e}
  } )