comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Infinity matrix determinant
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Infinity matrix determinant [message #89691] Mon, 17 November 2014 00:23 Go to next message
amin farhang is currently offline  amin farhang
Messages: 39
Registered: November 2010
Member
Dear all,

I have a big matrix (2000x2000) which every elements of my matrix is of the order of 1.0e12 and i want to compute its inverse. since the data are too big, IDL could not determine the matrix determinant (even with determ(A,/double) command) and return Inf. Is there a way to compute its inverse and determinant?

Cheers,
Re: Infinity matrix determinant [message #89692 is a reply to message #89691] Mon, 17 November 2014 01:57 Go to previous messageGo to next message
Sergey Anfinogentov is currently offline  Sergey Anfinogentov
Messages: 11
Registered: September 2012
Junior Member
Dear Amin,
Try to divide every element of the matrix by a big factor like
factor = 1e12. Then you can calculate the determinant of a new matrix and use the properties known from linear algebra to restore the determinant of the original one.
IDl code:

factor = 1d12
matrrix = matrix/factor
det = determ(matrix,/double)
det = det * factor^2000d ; here 2000d is the size of the matrix

Cheers, Sergey

> Dear all,
>
> I have a big matrix (2000x2000) which every elements of my matrix is of the order of 1.0e12 and i want to compute its inverse. since the data are too big, IDL could not determine the matrix determinant (even with determ(A,/double) command) and return Inf. Is there a way to compute its inverse and determinant?
>
> Cheers,
Re: Infinity matrix determinant [message #89693 is a reply to message #89691] Mon, 17 November 2014 02:10 Go to previous messageGo to next message
amin farhang is currently offline  amin farhang
Messages: 39
Registered: November 2010
Member
Dear Sergey,

Thank you for answer.
The point is here that the factor^2000d return Infinity

IDL> print,(1.0d12)^2000d
Infinity
Re: Infinity matrix determinant [message #89694 is a reply to message #89693] Mon, 17 November 2014 03:24 Go to previous messageGo to next message
Sergey Anfinogentov is currently offline  Sergey Anfinogentov
Messages: 11
Registered: September 2012
Junior Member
If But you can calculate inverse matrix.
because for inverse matrix

(kA)^-1 = 1/k*(A^-1)
and
A^-1 = k*(kA^-1)

IDL code:

factor = 1d12
matrrix = matrix/factor
inverse = invert(matrix) ; invert is a built in function of IDL
inverse = inverse/factor

This should work fine.
For the determinant of such a matrix double precision is not enough. You should probably just memorize that you have a multiplier 1e24000.



> Dear Sergey,
>
> Thank you for answer.
> The point is here that the factor^2000d return Infinity
>
> IDL> print,(1.0d12)^2000d
> Infinity

I made a mistake
Re: Infinity matrix determinant [message #89695 is a reply to message #89693] Mon, 17 November 2014 03:27 Go to previous message
Sergey Anfinogentov is currently offline  Sergey Anfinogentov
Messages: 11
Registered: September 2012
Junior Member
You can still calculate inverse matrix.

because for inverse matrix you have

(kA)^-1 = 1/k*(A^-1)
and
A^-1 = k*(kA^-1)

Try the following IDL code:

factor = 1d12
matrrix = matrix/factor
inverse = invert(matrix) ; invert is a built in function of IDL
inverse = inverse/factor

This should work fine.
For the determinant of such a matrix double precision is not enough. You should probably just memorize that you have a multiplier 1e24000.


> Dear Sergey,
>
> Thank you for answer.
> The point is here that the factor^2000d return Infinity
>
> IDL> print,(1.0d12)^2000d
> Infinity
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SAR change values for pixels
Next Topic: cgmap__define error?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:16:07 PDT 2025

Total time taken to generate the page: 0.00413 seconds