[R] Algo. for matrix inverse

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Oct 27 08:29:08 CET 2008


megh wrote:
> I am looking fpr a algo to find matrix inverse. Till time I am aware of
> Gauss-Jordan Elimination procedure to find the same. Are there any other
> algo. as well? What does R use to find the inverse?

There are many algorithms, depending on matrix structure and properties. 
R interfaces to LINPACK and LAPACK, which are huge, so don't expect a 
summary by email...

The basic matrix inverter is solve(), but for positive definite matrices
there is also chol() followed by chol2inv(), or qr() followed by 
backsolve() (linear models code does this). Further methods are based on 
singular value decomposition, svd(), there are sparse matrix packages, 
etc., etc.

-- 
    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list