This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Inverse of a matrix
- From: Fleur Kelpin <fleur at bio dot vu dot nl>
- To: sliwa at euv-frankfurt-o dot de
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Thu, 30 May 2002 14:10:41 +0200 (MEST)
- Subject: Re: Inverse of a matrix
Hi,
>From your code:
gsl_linalg_LU_decomp(A, p, &signum);
gsl_linalg_LU_invert(A, p, B);
gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1, A, B, 0, C);
>From the manual for gsl_linalg_LU_decomp:
On output the diagonal and upper triangular part of the input matrix A
contain the matrix U. The lower triangular part of the input matrix
(excluding the diagonal) contains L. The diagonal elements of L are unity,
and are not stored.
So the LU decomposition of A changes the contents of A.
If you wish to check the results, you will have to make a copy of A before
the decomposition.
Hope this helps,
Fleur
> Hi,
> -1 -1
> I computed an inverse of a matrix A but after the multiplication AA I didn't get the identity.
>
> Could somebody help me, please.
>
> Thans
>
>
>