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$>
References: <k6mp64$9uj$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1351546388 21781 (29 Oct 2012 21:33:08 GMT)
NNTP-Posting-Date: Mon, 29 Oct 2012 21:33:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:781623

"Ha" wrote in message <k6mp64$9uj$>...
> >>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