MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: MatrixForm

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

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 // 

Is there any point in keeping MatrixForm other than compatibility  
with earlier versions of Mathematica?

Andrzej Kozlowski

  • Prev by Date: Re: NSolve Vs. Elliptic Integral
  • Next by Date: Importing tab-delimited data files?
  • Previous by thread: MatrixForm
  • Next by thread: Re: MatrixForm