matrices in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg13428] matrices in Mathematica*From*: cutforth craig f <craig.cutforth at colorado.edu>*Date*: Thu, 23 Jul 1998 03:33:30 -0400*Organization*: University of Colorado at Boulder*Sender*: owner-wri-mathgroup at wolfram.com

Hello, I have always had trouble doing matrix manipulation in Mathematica. It is my hope that I can get Mathematica to recognize that the elements of a matrix are matrices. Example: In[1]:= Z = {{Z1,Z2}}; K = {{K1},{K2}}; A= K.Z; MatrixForm[A] Out[1]:= {{K1 Z1,K1 Z2},{K2 Z1,K2 Z2}} In[2]:= AT = Transpose[A] Out[2]:= {{K1 Z1,K2 Z1},{K1 Z2,K2 Z2}} This answer is only correct if K1, K2, Z1, and Z2 are scalars. If they are matrices then the answer should be: {{Transpose[K1 Z1],Transpose[K2 Z1]}, {Transpose[K1 Z2],Transpose[K2 Z2]}} I have tried entering K1, K2, Z1, and Z2 with their elements and then using BlockMatrix to Form K, Z, and A. But when I start doing operations such as Inverse, it becomes really difficult to extract out my original matrices: K1, K2, Z1, and Z2. So again, I state my question: Is there any way to declare a matrix so that Mathematica deals with properly. It would be my hope that it would note when it has been operated on with Transpose, Inverse, etc. somehow. The main goal though is to do matrix math without having to enter every element of a matrix. Thanks. Craig Cutforth University of Colorado craig.cutforth at colorado.edu