5

I want to do some calculations with matrices of arbitrary size. Simple example - take two matrices NxM and MxK, with arbitrary elements, and see element of product as sum.

But i cant find a way to do such symbolic calculations without specifying matrix size as integer.

matrix() want integer, makelist() want integer.

Is there a way to do things like this in maxima? Or any CAS?

Mikhail Cheshkov
  • 226
  • 2
  • 14

1 Answers1

1

Unfortunately, Maxima does not know about arbitrary-size matrices, and I don't see an easy way to implement it.

The only way that I see is to define a new kind of expression, and provide simplification rules for operations on them. E.g. (and this is just a sketch of a possible solution): use defstruct to define a structure comprising size and a formula for a typical element, and define a simplification rule for "." (noncommutative multiplication) which creates a new expression with a typical element which is a summation.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48