[R] Matrix mulitplication

Gabor Grothendieck ggrothendieck at myway.com
Tue Feb 17 02:42:37 CET 2004

If you have to compute it many times for the same value of C
but different values of A and B then you could use the 
Sherman-Morrison-Woodbury formula which expresses the inverse
of C+UV' in terms of the inverse of C.  This would allow you
to avoid computing any inverses (except for C which only has to
be done once).  See:


Date:   Mon, 16 Feb 2004 13:44:45 -0800 (PST) 
From:   Grace Conlon <gracestat at yahoo.com>
To:   <R-help at stat.math.ethz.ch> 
Subject:   [R] Matrix mulitplication 

ABCD are four matrix.
A * Inverse((Transpose(A)*Tranpose(B)*B*A+C)) * Transpose(A) * Transpose(B) * D

how to write in R in an efficient way?

More information about the R-help mailing list