RE: Re: Re: Non-comm
- To: mathgroup at smc.vnet.net
- Subject: [mg13414] RE: [mg13344] Re: [mg13280] Re: Non-comm
- From: Ersek_Ted%PAX1A at mr.nawcad.navy.mil
- Date: Thu, 23 Jul 1998 03:33:00 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Isn't this built-in as a different type of multiplication? In[5]:= ?NonCommutativeMultiply "a ** b ** c is a general associative, but non-commutative, form of \ multiplication." If you like you can use the Notation package to define a convention for Input and/or Output that is more readable. Ted Ersek | |It's OK to say that we should not remove attributes from fundemantal ops |like Plus and Times. I agree, though for experimental purposes, I like |the flexibility. Thanks for giving us that. | |However there is one obvious and common case where the Orderless |attribute doesn't apply, namely matrix math. The operation of |multiplying matrices must not have the Orderless attribute. | |Try writing out some matrix equations in Mathematica and asking the |program to simplify or otherwise rearrange them. Unless you have |actually constructed the matrices symbolically, it won't work. In |other words, Mathematica does not allow any kind of shorthand for |matrix math. You have to write out {{a[1,1],a[1,2]},{a[2,1],a[2,2]}} |and can't just put A. | |There is one, and only one definition for a new symbol like "A": it is, |by decree of Wolfram Research (:-/), a complex number. It can't be a |real number, an integer, or -- a matrix. | |In the field of control theory, the whole point of using matrix math is |the shorthand notation, thus: | | x-dot = A.x + B.u (system state equation) | y = C.x + D.u (system output equation) | |where | | x = the n x 1 state vector for | an nth-order system | u = the m x 1 input vector for | a system with m inputs | y = the p x 1 output vector for | a system with p outputs | A = the n x n system (or plant) matrix for an | nth-order system | B = the n x m input matrix for an | nth-order system with m inputs | C = the p x n output matrix for an | nth-order system with p outputs | D = the p x m feed forward matrix for a | system with p outputs and m inputs | |In the past I tried to tinker with some Kalman filtering equations in |Mathematica but got nowhere fast. The Kalman theory is derived from |pure symbolic matrix mathematics. The dimensions of the matrices are |irrelevant to the theory, but the fact that they are matrices is |central. | |Sometimes you know the values of m,n,p but even in that case, in |Mathematica you still have to write out the full matrices by hand. At |other times, you want to leave m,n,p undefined. | |I would say that WRI should take the task of writing the rule base for |symbolic matrix math with the Orderless attribute removed. That's not |a job for the users. I think that this example alone answers David |Withoff's proposition: | |> A separate question is whether or not functions such as Expand could or |> should somehow be modified, probably by invoking separate algorithms, |> to handle operations in other algebras. That is an interesting |> question, and one that many people have considered. | |Yes, they should invoke separate algorithms for symbols declared as |matrices, once we can make such declarations. | | |Best regards to the developers, | |Mark | |
- Follow-Ups:
- Re: RE: Re: Re: Non-comm
- From: MJE <evans.nospam@gte.net>
- Re: RE: Re: Re: Non-comm