squaring a matrix ?



On Fri, 21 Dec 2012 10:39:34 -0800, Raymond Toy wrote:

>>>>>> "hvn" == hvn  <huubvanniekerk at yahoo.com> writes:
> 
>     hvn> Hi,
>     hvn> Using Scilab 5.4.0 on Linux, I wanted to calculate the square
>     of a 3x3 hvn> matrix, and instead of hvn> following the rules of
>     linear algebra by doing A11*A11+A12*A21+A13*A31 hvn> for the (1,1)
>     element of the result, Maxima just arithmetically squared hvn> each
>     element of the matrix. A multiplication of 2 unequal matrices did go
>     hvn> well btw. So how do I get the correct square of a matrix?
> 
> "? matrix" is your friend.  It's not clear exactly what you did, but the
> documentation there says that A^2 squares the elements of a matrix, but
> A^^2 is the matrix product of A and A, which is probably what you
> wanted.
> 
> Ray

Thank you. A^^2 is indeed what I wanted.