This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Determinant of a matrix
- From: Gert Van den Eynde <gvdeynde at sckcen dot be>
- To: Przemyslaw Sliwa <sliwa at euv-frankfurt-o dot de>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Tue, 22 Oct 2002 12:12:23 +0200
- Subject: Re: Determinant of a matrix
- Organization: SCK-CEN
- References: <3DB521DE.2020006@euv-frankfurt-o.de>
Could you send us some lines of code that gives this behaviour and some more machine/compiler specs (see the Bug reporting part in the README file).
Remark 1: If I understand correctly, you calculate a determinant of 0.5E+13 and the error between Cholesky and LU is 6.0E+1 (a relative error of about 1.0E-11).
Remark 2: The condition number of a Hilbert matrix of size 10 x 10 is about 1.0E+10. Roughly said, if you solve a linear system using LU factorisation (Gauss) with this matrix, you can loose about 10 decimal digits in your result... With the traditional double precision (u = 2.2E-16), this leaves you with 4 digits you can trust.... Hilbert matrices are *not* nice.
Gert
On Tue, 22 Oct 2002 12:01:02 +0200
Przemyslaw Sliwa <sliwa@euv-frankfurt-o.de> wrote:
> Hello,
>
> The determinant of a symmetric positive definite matrix is just the
> product of the squares of the diagonal elements form the cholesky
> decomposition (NAG documentation). So why I'm getting different
> results form gsl_LU decomposition and the cholesky decomposition
> of a 10*10 Hilbert matrix (elemenst i,j given by 1/(i+j-1)).
> The results are not very big, but still they exist (determinant about
> 0.5E+13 and
> the difference 6.0E+1).
> Is it a bug, or the LU decomposition is unstable.
> What should be suggested: determinant of a covariance matrix: its
> Cholesky form or computation from LU decomposition.
>
> Thanks for help
>
> Przem
>