s-news
[Top] [All Lists]

Re: inverse of a diagonal matrix

To: Stefano Sofia <stefano.sofia@usa.net>
Subject: Re: inverse of a diagonal matrix
From: Spencer Graves <spencer.graves@PDF.COM>
Date: Sun, 30 Mar 2003 17:57:11 -0800
Cc: s-news@lists.biostat.wustl.edu
References: <154HcdsqE6944S18.1049048190@uwdvg018.cms.usa.net>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
Stafano:

The problem with computing inverses of matrices does not come from exact singularity but with "ill conditioning", which essentially means that round off becomes a major issue.

SUGGESTIONS:

          1.  Have you looked at the eigenvalues, e.g., 
"eigen(mymatrix)$values"?

          2.  Have you considered the Cholesky decomposition, "chol(mymatrix)"?

3. Have you considered using the binomial inverse theorem, a special case of which has inverse(I + b*outer(one, one)) is of the form (I - c*outer(one, one)), where "one" = the vector of all one's, for c = b/(1+n*b).

Hope this helps,
Spencer Graves

Stefano Sofia wrote:
Dear Splus users,
I’ve got some problems about inverse of a symmetric matrix.
Be mymatrix a square symmetric matrix of dimension 13, with 0.51 in the diagonal
-0.04636364 everywhere else.
Within the library Matrix, the command solve(mymatrix) gives back the inverse
of mymatrix. But I realised that the output of solve is not the correct matrix
at all; first of all the output is not a symmetric matrix, and multiplying
mymatrix with this presumed inverse I get a matrix far from being the identity
matrix.
The determinant of mymatrix is very small (1.31649e-019) but still recognised
as greater than zero. Is that possible to improve the precision of the
calculations or the smallness of the determinant makes any improvement
impossible?
Am I using the right method for the inverse?


I’m using Splus4 in a Windows XP environment.
Any help will be greatly appreciated
Stefano


--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news



<Prev in Thread] Current Thread [Next in Thread>