public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: matrix inversion
  2001-12-19 13:20 matrix inversion Rooms Frédéric
@ 2001-12-19 13:20 ` Brian Gough
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: Rooms Frédéric; +Cc: gsl-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

Rooms Frédéric writes:
 > 
 > is there an easy way to inverse complex matrix ?
 > 

There wasn't but I've added a new complex LU decomposition to the CVS
repository, gsl_linalg_complex_LU_decomp(), since it is the same as
the the real case.  We need someone to write the other complex matrix
decompositions though -- they are more difficult.

There are some additional functions for solving a linear system
gsl_linalg_complex_LU_solve() and calculating the inverse
gsl_linalg_complex_LU_invert()in the same file (linalg/luc.c).

As mentioned there might be a safer alternative to the direct
calculation of the inverse, depending what you want to do with it.

regards
Brian Gough

^ permalink raw reply	[flat|nested] 8+ messages in thread

* matrix inversion
@ 2001-12-19 13:20 Rooms Frédéric
  2001-12-19 13:20 ` Brian Gough
  0 siblings, 1 reply; 8+ messages in thread
From: Rooms Frédéric @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Hi,

is there an easy way to inverse complex matrix ?

Thanks a lot

Fred

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Matrix inversion.
@ 2002-12-31  9:55 Negin Nejati
  2002-01-29 14:16 ` Negin Nejati
  2002-12-31  9:55 ` Brian Gough
  0 siblings, 2 replies; 8+ messages in thread
From: Negin Nejati @ 2002-12-31  9:55 UTC (permalink / raw)
  To: gsl-discuss


Hi,
I am a new user of this library and I have a silly question:
For inverting a matrix shouldn't I first use "gsl_linalg_LU_decomp" function 
to decompose my matrix and then use "gsl_linalg_LU_invert" passing the
results of previous function to it, to invert the matrix? If it is correct
how come the multiplication of the original matrix and it's reverse is not
I?
I'll appreciate any help,
NN.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Matrix inversion.
  2002-12-31  9:55 Matrix inversion Negin Nejati
  2002-01-29 14:16 ` Negin Nejati
@ 2002-12-31  9:55 ` Brian Gough
  2002-01-30 11:41   ` Brian Gough
  1 sibling, 1 reply; 8+ messages in thread
From: Brian Gough @ 2002-12-31  9:55 UTC (permalink / raw)
  To: Negin Nejati; +Cc: gsl-discuss

Negin Nejati writes:
 >  Hi, I am a new user of this library and I have a silly question:
 > For inverting a matrix shouldn't I first use "gsl_linalg_LU_decomp"
 > function to decompose my matrix and then use "gsl_linalg_LU_invert"
 > passing the results of previous function to it, to invert the
 > matrix? If it is correct how come the multiplication of the
 > original matrix and it's reverse is not I?  I'll appreciate any
 > help, NN.

What you've described should work.  If it doesn't please send your
program as a bug report.

Thanks,

-- 
Brian Gough

----------------------------------------------------------------------
Network Theory Ltd            Phone: 0117 3179309 (+44 117 3179309)
15 Royal Park                 WWW: http://www.network-theory.co.uk/
Bristol BS8 3AL               Email: bjg@network-theory.co.uk     
United Kingdom                
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Matrix Inversion
@ 2002-07-22  8:24 Daniel T Konkle
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel T Konkle @ 2002-07-22  8:24 UTC (permalink / raw)
  To: gsl-discuss


I'm a little new to the GSL stuff and I need to invert a matrix.

I don't quite understand the steps that I'll need to use.

So if I have a matrix of size  n x n, what do I need to call to invert it?

Do I need to call the permutation of the matrix first and pass that to 
invert routine?

Thanks in advance,
Danny Konkle


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Matrix inversion.
  2002-12-31  9:55 ` Brian Gough
@ 2002-01-30 11:41   ` Brian Gough
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Gough @ 2002-01-30 11:41 UTC (permalink / raw)
  To: Negin Nejati; +Cc: gsl-discuss

Negin Nejati writes:
 >  Hi, I am a new user of this library and I have a silly question:
 > For inverting a matrix shouldn't I first use "gsl_linalg_LU_decomp"
 > function to decompose my matrix and then use "gsl_linalg_LU_invert"
 > passing the results of previous function to it, to invert the
 > matrix? If it is correct how come the multiplication of the
 > original matrix and it's reverse is not I?  I'll appreciate any
 > help, NN.

What you've described should work.  If it doesn't please send your
program as a bug report.

Thanks,

-- 
Brian Gough

----------------------------------------------------------------------
Network Theory Ltd            Phone: 0117 3179309 (+44 117 3179309)
15 Royal Park                 WWW: http://www.network-theory.co.uk/
Bristol BS8 3AL               Email: bjg@network-theory.co.uk     
United Kingdom                
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Matrix inversion.
  2002-12-31  9:55 Matrix inversion Negin Nejati
@ 2002-01-29 14:16 ` Negin Nejati
  2002-12-31  9:55 ` Brian Gough
  1 sibling, 0 replies; 8+ messages in thread
From: Negin Nejati @ 2002-01-29 14:16 UTC (permalink / raw)
  To: gsl-discuss


Hi,
I am a new user of this library and I have a silly question:
For inverting a matrix shouldn't I first use "gsl_linalg_LU_decomp" function 
to decompose my matrix and then use "gsl_linalg_LU_invert" passing the
results of previous function to it, to invert the matrix? If it is correct
how come the multiplication of the original matrix and it's reverse is not
I?
I'll appreciate any help,
NN.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: matrix inversion
@ 2001-12-19 13:20 Mikael Adlers
  0 siblings, 0 replies; 8+ messages in thread
From: Mikael Adlers @ 2001-12-19 13:20 UTC (permalink / raw)
  To: 'Rooms
	Frédéric',
	gsl-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

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
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-07-22 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 matrix inversion Rooms Frédéric
2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20 Mikael Adlers
2002-07-22  8:24 Matrix Inversion Daniel T Konkle
2002-12-31  9:55 Matrix inversion Negin Nejati
2002-01-29 14:16 ` Negin Nejati
2002-12-31  9:55 ` Brian Gough
2002-01-30 11:41   ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).