Best, Rudy
The MIRACL library can invert a large Hilbert matrix, because it uses
multiple precision rational arithmetic.
http://www.shamus.ie/
Are you sure that the matrices are not actually singular?
For what purpose do you need the matrix inverse? Could it be that you
need to solve just a system of linear equations?
As for accuracy, you have to check the matrix condition number. For
example, compute its singular values and then the ration sigma_max/
sigma_min. If this ratio is high, then you have to rethink your
original problem.
'Numercail Recipes' will make a good start, offering a variety of
alternatives if you know the particular problem that you have. If you
really don't, then worth looking up are iterative refinement - which
DEMANDS that if you solve the inverse using DOUBLE (DOUBLE PRECISION)
then you MUST have acess to LONG FLOAT (REAL*10 or better) for the
iterative refinement. A useful alternate, which will help give you a 'good
enough for your working precision' alternative is SVD.
In the rare cases I needed an inverse, I would use LUP decomposition
and solve
LUP A^-1 = I
The Fortran version of this chapter (from an obsolete edition) is
here:
I can't help but think that if iterative improvement worked with LUP
decomposition, iterative improvement would be a lot more popular.
In my experience, Numerical Recipies, is not relatively good. Many
better fundamental algorithms can be found in Collected Algorithms
From ACM Volumes I - III. The algorithms date back to the 1960s and
many were written in algol.
Since you mentioned Fortran, LAPACK has robust routines that includes
matrix inversion. It also has routines for scaling to try to reduce
the condition number.
http://www.netlib.org/lapack/double/
Also, netlib has multi-precision packages.
> Hi, I was wondering if any one can recommend a robust and fast matrix
> inversion routine.
They don't exist. Inversion is intrinsically less stable than LU
factorizaitons. If you only need to solve a linear system, do not invert
it.
Victor.
--
Victor Eijkhout -- eijkhout at tacc utexas edu
How can that be when inversion is accomplished by LU solution on the
columns of I?
This is a typical way to find an inverse. From the definition
A A^-1 = I
you have a system of linear equations with A and with many right hand
sides formed by I. As an answer to this, one obtains A^-1. Clearly the
way to do it, is first to make the LU decomposition of A first and
then use back substitutions.
If you like something unusual, look at this paper
Tibor Mazúch, Jan Kozánek
New recurrent algorithm for a matrix inversion
Journal of Computational and Applied Mathematics
Volume 136 , Issue 1-2 (November 2001)
Pages: 219 - 226
Year of Publication: 2001
I already said that so what is your point?
I am very sorry, I have misinterpreted your question.
Evgenii