Re: mathematica newbie question
- To: mathgroup at smc.vnet.net
- Subject: [mg66895] Re: [mg66879] mathematica newbie question
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 3 Jun 2006 03:25:13 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
mat=Array[a,{3,3}]; mat^2==(#^2&/@mat) True mat.mat==MatrixPower[mat, 2] True See Help for MatrixPower Bob Hanlon ---- Jeremy Watts <jwatts1970 at hotmail.com> wrote: > Hi, > > Just trying to get to grips with Mathematica and matrices. Why is it when I > enter :- > {0, 0, 0}, {1, -1, -1}, {-1, 1, 1}}^2 > > then Mathematica returns :- > > {{0, 0, 0}, {1, 1, 1}, {1, 1, 1}} > > and not {{0,0,0},{0,0,0},{0,0,0}} (the actual square of the matrix) as I'd > have expected? > > Is it treating what I entered as separate vectors or something, and not an > actual matrix? > > Thanks > > -- Bob Hanlon hanlonr at cox.net