I have a problem with finding the inverse of a matrix. I have a square 9x9 matrix, A, and when I do solve(A) to find the inverse I get the following error message: Error in solve.default(A) : singular matrix `a' in solve Has anybody got any ideas as to why this is happening? Thanks Laura Gross _______________________________________________________________________ Never pay another Internet phone bill! Freeserve AnyTime, for all the Internet access you want, day and night, only ?12.99 per month. Sign-up at http://www.freeserve.com/time/anytime -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Tue, 6 Nov 2001 laura at bayesian-bay.freeserve.co.uk wrote:> I have a problem with finding the inverse of a matrix. I have a square > 9x9 matrix, A, and when I do solve(A) to find the inverse I get the > following error message: > > Error in solve.default(A) : singular matrix `a' in solve > > Has anybody got any ideas as to why this is happening?Because the matrix probably does not have an inverse, or is extremely close to one that does not. Look at its eigendecomposition or svd to learn more. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Looks like A is a singular matrix, hence no inverse. Try det(A) to see if the determinant is 0 (or close to zero). If that's not the case, perhaps you can send the actual matrix you're working with? Sundar> -----Original Message----- > From: owner-r-help at stat.math.ethz.ch > [mailto:owner-r-help at stat.math.ethz.ch] On Behalf Of > laura at bayesian-bay.freeserve.co.uk > Sent: Tuesday, November 06, 2001 9:21 AM > To: r-help at hypatia.math.ethz.ch > Subject: [R] Inverse Matrices > > > I have a problem with finding the inverse of a matrix. I have > a square 9x9 matrix, A, and when I do solve(A) to find the > inverse I get the following error message: > > Error in solve.default(A) : singular matrix `a' in solve > > Has anybody got any ideas as to why this is happening? > > Thanks > > Laura Gross > > > > ______________________________________________________________ > _________ > Never pay another Internet phone bill! > Freeserve AnyTime, for all the Internet access you want, day > and night, only ?12.99 per month. Sign-up at > http://www.freeserve.com/time/anytime > > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.- > r-help mailing list -- Read > http://www.ci.tuwien.ac.at/~hornik/R/R-> FAQ.html > Send "info", > "help", or "[un]subscribe" > (in the > "body", not the subject !) To: > r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._