The Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Special matrix multiplication
Replies: 18   Last Post: Mar 22, 2012 5:12 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Roger Stafford

Posts: 5,929
Registered: 12/7/04
Re: Special matrix multiplication
Posted: Mar 15, 2012 3:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Milos Milenkovic" <m.milenkovic@mathworks.com> wrote in message <jjt49l$nak$1@newscl01ah.mathworks.com>...
> .......
> This is ok, but now I have to make this multiplication with respect to sign of these (ai,bi,ci) numbers, so if (ai,bi,ci) and (di,ei,fi) are >0 (they are >0, if bi and ei >0) then the upper solution is ok,
> but when bi or ei is <0 than I have to apply next rule:
> (ai,bi,ci)*(di,ei,fi) = (ei*ai+bi*(fi-ei), bi*ei , ei*ci+bi(di-ei))
> Or, if (ai,bi,ci) and (di,ei,fi) are both <0 (they are <0, if bi and ei <0)
> (ai,bi,ci)*(di,ei,fi) = (ei*ci+bi*(fi-ei), bi*ei , ei*ai+bi(di-ei))
> .......

- - - - - - - - - - -
Hello again Milos. The rules I gave you earlier can easily be revised to the following for the two new cases:

A1 = A(:,1:3:n); A2 = A(:,2:3:n); A3 = A(:,3:3:n);
B1 = B(:,1:3:n); B2 = B(:,2:3:n); B3 = B(:,3:3:n);
C1 = A1*B2+A2*(B3-B2); C2 = A2*B2; C3 = A3*B2+A2*(B1-B2);
C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1;

and

A1 = A(:,1:3:n); A2 = A(:,2:3:n); A3 = A(:,3:3:n);
B1 = B(:,1:3:n); B2 = B(:,2:3:n); B3 = B(:,3:3:n);
C1 = A3*B2+A2*(B3-B2); C2 = A2*B2; C3 = A1*B2+A2*(B1-B2);
C(:,3:3:end) = C3; C(:,2:3:end) = C2; C(:,1:3:end) = C1;

However, neither of these two new definitions are associative. In other words, if P, Q, and R are matrices of this kind, it is no longer true that P*(Q*R) is identically equal to (P*Q)*R where '*' represents either of your new multiplication rules. Your original special multiplication was in fact associative as I mentioned earlier. This makes me suspicious of your two new kinds of multiplication operators. Any "multiplication" which is not even associative is in my opinion a very ugly kind of multiplication and hardly worthy of the name. What in the world are you using it for?

Roger Stafford



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.