Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Special matrix multiplication
Date: Thu, 15 Mar 2012 19:21:34 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 26
Message-ID: <jjtffu$3hn$1@newscl01ah.mathworks.com>
References: <jgj6ir$rj7$1@newscl01ah.mathworks.com> <jgkpke$kf6$1@newscl01ah.mathworks.com> <79fc2a0e-f25d-42be-b1d4-2d3f8ba963d6@b23g2000yqn.googlegroups.com> <jgrlve$roe$1@newscl01ah.mathworks.com> <jgrp3v$8lm$1@newscl01ah.mathworks.com> <jgrvoj$34u$1@newscl01ah.mathworks.com> <jgs5i5$nfp$1@newscl01ah.mathworks.com> <jjt49l$nak$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1331839294 3639 172.30.248.37 (15 Mar 2012 19:21:34 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 15 Mar 2012 19:21:34 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:761111

"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