MathGroup Archive 1999

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

Search the Archive

RE: Automatic Display in MatrixForm

  • To: mathgroup at
  • Subject: [mg19234] RE: [mg19206] Automatic Display in MatrixForm
  • From: "Ersek, Ted R" <ErsekTR at>
  • Date: Wed, 11 Aug 1999 02:06:48 -0400
  • Sender: owner-wri-mathgroup at

Bruno Daniel  wrote:
I found a way to display matrices automatically in MatrixForm
without having to place the annoying   "// MatrixForm" in the end
of each line. Just put the following line into your init.m:


This also works for output that doesn't *consist* of a matrix, but 
*contains* matrices.

That's nice, but it sometimes spells disaster.





What *%&^  !!

You used (lhs->rhs) in $Post, and Rule uses the global value of (x) in
(rhs).  Hence the result in Out[3] is very wrong!  However, (mtrx) actually
has the right value.  Below the first row of (mtrx) is displayed.



What you need to do is use (lhs:>rhs) as below.



(* The desired output is displayed. *)


It's no wonder people keep making this mistake in spite of me pointing it
out over and over.  The Mathematica Book (all editions) are full of examples
that will give the same type of error when the variable used has a global
value.  The book does nothing to warn users about this problem, or how to
avoid it.  Has Stephen Wolfram not been aware of this for the past 10 years,
or does he think it's in his best interest to avoid bringing it to our

As far as I can tell WRI tech support doesn't have a web page addressing
this problem.

Besides that there are dozens of books written about how to use Mathematica.
I have yet to find one that mentions this problem.  It's even more puzzling
why few if any of the other books discuss this point.

Ted Ersek

  • Prev by Date: Re: PolynomialQ (wrong) behavior ?
  • Next by Date: Re: PolynomialQ (wrong) behavior ?
  • Previous by thread: Automatic Display in MatrixForm
  • Next by thread: Re: Automatic Display in MatrixForm