#1499 Multiplication of matrices

closed
nobody
5
2008-10-08
2008-09-23
Lindsay Dunseith
No

For the matrix " matrix M =([m,0],[0,m]), the power M^n is determined correctly.

However, for other matrices, e.g. P =([3,1],[1,3])Maxima determines P^2 as matrix([9,1],[1,9]), instead of the correct: matrix([10,6],[6,10])
I haven't tried multiplying more general matrices, but does this mean there is a problem with matrix multiplication?

Maxima build as follows:
Maxima version: 5.15.0
Maxima build date: 17:36 4/20/2008
host type: i686-pc-mingw32
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.8

Discussion

  • Raymond Toy
    Raymond Toy
    2008-09-24

    Please be more explicit and show exactly what you did.

    However, I suspect you used * to multiply matrices. This is an element-by-element multiply. The matrix multiply operator is ".". So:

    p:matrix([3,1],[1,3]);
    p . p;
    matrix([10,6],[6,10])

    Marking as pending/invalid.

     
  • Raymond Toy
    Raymond Toy
    2008-09-24

    • status: open --> pending
     
  • Barton Willis
    Barton Willis
    2008-10-01

    Another thing: to square a matrix, use "^^" not "^".

     
  • This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending --> closed