我在R中有一个Hessian矩阵,它是对称的,但是当我求逆时,它是不对称的。有什么理由吗?
> H
Y2:x0 Y2:x1 Y2:x2 Y3:x0 Y3:x1 Y3:x2
Y2:x0 80.7330275 138.3925827 30.7587900 -2.0733863 -0.6488755 0.5873648
Y2:x1 138.3925827 322.0118582 123.6994074 -0.6488755 -0.3966589 0.1935496
Y2:x2 30.7587900 123.6994074 80.2100552 0.5873648 0.1935496 -0.1668824
Y3:x0 -2.0733863 -0.6488755 0.5873648 16.3776543 3.8121818 -4.5735735
Y3:x1 -0.6488755 -0.3966589 0.1935496 3.8121818 1.5476827 -1.0977709
Y3:x2 0.5873648 0.1935496 -0.1668824 -4.5735735 -1.0977709 1.2788706
> is.symmetric.matrix(H)
[1] TRUE
> is.symmetric.matrix(solve(H))
[1] FALSE
我正在使用library(matrixcalc)
,但找不到为什么可以这样做。