From: Simon on
This is such a common Mathematica gotcha that it should be documented
properly.

The MatrixForm documentation says:
MatrixForm acts as a "wrapper", which affects printing, but
not evaluation.
Which is true provided you know your Mathematica operator ordering.
Maybe the docs need a Possible Issues section??


On Aug 4, 7:51 pm, "Eduardo M. A. M.Mendes" <emammen...(a)gmail.com>
wrote:
> Hello there
>
> I am new to Mathematica. In one of my attempts to understand how it works,
> I tried the following example
>
> A={{1,2,3},{4,5,6},{7,8,9}} //MatrixForm
>
> The result seems to be a matrix 3x3 but when I try A[[1][1]], the whole
> first line shows up instead of just one element. If I don't use MatrixForm,
> it works fine. How can I see a matrix in nice format without wrecking
> everything?
>
> Many thanks
>
> Ed


From: Eduardo M. A. M.Mendes on
Many thanks to all for the replies.

Regards

Ed


-----Original Message-----
From: Bob Hanlon [mailto:hanlonr(a)cox.net]
Sent: Wednesday, August 04, 2010 9:18 AM
Subject: Re: Silly question on Matrices


Use parentheses to exclude MatrixForm from the definition of A

(A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}) // MatrixForm

A[[1, 1]]

1

A[[1]][[1]]

1


Bob Hanlon

---- "Eduardo M. A. M.Mendes" <emammendes(a)gmail.com> wrote:

=============
Hello there

I am new to Mathematica. In one of my attempts to understand how it works,
I tried the following example

A={{1,2,3},{4,5,6},{7,8,9}} //MatrixForm

The result seems to be a matrix 3x3 but when I try A[[1][1]], the whole
first line shows up instead of just one element. If I don't use MatrixForm,
it works fine. How can I see a matrix in nice format without wrecking
everything?

Many thanks

Ed