MathGroup Archive 2006

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

Search the Archive

Re: mathematica newbie question


"Jeremy Watts" <jwatts1970 at hotmail.com>
news:e5osv8$i51$1 at smc.vnet.net...
> 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?
>

Hi Jeremy,
take a look at Matrix Operations in the Help Browser.
In order to do a matrix power you can use the MatrixPower[] command.

    In[1]:= MatrixPower[{{0, 0, 0}, {1, -1, -1}, {-1, 1, 1}}, 2]
    Out[1]= {{0,0,0},{0,0,0},{0,0,0}}

> Thanks
>
>
You're welcome.

    ~Scout~


  • Prev by Date: Re: Adding a notebook (or folder) to the Mathematica Front End menus?
  • Next by Date: Re: Simplifying algebraic expressions
  • Previous by thread: Re: mathematica newbie question
  • Next by thread: Re: mathematica newbie question