Skip to content
Prev 79839 / 398502 Next

inverse matrix

Sam R. Smith wrote:
It does? Or perhaps your "%%" is not just a typo. It should be "%*%".

 > a <- matrix(rnorm(16), 4, 4)
 > b <- matrix(rnorm(4), 4, 1)
 > solve(a, b)
            [,1]
[1,] -0.8005768
[2,]  0.5913755
[3,] -1.8256012
[4,]  0.8973716
 > solve(a) %*% b
            [,1]
[1,] -0.8005768
[2,]  0.5913755
[3,] -1.8256012
[4,]  0.8973716

HTH,

--sundar