RE: Transpose matrix does not work when MatrixForm is used, why?
- To: mathgroup at smc.vnet.net
- Subject: [mg45182] RE: [mg45177] Transpose matrix does not work when MatrixForm is used, why?
- From: "Owen, HL (Hywel)" <H.L.Owen at dl.ac.uk>
- Date: Sat, 20 Dec 2003 05:55:46 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
MatrixForm changes the list into a form suitable for displaying graphically.
In other words, MatrixForm[m] is not the same 'thing' as m.
m is a matrix, MatrixForm[m] is an object for displaying.
You should instead do:
m = { {1, 2, 3}, {4, 5, 6} }
m//MatrixForm to display it
Transpose[m]
Transpose[m]//MatrixForm to display the Transpose
There's no other way around it.
> -----Original Message-----
> From: nma124 at hotmail.com [mailto:nma124 at hotmail.com]
To: mathgroup at smc.vnet.net
> Sent: 19 December 2003 11:58
> To: mathgroup at smc.vnet.net
> Subject: [mg45182] [mg45177] Transpose matrix does not work when MatrixForm is
> used, why?
>
>
> hello
>
> Mathematica 5.0
>
> m = { {1, 2, 3}, {4, 5, 6} } // MatrixForm
> Transpose[m]
>
> this just does nothing. it simply prints back what I typed with
> m in MatrixForm but does not actually do the transpose.
>
> But when I do
>
> m = { {1, 2, 3}, {4, 5, 6} }
> Transpose[m]
>
>
> it works.
>
> It seems that the function Transpose does not like to accept a
> list in 'MatrixForm' ?
>
> I use a MatrixForm to see the matrix better. Does this mean one have
> to removed the MatrixForm each time before calling Transpose?
>