Skip to content
Prev 70623 / 398528 Next

how to invert the matrix with quite small eigenvalues

On 30-May-05 huang min wrote:
NB: b is not *orthogonal*! Each row of b is equal to the preceding
row plus (row2 - row1) (and similar for the columns), and b has
rank 2 (though eigen(b) taken literally says that it has 5 non-zero
eugenvalues; however, 3 of these are snaller that 10^(-14)).

Perhaps you meant "define b to get a symmetric matrix".
Well, I did get a (non-symmetric) result for solve(aa) ...
and an idenitical (to solve(aa)) result for this.
But here I agree with you!
It does indeed, like the eigenvalue result for b above, come from
the rounding error.

You should clarify in your mind why you want to ensure that you get
correct results for matrices like these.

You are (and in your example deliberately so) treading on the very
edge of what is capable of being computed, and results are very likely
to lead to unexpected gross anomalies (such as being unable to
invert a mathematically invertible matrix, or getting a non-symmetric
inverse to a symmetric matrix [depending on the algorithm], or
getting non-zero values for eigenvalues which should be zero, or
the gross difference from the identity matrix which you expected).

It is like using a mechanical ditch-digger to peel an apple.

Exactly what will happen in any particular case can only be
determined by a very fine-grained analysis of the operation
of the numerical algorithm, which is beyond your reach in the
normal usage of R.

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 30-May-05                                       Time: 09:43:56
------------------------------ XFMail ------------------------------