From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Adlers To: 'Rooms Frédéric' , gsl-discuss@sources.redhat.com Subject: RE: matrix inversion Date: Wed, 19 Dec 2001 13:20:00 -0000 Message-id: <4DFD94A38EB3104E838576A77AEBB36E166D4C@hermes.mathcore.se> X-SW-Source: 2001/msg00453.html Hi, if you can avoid using the inverse of a matrix do it! Almost all computations involving the inverse of a matrix can be avoided, it is only when you want elements explicitly from the matrix you have to form parts of the inverse. If you want to solve a linear system of equations it is better to compute a LU decomposition (uses the same storrage) of the matrix and then solve two triangular systems. For small systems (like ~100 varibles) you can use the function gsl_linalg_LU_decomp() to compute the decomposition and gsl_linalg_LU_solve() to solve the system. If you insist to compute the inverse use gsl_linalg_LU_invert(). (It is much more expensive to compute the inverse and use it to solve the systems than using the LU decomposition. More, the numerical accuracy is much worse when using the inverse) See the online documentation: http://sources.redhat.com/gsl/ref/gsl-ref_12.html#SEC201 If you want to solve large problems i should use LAPACK instead. You can find LAPACK at netlib (www.netlib.org), Sincerely, Mikael Adlers ------------------------------------------------------------------ Mikael Adlers, Ph.D. email: mikael@mathcore.com MathCore AB phone: +4613 32 85 07 Wallenbergsgata 4 fax: 21 27 01 SE-583 35 Linköping, Sweden http://www.mathcore.com > -----Original Message----- > From: Rooms Frédéric [ mailto:rooms@enserg.fr ] > Sent: den 4 september 2001 15:05 > To: gsl-discuss@sources.redhat.com > Subject: matrix inversion > > > Hi, > > is there an easy way to inverse complex matrix ? > > Thanks a lot > > Fred >