Re: MatrixForm

*To*: mathgroup at smc.vnet.net*Subject*: [mg62574] Re: [mg62567] MatrixForm*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Tue, 29 Nov 2005 04:44:04 -0500 (EST)*References*: <200511280557.AAA18494@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

On 28 Nov 2005, at 14:57, David Park wrote: > Sometimes MatrixForm seems annoying because it is not transparent > to other operations as some of the other Forms are. Actually, I > think its design is very good because it allows one to write matrix > equations with the Dot product in a nice form, and then easily > evaluate them. > > A = Array[a, {2, 2}]; > B = Array[b, {2, 2}]; > > 3 MatrixForm[A].MatrixForm[B] > % /. MatrixForm -> Identity // MatrixForm > > The Dot product won't evaluate when the matrices are wrapped in > MatrixForm and so we get the regular textbook form of a product. > Notice also that the factor 3 was not sucked into the matrices. > Using the rule MatrixForm -> Identity then evaluates the matrix > multiplication. > > I don't know how many users are aware of this usage. I have just > begun to appreciate it and thought I would post a note on it. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > This is all true but... if you replace MatrixForm with TraditionalForm in the above you will get all the advantages described plus a little nicer output. And, if your Default Output Format type is set to TraditionalForm you won't need the last // TraditionalForm. Is there any point in keeping MatrixForm other than compatibility with earlier versions of Mathematica? Andrzej Kozlowski

**References**:**MatrixForm***From:*"David Park" <djmp@earthlink.net>