I wasn't aware that Maxima looked at get(A,matrix); on the other hand, it
does look at declare([P,Q,R],nonscalar)$, and knows that nonscalarp(P+Q) =>
true. On the other hand, there is no way of declaring the dimensions of a
matrix, so nonscalarp(P.Q) is always true, even if P.Q is 1x1/scalar.
Matrix multiplication is "."; matrix exponentiation is "^^".
On Wed, Nov 27, 2013 at 2:44 PM, Barton Willis <willisb at unk.edu> wrote:
> Maxima's generic noncommutative multiplication operator is "."
> Several option variables control the simplification of ".", but the
> defaults might be what you want for matrix multiplication; for example,
> the default is that "." is associative.
>
> Maxima does not require a declaration for a symbol to represent a matrix.
> One not so nice thing is that Maxima simplifies
> a - a to zero no matter what (well you could turn simplification off, but
> that is the exit ramp to trouble).
>
> Example
>
> (%i3) a.(b.c)-(a.b).c;
> (%o3) 0
>
> If it matters that (and it might) that you don't want 0 to represent a
> number or a zero matrix of any size, I know of no
> easy workaround.
>
> For a symbol (and only a symbol), you can do
>
> (%i8) put(A, matrix);
> (%o8) matrix
>
> (%i12) get(A,matrix);
> (%o12) matrix
>
> But doing this doesn't allow Maxima to deduce that the sum of matrices is
> a matrix.
>
> If you search the mailing list, I think you will find some references to
> symbolic matrix arithmetic.
>
>
>
>
>
>
> --Barton
>
>
> ------------------------------
> *From:* maxima-bounces at math.utexas.edu <maxima-bounces at math.utexas.edu>
> on behalf of George Lowe <george2lowe at hotmail.com>
> *Sent:* Wednesday, November 27, 2013 13:09
> *To:* maxima at math.utexas.edu
> *Subject:* [Maxima] matrix manipulation
>
> Suppose I need to manipulate symbolic matrices algebraicaly and with
> calculus. Can this be done? How do I tell maxima that a symbol is a matrix?
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>