On 7/3/2011 1:18 AM, Max Jones wrote:
> When I multiply symbolic matrices with subscripted elements such as
>
>
> a: matrix([a00,a01],[a10,a11])
>
> b: matrix([b00,b01],[b10,b11])
>
>
> the product a . b returns as
>
> matrix([a01*b10+a00*b00,a01*b11+a00*b01],[a11*b10+a10*b00,a11*b11+a10*b01]).
>
> I need the terms ordered to match the conventional definition of multiplication, such
> that the first element is a00*b00+a01*b10, and so on.
>
>
> I am guessing that the problem is the reverse alphabetical
> order used by Canonical
>
> Rational Expressions. If this guess is correct, I would further guess that I have to wrap
>
> dot inside a function that explicitly sets ratvars to match the elements of the matrices.
>
> This is unappealing, and I hope I'm wrong. Please advise.
Try setting powerdisp:true
to reverse the ordering of display of expressions in a sum, generally.
Conventionally, expressions are ordered this way :
x^2+x
z+3
a*x+b
with items later in the alphabet or more complicated coming first.
but this is not uniformly observed, so that we also see
u+v
E=mc^2
F=ma
a00*b00+a01*b10
This has nothing to do with ratvars.