[R] symmetric matrix multiplication

statfan irene_vrbik at hotmail.com
Sun Oct 23 07:44:42 CEST 2011


I have a symmetric matrix B (17x17), and a (17x17) square matrix A.  If do
the following matrix multiplication I SHOULD get a symmetric matrix, however
i don't.  The computation required is:

C = t(A)%*%B%*%A

here are some checks for symmetry
> (max(abs(B - t(B))))
[1] 0
> C = t(A)%*%B%*%A
> (max(abs(C - t(C))))
[1] 3.552714e-15

Any help on the matter would be very much appreciated.


--
View this message in context: http://r.789695.n4.nabble.com/symmetric-matrix-multiplication-tp3929739p3929739.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list