Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: funny problem about the precision of matrix transpose and inverse.
Date: Mon, 29 Oct 2012 21:33:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 12
Message-ID: <k6msmk$l8l$1@newscl01ah.mathworks.com>
References: <k6mp64$9uj$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1351546388 21781 172.30.248.35 (29 Oct 2012 21:33:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Oct 2012 21:33:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:781623

"Ha" wrote in message <k6mp64$9uj$1@newscl01ah.mathworks.com>...
> >>inv(A'*A)
> >> T=A'; inv(T*A)
> Look, it's funny that the two results are different. How can that be?
> 
> Then, I tried
> >> A'*A-T*A
> not equals to zero.
- - - - - - - - - - -
  I will make a guess here.  When the matlab compiler sees the expression A'*A it realizes that the result must be Hermitian and for better computation efficiency calls on a different routine than with T*A.  Due to the different algorithm used the roundoff errors will differ, hence the very small differences you observed after subtraction.  Since both results are nearly singular their two inverses would likely be quite large as you observed in this case.

Roger Stafford